Merge pull request #35 from vovanec/patch-1

Fixed error condition on malloc failure.
pull/38/head
Krzysztof Gabis 9 years ago
commit d7726760e0
  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