Fix memory leak 36/115736/1 accepted/tizen/3.0/common/20170222.125837 accepted/tizen/3.0/ivi/20170222.082747 accepted/tizen/3.0/mobile/20170222.082721 accepted/tizen/3.0/tv/20170222.082740 accepted/tizen/3.0/wearable/20170222.082744 submit/tizen_3.0/20170221.090900
authorMyungki Lee <mk5004.lee@samsung.com>
Tue, 14 Feb 2017 06:40:42 +0000 (15:40 +0900)
committerMyungki Lee <mk5004.lee@samsung.com>
Tue, 21 Feb 2017 07:08:02 +0000 (16:08 +0900)
Change-Id: Ie31faeff68a199f960afb14cc7bb91d76b464d19
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
src/notification_ipc.c

index fdecf6f2c0e6b1b645ab18d62e5481ea3200a9bd..26f2db6e3a348889d4ccb791b1e6b77aa9f68228 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;
                        }