Add free logic for memory leak in NSStorageWrite function.
Change-Id: Ifd8ef3b08cc61e798255be5f472df6e9d4e3575a
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10901
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
if (it)\r
{\r
NS_LOG(DEBUG, "already registered for topic name");\r
+ OICFree(topicData->topicName);\r
+ OICFree(topicData);\r
pthread_mutex_unlock(&NSCacheMutex);\r
return NS_FAIL;\r
}\r
if (it)\r
{\r
NS_LOG(DEBUG, "already registered for topic name");\r
+ OICFree(topicData->topicName);\r
+ OICFree(topicData);\r
pthread_mutex_unlock(&NSCacheMutex);\r
return NS_FAIL;\r
}\r
if (it)\r
{\r
NS_LOG(DEBUG, "already registered for topic name");\r
+ OICFree(topicData->topicName);\r
+ OICFree(topicData);\r
pthread_mutex_unlock(&NSCacheMutex);\r
return NS_FAIL;\r
}\r