diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-11-22 13:04:04 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-11-22 13:04:04 +0000 |
commit | cc5b9e03d48177aeeafdf9d5bd9e51f7963eae56 (patch) | |
tree | 805e12af528ff64b8f4352fde98fd80bd5ab017b /protocols/Steam/src/steam_pooling.cpp | |
parent | 711e4a64f417864c7b7716def8d78fc4a0646230 (diff) |
Steam: Fix json memleaks all over code; version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@11037 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_pooling.cpp')
-rw-r--r-- | protocols/Steam/src/steam_pooling.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/Steam/src/steam_pooling.cpp b/protocols/Steam/src/steam_pooling.cpp index 93ef78e726..15d39f8cbe 100644 --- a/protocols/Steam/src/steam_pooling.cpp +++ b/protocols/Steam/src/steam_pooling.cpp @@ -198,15 +198,16 @@ void CSteamProto::PollingThread(void*) messageId = json_as_int(node);
node = json_get(root, "messages");
- root = json_as_array(node);
+ JSONNODE *nroot = json_as_array(node);
- if (root != NULL)
- ParsePollData(root);
+ if (nroot != NULL)
+ ParsePollData(nroot);
m_pollingConnection = response->nlc;
}
else if (!lstrcmpi(error, L"Timeout"))
{
+ json_delete(root);
continue;
}
else if (!lstrcmpi(error, L"Not Logged On"))
@@ -233,6 +234,7 @@ void CSteamProto::PollingThread(void*) breaked = true;
}
+ json_delete(root);
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)response);
}
|