Fixed error condition on malloc failure.

Fixed error condition on malloc failure, it looks like it should be temp_values, not temp_names.
pull/35/head
Volodymyr Kuznetsov 9 years ago
parent c9b920c4a3
commit c27133715b
  1. 2
      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;
}

Loading…
Cancel
Save