summaryrefslogtreecommitdiff
path: root/src/mir_core/json/libJSON.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-05 22:23:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-05 22:23:17 +0000
commit300b0d6897c31b9250dd6a60746646b036986983 (patch)
tree71066e1595776ed0e53efb0d1a91bd1b2c639d20 /src/mir_core/json/libJSON.cpp
parentedae1aa833a1223ca2e0b14d454fa114b3f0213b (diff)
fix for massive memory leak in json parser
git-svn-id: http://svn.miranda-ng.org/main/trunk@5593 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core/json/libJSON.cpp')
-rw-r--r--src/mir_core/json/libJSON.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mir_core/json/libJSON.cpp b/src/mir_core/json/libJSON.cpp
index 077af1b961..e3599e8936 100644
--- a/src/mir_core/json/libJSON.cpp
+++ b/src/mir_core/json/libJSON.cpp
@@ -266,9 +266,9 @@ MIR_CORE_DLL(int) json_empty(const JSONNODE * node){
return (int)(((JSONNode*)node) -> empty());
}
-MIR_CORE_DLL(json_char*) json_name(const JSONNODE * node){
- JSON_ASSERT_SAFE(node, JSON_TEXT("null node to json_name"), return toCString(EMPTY_CSTRING););
- return toCString(((JSONNode*)node) -> name());
+MIR_CORE_DLL(const json_char*) json_name(const JSONNODE * node){
+ JSON_ASSERT_SAFE(node, JSON_TEXT("null node to json_name"), return EMPTY_CSTRING;);
+ return ((JSONNode*)node) -> name();
}
#ifdef JSON_COMMENTS