diff --git a/src/fu-main.c b/src/fu-main.c index e3af0e327..c785fa7e5 100644 --- a/src/fu-main.c +++ b/src/fu-main.c @@ -468,9 +468,9 @@ fu_main_helper_free (FuMainAuthHelper *helper) /* free */ if (helper->devices != NULL) g_ptr_array_unref (helper->devices); - if (helper->blob_fws > 0) + if (helper->blob_fws != NULL) g_ptr_array_unref (helper->blob_fws); - if (helper->blob_cab > 0) + if (helper->blob_cab != NULL) g_bytes_unref (helper->blob_cab); if (helper->store != NULL) g_object_unref (helper->store); @@ -1706,15 +1706,15 @@ fu_main_daemon_method_call (GDBusConnection *connection, const gchar *sender, /* ensure the unique ID is set */ if (fwupd_result_get_unique_id (FWUPD_RESULT (item->device)) == NULL) { - g_autofree gchar *id = NULL; + g_autofree gchar *id2 = NULL; FwupdResult *res = FWUPD_RESULT (item->device); - id = as_utils_unique_id_build (AS_APP_SCOPE_SYSTEM, - AS_BUNDLE_KIND_UNKNOWN, - NULL, - AS_APP_KIND_FIRMWARE, - fwupd_result_get_device_name (res), - fwupd_result_get_device_version (res)); - fwupd_result_set_unique_id (res, id); + id2 = as_utils_unique_id_build (AS_APP_SCOPE_SYSTEM, + AS_BUNDLE_KIND_UNKNOWN, + NULL, + AS_APP_KIND_FIRMWARE, + fwupd_result_get_device_name (res), + fwupd_result_get_device_version (res)); + fwupd_result_set_unique_id (res, id2); } /* success */