diff --git a/src/jansson-2.6/src/strbuffer.c b/src/jansson-2.6/src/strbuffer.c index 2d6ff310..c8abf46e 100644 --- a/src/jansson-2.6/src/strbuffer.c +++ b/src/jansson-2.6/src/strbuffer.c @@ -86,13 +86,10 @@ int strbuffer_append_bytes(strbuffer_t *strbuff, const char *data, size_t size) new_size = max(strbuff->size * STRBUFFER_FACTOR, strbuff->length + size + 1); - new_value = jsonp_malloc(new_size); + new_value = realloc(strbuff->value, new_size); if(!new_value) return -1; - memcpy(new_value, strbuff->value, strbuff->length); - - jsonp_free(strbuff->value); strbuff->value = new_value; strbuff->size = new_size; }