Fix static analysis issues 85/259585/1
authorIlho Kim <ilho159.kim@samsung.com>
Thu, 10 Jun 2021 02:33:54 +0000 (11:33 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Thu, 10 Jun 2021 02:33:54 +0000 (11:33 +0900)
 - Fix memory leak

Change-Id: Ia17046d952974c60248a7d884e5ce19929bf1357
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
client/src/pkgmgr.c

index 026439d..cebcb2f 100644 (file)
@@ -319,6 +319,7 @@ static int __check_app_process(pkgmgr_request_service_type service_type,
 
        if (ret != PKGMGR_R_OK) {
                ERR("request failed: %d", ret);
+               pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
                return ret;
        }
 
@@ -326,6 +327,7 @@ static int __check_app_process(pkgmgr_request_service_type service_type,
        g_variant_unref(result);
        if (ret != PKGMGR_R_OK) {
                ERR("request failed, ret=%d", ret);
+               pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
                return ret;
        }