Browse Source

don't ignore malloc failure in cJSON_PrintBuffered

pull/43/head
Rod Vagg 8 years ago
parent
commit
5323f558cd
  1. 4
      cJSON.c

4
cJSON.c

@ -845,6 +845,10 @@ char *cJSON_PrintBuffered(const cJSON *item, int prebuffer, int fmt)
{
printbuffer p;
p.buffer = (char*)cJSON_malloc(prebuffer);
if (!p.buffer)
{
return 0;
}
p.length = prebuffer;
p.offset = 0;

Loading…
Cancel
Save