GNOME Bugzilla – Bug 752939
Several leak fixes
Last modified: 2015-07-29 16:11:40 UTC
These patches fix some leaks I found using valgrind
Created attachment 308253 [details] [review] daemon: Fix leak in process_config_entries The object returned by g_dbus_object_manager_get_object() must be unref'ed when no longer needed.
Created attachment 308254 [details] [review] providers: Fix JsonParser leaks After creating a JsonParser with json_parser_new(), its memory must be released with g_object_unref().
Created attachment 308255 [details] [review] Don't leak account in GoaMediaServerProvider::build_object() The GoaAccount returned from goa_object_get_account() must be unref'ed when no longer needed.
Created attachment 308256 [details] [review] owncloud: Fix 'documents' leak in ::build_object() Similarly to the calendar, contacts, files objects, 'documents' needs to be unref'ed when no longer needed.
Review of attachment 308253 [details] [review]: One minor nitpick: ::: src/daemon/goadaemon.c @@ +634,3 @@ G_CALLBACK (on_account_handle_remove), self); + g_object_unref(object); Please add a space between the function name and opening parenthesis.
Review of attachment 308254 [details] [review]: ::: src/goabackend/goagoogleprovider.c @@ +262,2 @@ out: + g_clear_object(&parser); Please put a space between the function name and opening parenthesis. ::: src/goabackend/goawindowsliveprovider.c @@ +250,2 @@ out: + g_clear_object(&parser); Ditto.
Review of attachment 308255 [details] [review]: ++
Review of attachment 308256 [details] [review]: ++
Attachment 308253 [details] pushed as 325f026 - daemon: Fix leak in process_config_entries Attachment 308254 [details] pushed as 80c89b4 - providers: Fix JsonParser leaks Attachment 308255 [details] pushed as 53f211c - Don't leak account in GoaMediaServerProvider::build_object()
Attachment 308256 [details] pushed as 0b32f06 - owncloud: Fix 'documents' leak in ::build_object()