From b2fdcba6b04eb4356eab855c1d2cb55d68cf4f93 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 30 Jun 2015 17:21:48 -0700 Subject: [PATCH] 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. --- jsonpull.c | 1 - 1 file changed, 1 deletion(-) diff --git a/jsonpull.c b/jsonpull.c index 5c5928d..fc85b92 100644 --- a/jsonpull.c +++ b/jsonpull.c @@ -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 {