From: youngsub ko Date: Mon, 13 May 2013 11:18:21 +0000 (+0900) Subject: Fixed memory leaks X-Git-Tag: accepted/tizen/20130530.164729~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08745d0bfe640dfeb2e5ea8061fb1a75fadb5f63;p=platform%2Fcore%2Fapi%2Fnotification.git Fixed memory leaks --- diff --git a/packaging/notification.spec b/packaging/notification.spec index c57faef..c58d6ee 100755 --- a/packaging/notification.spec +++ b/packaging/notification.spec @@ -1,6 +1,6 @@ Name: notification Summary: notification library -Version: 0.2.2 +Version: 0.2.3 Release: 1 Group: TBD License: Apache-2.0 diff --git a/src/notification_ipc.c b/src/notification_ipc.c index 069e39e..0d5db8a 100755 --- a/src/notification_ipc.c +++ b/src/notification_ipc.c @@ -950,8 +950,10 @@ notification_error_e notification_ipc_request_insert(notification_h noti, int *p } if (status != NOTIFICATION_ERROR_NONE) { + packet_unref(result); return status; } + packet_unref(result); } else { notification_ipc_is_master_ready(); return NOTIFICATION_ERROR_SERVICE_NOT_READY; @@ -983,6 +985,7 @@ notification_error_e notification_ipc_request_delete_single(notification_type_e packet_unref(result); return NOTIFICATION_ERROR_IO; } + packet_unref(result); } else { notification_ipc_is_master_ready(); return NOTIFICATION_ERROR_SERVICE_NOT_READY; @@ -1011,6 +1014,7 @@ notification_error_e notification_ipc_request_delete_multiple(notification_type_ return NOTIFICATION_ERROR_IO; } NOTIFICATION_ERR("num deleted:%d", num_deleted); + packet_unref(result); } else { notification_ipc_is_master_ready(); return NOTIFICATION_ERROR_SERVICE_NOT_READY; @@ -1038,6 +1042,7 @@ notification_error_e notification_ipc_request_update(notification_h noti) packet_unref(result); return NOTIFICATION_ERROR_IO; } + packet_unref(result); } else { notification_ipc_is_master_ready(); return NOTIFICATION_ERROR_SERVICE_NOT_READY; @@ -1064,6 +1069,7 @@ notification_error_e notification_ipc_request_refresh(void) packet_unref(result); return NOTIFICATION_ERROR_IO; } + packet_unref(result); } else { notification_ipc_is_master_ready(); return NOTIFICATION_ERROR_SERVICE_NOT_READY;