Fixed memory leaks
authoryoungsub ko <ys4610.ko@samsung.com>
Mon, 6 May 2013 10:01:53 +0000 (19:01 +0900)
committeryoungsub ko <ys4610.ko@samsung.com>
Mon, 6 May 2013 10:01:53 +0000 (19:01 +0900)
packaging/notification.spec
src/notification.c

index a5472eb..9b41a95 100755 (executable)
@@ -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
index a88b9cb..f4b70d1 100755 (executable)
@@ -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;
 }