Browse Source

Fix #241, potential double free

Max Bruckner 7 năm trước cách đây
mục cha
commit
d514bb866e
1 tập tin đã thay đổi với 0 bổ sung4 xóa
  1. 0 4
      cJSON.c

+ 0 - 4
cJSON.c

@@ -1311,10 +1311,6 @@ static cJSON_bool print_value(const cJSON * const item, printbuffer * const outp
             size_t raw_length = 0;
             if (item->valuestring == NULL)
             {
-                if (!output_buffer->noalloc)
-                {
-                    output_buffer->hooks.deallocate(output_buffer->buffer);
-                }
                 return false;
             }