From: Myungki Lee Date: Tue, 14 Feb 2017 06:40:42 +0000 (+0900) Subject: Fix memory leak X-Git-Tag: submit/tizen_3.0/20170221.090900^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad7c39d7d51ddf5a767015fa6c0dcbfaf24e6990;p=platform%2Fcore%2Fapi%2Fnotification.git Fix memory leak Change-Id: Ie31faeff68a199f960afb14cc7bb91d76b464d19 Signed-off-by: Myungki Lee --- diff --git a/src/notification_ipc.c b/src/notification_ipc.c index fdecf6f2..26f2db6e 100755 --- a/src/notification_ipc.c +++ b/src/notification_ipc.c @@ -562,10 +562,12 @@ static void _send_event(GVariant *parameters) g_variant_unref(body); if (ret != NOTIFICATION_ERROR_NONE) { NOTIFICATION_ERR("failed to make notification handle from gvariant"); + notification_free(noti); return; } notification_call_event_handler_cb(noti, event_type); + notification_free(noti); } static void _delete_event(GVariant *parameters) @@ -1396,6 +1398,7 @@ int notification_ipc_request_load_system_setting(notification_system_setting_h * if (dnd_allow_exception == NULL) { g_object_unref(reply); g_variant_iter_free(iter); + free(result_setting); return NOTIFICATION_ERROR_OUT_OF_MEMORY; }