UserDefault::setDataForKey on android will cause memory leak

This commit is contained in:
Jason Xu 2013-12-06 11:53:43 +08:00
parent 87f94ee874
commit 29bd5001ae
1 changed files with 1 additions and 1 deletions

View File

@ -470,7 +470,7 @@ void UserDefault::setDataForKey(const char* pKey, const Data& value)
CCLOG("SET DATA ENCODED: --%s", encodedData);
return setStringForKeyJNI(pKey, encodedData);
setStringForKeyJNI(pKey, encodedData);
if (encodedData)
free(encodedData);