check null pointer
Merge branch 'master' of https://github.com/dgomes/MELGA
json memory leak fix