aboutsummaryrefslogtreecommitdiffstats
path: root/src/cJSON.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cJSON.c')
-rw-r--r--src/cJSON.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cJSON.c b/src/cJSON.c
index 4da03ccc..9e53012e 100644
--- a/src/cJSON.c
+++ b/src/cJSON.c
@@ -123,9 +123,15 @@ cJSON_Delete (cJSON * c)
if (!(c->type & cJSON_IsReference) && c->child)
cJSON_Delete (c->child);
if (!(c->type & cJSON_IsReference) && c->valuestring)
- xfree (c->valuestring);
+ {
+ wipememory (c->valuestring, strlen (c->valuestring));
+ xfree (c->valuestring);
+ }
if (c->string)
- xfree (c->string);
+ {
+ wipememory (c->string, strlen (c->string));
+ xfree (c->string);
+ }
xfree (c);
c = next;
}