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
1 changed files with 1 additions and 0 deletions

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;
}