From 6d7c33c5da1ad770cef201ea5b8e90cf5ac9f1b9 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 7 Jun 2017 14:47:00 +0100 Subject: [PATCH] trivial: Fix two tiny leaks in the new HWIDs support --- src/fu-self-test.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/fu-self-test.c b/src/fu-self-test.c index 408aea6c9..5a323c3ac 100644 --- a/src/fu-self-test.c +++ b/src/fu-self-test.c @@ -38,9 +38,8 @@ fu_hwids_func (void) { g_autoptr(FuHwids) hwids = NULL; g_autoptr(GError) error = NULL; - g_autofree gchar *guid = NULL; + g_autofree gchar *sysfsdir = NULL; g_autofree gchar *testdir = NULL; - const gchar *sysfsdir; gboolean ret; struct { @@ -89,7 +88,7 @@ fu_hwids_func (void) g_assert_cmpstr (fu_hwids_get_value (hwids, FU_HWIDS_KEY_BIOS_MINOR_RELEASE), ==, "6"); g_assert_cmpstr (fu_hwids_get_value (hwids, FU_HWIDS_KEY_PRODUCT_SKU), ==, "SKU"); for (guint i = 0; guids[i].key != NULL; i++) { - guid = fu_hwids_get_guid (hwids, guids[i].key, &error); + g_autofree gchar *guid = fu_hwids_get_guid (hwids, guids[i].key, &error); g_assert_no_error (error); g_assert_cmpstr (guid, ==, guids[i].value); }