From 64d15dadffb77a56baebac5024ead13ccd21309d Mon Sep 17 00:00:00 2001 From: Inkyun Kil Date: Mon, 3 Apr 2017 13:30:31 +0900 Subject: [PATCH] Fix memory leak Change-Id: If280dd2155b75cabc42f7a2d4a8544b8707dfb65 Signed-off-by: Inkyun Kil --- src/esd_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/esd_main.c b/src/esd_main.c index 93e096a..cb00e9e 100644 --- a/src/esd_main.c +++ b/src/esd_main.c @@ -1010,18 +1010,21 @@ static int __esd_get_user_items(void) PMINFO_APPINFO_PROP_APP_COMPONENT, "svcapp"); if (ret < 0) { _E("failed to add appinfo filter string"); + pkgmgrinfo_appinfo_filter_destroy(handle); return ES_R_ERROR; } ret = pkgmgrinfo_appinfo_filter_add_string(handle, PMINFO_APPINFO_PROP_APP_OPERATION, APPSVC_OPERATION_LAUNCH_ON_EVENT); if (ret < 0) { _E("failed to add appinfo filter string"); + pkgmgrinfo_appinfo_filter_destroy(handle); return ES_R_ERROR; } ret = pkgmgrinfo_appinfo_usr_filter_foreach_appinfo(handle, __esd_add_appinfo_handler, &cur_uid, cur_uid); if (ret < 0) { _E("appinfo filter foreach error"); + pkgmgrinfo_appinfo_filter_destroy(handle); return ES_R_ERROR; } pkgmgrinfo_appinfo_filter_destroy(handle); -- 2.7.4