From 6b61f5b05cca7e02dbfd7d36962f3fea5455999f Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Fri, 13 Dec 2019 10:43:00 +0900 Subject: [PATCH] Fix static analysis issue - Fix possibility of memory leak Change-Id: Ib45dab53ce7f988a52c2b1987782487e7aa07b99 Signed-off-by: Ilho Kim --- src/pkgmgrinfo_appinfo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pkgmgrinfo_appinfo.c b/src/pkgmgrinfo_appinfo.c index b50e08d..6089262 100644 --- a/src/pkgmgrinfo_appinfo.c +++ b/src/pkgmgrinfo_appinfo.c @@ -791,6 +791,7 @@ static int _pkgmgrinfo_get_appinfo(const char *appid, uid_t uid, appid, uid); g_hash_table_destroy(list); free(locale); + free(info); return PMINFO_R_ENOENT; } info->locale = locale; @@ -799,6 +800,7 @@ static int _pkgmgrinfo_get_appinfo(const char *appid, uid_t uid, _LOGE("out of memory"); g_hash_table_destroy(list); free(locale); + free(info); return PMINFO_R_ERROR; } -- 2.7.4