From 5b41da91dbe847852dca229ffc922d40efd95d18 Mon Sep 17 00:00:00 2001 From: hyun lee Date: Thu, 18 Dec 2014 17:43:31 +0900 Subject: [PATCH] Fix for prevent Change-Id: I41701aa698d24fb0303dea78d413411ebaeea1ba Signed-off-by: hyun lee --- src/notification.c | 4 +++- src/notification_noti.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/notification.c b/src/notification.c index a7a5d62..d525b6f 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 3e4d09f..50ee494 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 { -- 2.7.4