From 3940c48d06d2a8a2f2d9953ec57bc7eb5a60caeb Mon Sep 17 00:00:00 2001 From: "jaesick.shin" Date: Wed, 10 Aug 2016 10:13:50 +0900 Subject: [PATCH] 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 --- service/notification/src/provider/NSProviderNotification.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- 2.7.4