Fix memory leak 41/114341/4
authorMyungki Lee <mk5004.lee@samsung.com>
Tue, 14 Feb 2017 06:40:42 +0000 (15:40 +0900)
committerMyungKi Lee <mk5004.lee@samsung.com>
Tue, 14 Feb 2017 06:49:13 +0000 (22:49 -0800)
Change-Id: I90566d1a2958a35d384c28d9781fbd7f0b9e7288
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
src/notification_ipc.c

index 4c90f58..e36cdbb 100755 (executable)
@@ -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;
                        }