mirror of
https://github.com/DaveGamble/cJSON.git
synced 2024-12-27 14:14:07 +08:00
Fix #241, potential double free
This commit is contained in:
parent
27caa364b0
commit
d514bb866e
4
cJSON.c
4
cJSON.c
@ -1311,10 +1311,6 @@ static cJSON_bool print_value(const cJSON * const item, printbuffer * const outp
|
|||||||
size_t raw_length = 0;
|
size_t raw_length = 0;
|
||||||
if (item->valuestring == NULL)
|
if (item->valuestring == NULL)
|
||||||
{
|
{
|
||||||
if (!output_buffer->noalloc)
|
|
||||||
{
|
|
||||||
output_buffer->hooks.deallocate(output_buffer->buffer);
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user