summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/avatar.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-11-28 12:58:45 +0000
committerRobert Pösel <robyer@seznam.cz>2014-11-28 12:58:45 +0000
commit2de6603f69b343c3245043ab4c05292a617bd9ba (patch)
treea0930902daee55144d130a6bc77f8a22fedca4cc /protocols/Gadu-Gadu/src/avatar.cpp
parent8817909629b3e0881672a7b7324fc7c583c331ad (diff)
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
Diffstat (limited to 'protocols/Gadu-Gadu/src/avatar.cpp')
-rw-r--r--protocols/Gadu-Gadu/src/avatar.cpp3
1 files changed, 1 insertions, 2 deletions
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 {