From: jaesick.shin Date: Wed, 10 Aug 2016 01:13:50 +0000 (+0900) Subject: bug fixes for deallocate memory logic of "NotificationMessage". X-Git-Tag: 1.2.0+RC1~52^2~73 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3940c48d06d2a8a2f2d9953ec57bc7eb5a60caeb;p=platform%2Fupstream%2Fiotivity.git bug fixes for deallocate memory logic of "NotificationMessage". added deallocate memory logic for NotificationMessage when send notification failed. Change-Id: I3feca075a06df9f6ba5cc90bdf9ff51cde279b60 Signed-off-by: jaesick.shin Reviewed-on: https://gerrit.iotivity.org/gerrit/10211 Tested-by: jenkins-iotivity Reviewed-by: Madan Lanka --- diff --git a/service/notification/src/provider/NSProviderNotification.c b/service/notification/src/provider/NSProviderNotification.c index 3b1dced..f6f7da9 100644 --- a/service/notification/src/provider/NSProviderNotification.c +++ b/service/notification/src/provider/NSProviderNotification.c @@ -162,8 +162,8 @@ NSResult NSSendNotification(NSMessage *msg) OCRepPayloadDestroy(payload); return NS_ERROR; } + OCRepPayloadDestroy(payload); - NSFreeMessage(msg); NS_LOG(DEBUG, "NSSendMessage - OUT"); @@ -269,6 +269,7 @@ void * NSNotificationSchedule(void *ptr) { NS_LOG(DEBUG, "CASE TASK_SEND_NOTIFICATION : "); NSSendNotification((NSMessage *)node->taskData); + NSFreeMessage((NSMessage *)node->taskData); break; } case TASK_SEND_READ: