diff options
author | Richard Hughes <richard@hughsie.com> | 2017-06-22 16:20:51 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2017-06-22 16:20:51 +0100 |
commit | 26d268b6bb005ba983bb8ab07b4b287ea66639f8 (patch) | |
tree | 24fc3d5783a6fd6ec8dd9a776266b75b970af69a /libappstream-glib/as-self-test.c | |
parent | df2531febeaa7bdfcd86ef2e0c37eca13efe46d4 (diff) | |
download | appstream-glib-26d268b6bb005ba983bb8ab07b4b287ea66639f8.tar.gz |
trivial: Fix up several small memory leaks
Diffstat (limited to 'libappstream-glib/as-self-test.c')
-rw-r--r-- | libappstream-glib/as-self-test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libappstream-glib/as-self-test.c b/libappstream-glib/as-self-test.c index 75171ec..3df66f6 100644 --- a/libappstream-glib/as-self-test.c +++ b/libappstream-glib/as-self-test.c @@ -2320,7 +2320,7 @@ as_test_store_validate_func (void) static void _as_app_add_format_kind (AsApp *app, AsFormatKind kind) { - AsFormat *format = as_format_new (); + g_autoptr(AsFormat) format = as_format_new (); as_format_set_kind (format, kind); as_app_add_format (app, format); } @@ -3760,13 +3760,13 @@ static void as_test_store_unique_func (void) { AsApp *app; - GPtrArray *apps; g_autoptr(AsApp) app1 = NULL; g_autoptr(AsApp) app2 = NULL; g_autoptr(AsApp) app3 = NULL; g_autoptr(AsBundle) bundle2 = NULL; g_autoptr(AsBundle) bundle3 = NULL; g_autoptr(AsStore) store = NULL; + g_autoptr(GPtrArray) apps = NULL; /* create a store and add a single app */ store = as_store_new (); |