From 2de6603f69b343c3245043ab4c05292a617bd9ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Fri, 28 Nov 2014 12:58:45 +0000 Subject: Use JSONROOT everywhere to simplify code and fix memleaks (in Dropbox and Steam) git-svn-id: http://svn.miranda-ng.org/main/trunk@11130 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Gadu-Gadu/src/avatar.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'protocols/Gadu-Gadu') diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp index defabb11e5..e3f871cfdf 100644 --- a/protocols/Gadu-Gadu/src/avatar.cpp +++ b/protocols/Gadu-Gadu/src/avatar.cpp @@ -104,7 +104,7 @@ bool GGPROTO::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts) } else if (strncmp(resp->pData, "{\"result\":", 10) == 0){ //if this url returns json data (11.2013 gg convention) - JSONNODE *respJSON = json_parse(resp->pData); + JSONROOT respJSON(resp->pData); if (respJSON != NULL) { JSONNODE* respJSONavatars = json_get(json_get(json_get(json_get(respJSON, "result"), "users"), "user"), "avatars"); if (respJSONavatars != NULL) { @@ -117,7 +117,6 @@ bool GGPROTO::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts) *avatarts = mir_t2a(respJSONtimestamp); } } - json_delete(respJSON); } } else { -- cgit v1.2.3