Commit a87a5533 authored by Vladimír Čunát's avatar Vladimír Čunát

utils: shut up a coverity warning (CID 155456)

parent 1ce9976e
......@@ -565,7 +565,12 @@ int kr_ranked_rrarray_add(ranked_rr_array_t *array, const knot_rrset_t *rr,
entry->cached = false;
entry->yielded = false;
entry->to_wire = to_wire;
array_push(*array, entry);
if (array_push(*array, entry) < 0) {
/* Silence coverity. It shouldn't be possible to happen,
* due to the array_reserve_mm call above. */
mm_free(pool, entry);
return kr_error(ENOMEM);
}
return to_wire_ensure_unique(array, array->len - 1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment