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>
(cherry picked from commit
2f8564431591e37493985629ffee7a90dfbfe4f6)
Reviewed-on: https://gerrit.iotivity.org/gerrit/11035
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