]> git.armaanb.net Git - chorizo.git/commitdiff
Fix minor memleak
authorPeter Hofmann <scm@uninformativ.de>
Sun, 15 Jun 2014 04:50:14 +0000 (06:50 +0200)
committerPeter Hofmann <scm@uninformativ.de>
Sun, 15 Jun 2014 04:50:14 +0000 (06:50 +0200)
zea.c

diff --git a/zea.c b/zea.c
index 94e7454c9197146ba963499cb3c5ab5f31b5b6ec..b90dc77f2c23292a5b2eefdce3d5dc30711fe72a 100644 (file)
--- a/zea.c
+++ b/zea.c
@@ -444,6 +444,7 @@ zea_launch_tabbed(void)
        GError *err = NULL;
        gchar *output = NULL;
        char *argv[] = { "tabbed", "-c", "-d", NULL };
+       Window plug_into;
 
        if (!g_spawn_async_with_pipes(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL,
                                      NULL, NULL, NULL, &tabbed_stdout, NULL,
@@ -465,7 +466,9 @@ zea_launch_tabbed(void)
        g_io_channel_shutdown(tabbed_stdout_channel, FALSE, NULL);
 
        g_strstrip(output);
-       return strtol(output, NULL, 16);
+       plug_into = strtol(output, NULL, 16);
+       g_free(output);
+       return plug_into;
 }
 
 void