From: abitha.s Date: Thu, 9 Feb 2017 11:08:59 +0000 (+0530) Subject: [IOT-1810]Fix for Double free of payload in C for Notification Message X-Git-Tag: 1.3.0~675 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1238241c4ee39ea648b11c235ef3a5d2491c7a86;p=platform%2Fupstream%2Fiotivity.git [IOT-1810]Fix for Double free of payload in C for Notification Message Change-Id: I8f1ddb3208e6383e4e4154c78b03838aa579c902 Signed-off-by: abitha.s Reviewed-on: https://gerrit.iotivity.org/gerrit/17149 Reviewed-by: Chihyun Cho Tested-by: jenkins-iotivity Reviewed-by: Uze Choi --- diff --git a/service/notification/src/provider/NSProviderNotification.c b/service/notification/src/provider/NSProviderNotification.c index 7f33a8b..d27c3be 100644 --- a/service/notification/src/provider/NSProviderNotification.c +++ b/service/notification/src/provider/NSProviderNotification.c @@ -136,6 +136,7 @@ NSResult NSSendNotification(NSMessage *msg) { NS_LOG(ERROR, "SubList->head is NULL, empty SubList"); OCRepPayloadDestroy(payload); + msg->extraInfo = NULL; return NS_ERROR; } @@ -203,6 +204,7 @@ NSResult NSSendNotification(NSMessage *msg) { NS_LOG(ERROR, "observer count is zero"); OCRepPayloadDestroy(payload); + msg->extraInfo = NULL; return NS_ERROR; }