gio-tool: Various memory leak fixes

https://bugzilla.gnome.org/show_bug.cgi?id=776169
This commit is contained in:
Ondrej Holy
2016-12-16 14:35:55 +01:00
parent 0beeeb2ec9
commit bde2bde411
3 changed files with 8 additions and 2 deletions

View File

@@ -176,12 +176,14 @@ add_watch (const gchar *cmdline,
g_signal_connect (monitor, "changed", G_CALLBACK (watch_callback), g_strdup (cmdline));
monitor = NULL; /* leak */
g_object_unref (file);
return TRUE;
err:
print_file_error (file, error->message);
g_error_free (error);
g_object_unref (file);
return FALSE;
}