Fix svace issue 16/239016/1 accepted/tizen/unified/20200722.014900 submit/tizen/20200721.154421
authorJeon Sang-Heon <sh95.jeon@samsung.com>
Tue, 21 Jul 2020 14:40:23 +0000 (14:40 +0000)
committerJeon Sang-Heon <sh95.jeon@samsung.com>
Tue, 21 Jul 2020 14:41:46 +0000 (14:41 +0000)
- WGID : 444432
- Remove null check after dereference Gerror

Change-Id: I1a645a2976149cc80a523eed53634f3ddfb1469f
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
update-manager/fota-storage-checker.c

index 3ef6cef8c4cf37d33621eb32766b19f6e1cccf25..e7c78d41f9a0cdedb0699c8a4eb6d2a111b28b3e 100644 (file)
@@ -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);