From c27133715b12e3672108783b67fc7a9bc22b7c1f Mon Sep 17 00:00:00 2001 From: Volodymyr Kuznetsov Date: Fri, 5 Feb 2016 13:31:05 -0800 Subject: [PATCH] Fixed error condition on malloc failure. Fixed error condition on malloc failure, it looks like it should be temp_values, not temp_names. --- parson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parson.c b/parson.c index d807d32..c976710 100644 --- a/parson.c +++ b/parson.c @@ -336,7 +336,7 @@ static JSON_Status json_object_resize(JSON_Object *object, size_t new_capacity) return JSONFailure; temp_values = (JSON_Value**)parson_malloc(new_capacity * sizeof(JSON_Value*)); - if (temp_names == NULL) { + if (temp_values == NULL) { parson_free(temp_names); return JSONFailure; }