From: hyun lee Date: Thu, 18 Dec 2014 08:43:31 +0000 (+0900) Subject: Fix for prevent X-Git-Tag: submit/tizen_mobile/20150515.081608~1^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b41da91dbe847852dca229ffc922d40efd95d18;p=platform%2Fcore%2Fapi%2Fnotification.git Fix for prevent Change-Id: I41701aa698d24fb0303dea78d413411ebaeea1ba Signed-off-by: hyun lee --- diff --git a/src/notification.c b/src/notification.c index a7a5d62b..d525b6f8 100755 --- a/src/notification.c +++ b/src/notification.c @@ -1839,12 +1839,14 @@ EXPORT_API int notification_clear(notification_type_e type) EXPORT_API int notification_delete_all(notification_type_e type) { int ret = 0; - char *caller_pkgname = _notification_get_pkgname_by_pid(); + char *caller_pkgname = NULL; if (type <= NOTIFICATION_TYPE_NONE || type >= NOTIFICATION_TYPE_MAX) { return NOTIFICATION_ERROR_INVALID_PARAMETER; } + caller_pkgname = _notification_get_pkgname_by_pid(); + ret = notification_ipc_request_delete_multiple(type, caller_pkgname); if (caller_pkgname) { diff --git a/src/notification_noti.c b/src/notification_noti.c index 3e4d09f2..50ee4948 100755 --- a/src/notification_noti.c +++ b/src/notification_noti.c @@ -1856,6 +1856,7 @@ EXPORT_API int notification_noti_post_toast_message(const char *message) } else if (count >= 2) { if (strcmp(msg, (char *)eina_list_nth(toast_list, count - 1)) == 0) { + free(msg); return 0; } else {