From faf529d900861921ecec05d9633f05cc11b4dd76 Mon Sep 17 00:00:00 2001 From: youngsub ko Date: Mon, 6 May 2013 19:01:53 +0900 Subject: [PATCH] Fixed memory leaks --- packaging/notification.spec | 2 +- src/notification.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packaging/notification.spec b/packaging/notification.spec index a5472eb..9b41a95 100755 --- a/packaging/notification.spec +++ b/packaging/notification.spec @@ -1,6 +1,6 @@ Name: notification Summary: notification library -Version: 0.2.1 +Version: 0.2.2 Release: 1 Group: TBD License: Apache-2.0 diff --git a/src/notification.c b/src/notification.c index a88b9cb..f4b70d1 100755 --- a/src/notification.c +++ b/src/notification.c @@ -2055,6 +2055,9 @@ EXPORT_API notification_error_e notification_delete_all_by_type(const char *pkgn return ret; } + if (caller_pkgname) { + free(caller_pkgname); + } return NOTIFICATION_ERROR_NONE; } @@ -2076,6 +2079,9 @@ EXPORT_API notification_error_e notification_delete_group_by_group_id(const char return ret; } + if (caller_pkgname) { + free(caller_pkgname); + } return NOTIFICATION_ERROR_NONE; } @@ -2097,6 +2103,9 @@ EXPORT_API notification_error_e notification_delete_group_by_priv_id(const char return ret; } + if (caller_pkgname) { + free(caller_pkgname); + } return NOTIFICATION_ERROR_NONE; } @@ -2122,6 +2131,9 @@ EXPORT_API notification_error_e notification_delete_by_priv_id(const char *pkgna return ret; } + if (caller_pkgname) { + free(caller_pkgname); + } return ret; } -- 2.7.4