[Notification] Fixed check for nullptr.
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Fri, 25 Mar 2016 13:16:59 +0000 (14:16 +0100)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Fri, 25 Mar 2016 13:16:59 +0000 (14:16 +0100)
Fixes: SVACE 59695
[Verification] TCT pass rate 100% (85/85/0/0/0)

Change-Id: Iccb8d0be2c121a03e842b1d8582173df06f58497
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
src/notification/status_notification.cc

index cdb8e0a245af431dbe7c844f0c8a9f4dc85e78ea..894b43270054abb00cc49eb0968cb270b5395c53 100644 (file)
@@ -152,7 +152,7 @@ PlatformResult StatusNotification::Create(notification_type_e noti_type,
                                           notification_h* noti_handle) {
   LoggerD("Enter");
   *noti_handle = notification_create(noti_type);
-  if (!noti_handle) {
+  if (!*noti_handle) {
     return LogAndCreateResult(ErrorCode::UNKNOWN_ERR,
                           "Cannot make new notification object");
   }
@@ -1160,7 +1160,7 @@ PlatformResult StatusNotification::FromJson(const picojson::object& args,
     if (app_control) {
       app_control_destroy(app_control);
     }
-    free(noti_handle);
+    notification_free(noti_handle);
   };
 
   if (is_update) {