From: Jeon Sang-Heon Date: Tue, 21 Jul 2020 14:40:23 +0000 (+0000) Subject: Fix svace issue X-Git-Tag: submit/tizen/20200721.154421^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87204845c456c9353ac4f907b0f4c5489eda09ff;p=platform%2Fcore%2Fsystem%2Fupdate-control.git Fix svace issue - WGID : 444432 - Remove null check after dereference Gerror Change-Id: I1a645a2976149cc80a523eed53634f3ddfb1469f Signed-off-by: Jeon Sang-Heon --- diff --git a/update-manager/fota-storage-checker.c b/update-manager/fota-storage-checker.c index 3ef6cef..e7c78d4 100644 --- a/update-manager/fota-storage-checker.c +++ b/update-manager/fota-storage-checker.c @@ -14,6 +14,7 @@ int fota_storage_search_delta_path(const char *mount_path, gchar **delta_path) enumerator = g_file_enumerate_children(mount, G_FILE_ATTRIBUTE_STANDARD_NAME, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &error); if (enumerator == NULL) { _E("Failed to get enumerator : %s", error->message); + g_clear_error(&error); status = -1; goto search_destroy; } @@ -46,9 +47,6 @@ int fota_storage_search_delta_path(const char *mount_path, gchar **delta_path) } search_destroy: - if (error) - g_error_free(error); - if (enumerator) g_object_unref(enumerator);