Don't shrink string buffers before returning them as JSON objects.

It takes a little bit of time, and it's already not shrinking them
for number objects.
This commit is contained in:
Eric Fischer 2015-06-30 17:21:48 -07:00
parent 767a581874
commit b2fdcba6b0

View File

@ -499,7 +499,6 @@ again:
json_object *s = add_object(j, JSON_STRING);
if (s != NULL) {
val.buf = realloc(val.buf, val.n + 1);
s->string = val.buf;
s->length = val.n;
} else {