Fix for prevent
authorhyun lee <hyunn.lee@samsung.com>
Thu, 18 Dec 2014 08:43:31 +0000 (17:43 +0900)
committerhyun lee <hyunn.lee@samsung.com>
Thu, 18 Dec 2014 08:43:31 +0000 (17:43 +0900)
Change-Id: I41701aa698d24fb0303dea78d413411ebaeea1ba
Signed-off-by: hyun lee <hyunn.lee@samsung.com>
src/notification.c
src/notification_noti.c

index a7a5d62..d525b6f 100755 (executable)
@@ -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) {
index 3e4d09f..50ee494 100755 (executable)
@@ -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 {