1
0
mirror of https://github.com/DaveGamble/cJSON synced 2024-12-27 00:52:03 +00:00

cJSON_PrintBuffered: Fix potential memory leak

This commit is contained in:
Max Bruckner 2017-06-27 22:57:19 +02:00
parent 90a46eaccd
commit 2a3a313f83

View File

@ -1111,6 +1111,7 @@ CJSON_PUBLIC(char *) cJSON_PrintBuffered(const cJSON *item, int prebuffer, cJSON
if (!print_value(item, &p))
{
global_hooks.deallocate(p.buffer);
return NULL;
}