Fix memory leak in Notification Manager
authorSatya Prakash Gupta <sp.gupta@samsung.com>
Thu, 18 Jun 2015 06:15:07 +0000 (11:45 +0530)
committerUze Choi <uzchoi@samsung.com>
Tue, 23 Jun 2015 04:03:42 +0000 (04:03 +0000)
Fix memory leak in requestIsAlive when resource is not found.

Change-Id: Ia54883ac2d4f207402c4ac99a0e5304e96a39257
Signed-off-by: Satya Prakash Gupta <sp.gupta@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1354
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Harish Marappa <h.marappa@samsung.com>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/notification-manager/NotificationManager/src/hosting.c

index 38193fc..f0308a0 100644 (file)
@@ -1230,6 +1230,7 @@ OCStackResult requestIsAlive(const char *address)
     if (requestMirrorResourceList->headerNode == NULL)
     {
         OC_LOG_V(DEBUG, HOSTING_TAG, "Cannot found any mirror resource2");
+        destroyMirrorResourceList(requestMirrorResourceList);
         return OC_STACK_ERROR;
     }