From 2929c1229fcbfeedf39d0bc5c06cf163e4f73efb Mon Sep 17 00:00:00 2001 From: Junghoon Park Date: Tue, 29 Nov 2016 15:40:35 +0900 Subject: [PATCH] Fix memory leak Change-Id: I6813b094297aaa2b7b9a5269fa5d11546dedccdb Signed-off-by: Junghoon Park --- src/app_manager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app_manager.c b/src/app_manager.c index 55ebad3..0c0a60d 100644 --- a/src/app_manager.c +++ b/src/app_manager.c @@ -438,9 +438,11 @@ API int app_manager_event_create(app_manager_event_h *handle) __FUNCTION__, NULL); pc = pkgmgr_client_new(PC_LISTENING); - if (pc == NULL) + if (pc == NULL) { + free(app_mgr_evt); return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); + } app_mgr_evt->pc = pc; *handle = app_mgr_evt; -- 2.34.1