Commit 355dfaa9 authored by Marek Vavruša's avatar Marek Vavruša

put_rrsig: bad free

parent 5c5313a0
......@@ -126,7 +126,6 @@ static int put_rrsig(const knot_dname_t *sig_owner, uint16_t type,
/* Create rrsig info structure. */
struct rrsig_info *info = mm_alloc(qdata->mm, sizeof(struct rrsig_info));
if (info == NULL) {
ERR_ALLOC_FAILED;
knot_rrs_clear(&synth_rrs, qdata->mm);
return KNOT_ENOMEM;
}
......@@ -134,7 +133,7 @@ static int put_rrsig(const knot_dname_t *sig_owner, uint16_t type,
/* Store RRSIG into info structure. */
knot_dname_t *owner_copy = knot_dname_copy(sig_owner, qdata->mm);
if (owner_copy == NULL) {
free(info);
mm_free(qdata->mm, info);
knot_rrs_clear(&synth_rrs, qdata->mm);
return KNOT_ENOMEM;
}
......
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