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 --- plugins/Dropbox/src/dropbox_transfers.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/Dropbox/src/dropbox_transfers.cpp') diff --git a/plugins/Dropbox/src/dropbox_transfers.cpp b/plugins/Dropbox/src/dropbox_transfers.cpp index e645f059fa..e1a538c664 100644 --- a/plugins/Dropbox/src/dropbox_transfers.cpp +++ b/plugins/Dropbox/src/dropbox_transfers.cpp @@ -40,7 +40,7 @@ int CDropbox::SendFileChunkedFirst(const char *data, int length, char *uploadId, if (response && response->resultCode == HTTP_STATUS_OK) { - JSONNODE *root = json_parse(response->pData); + JSONROOT root(response->pData); if (root) { JSONNODE *node = json_get(root, "upload_id"); @@ -72,7 +72,7 @@ int CDropbox::SendFileChunkedNext(const char *data, int length, const char *uplo if (response && response->resultCode == HTTP_STATUS_OK) { - JSONNODE *root = json_parse(response->pData); + JSONROOT root(response->pData); if (root) { JSONNODE *node = json_get(root, "offset"); @@ -154,8 +154,8 @@ int CDropbox::CreateDownloadUrl(const char *path, wchar_t *url) if (response && response->resultCode == HTTP_STATUS_OK) { - JSONNODE *root = json_parse(response->pData); - if (root != NULL) + JSONROOT root(response->pData); + if (root) { JSONNODE *node = json_get(root, "url"); wcscpy(url, json_as_string(node)); -- cgit v1.2.3