Skip to content
Snippets Groups Projects
Commit 027f6e0d authored by Marek Vavruša's avatar Marek Vavruša
Browse files

rrset: fixed deprecated usage of empty rdata

parent c131bb3c
No related branches found
No related tags found
No related merge requests found
......@@ -460,14 +460,7 @@ int knot_rrset_rdata_from_wire_one(knot_rrset_t *rrset,
}
if (rdlength == 0) {
// Alloc data for empty RR.
uint8_t *empty_rdata = malloc(1);
if (empty_rdata == NULL) {
return KNOT_ENOMEM;
}
int ret = knot_rrset_add_rdata(rrset, empty_rdata, 0, ttl, mm);
free(empty_rdata);
return ret;
return knot_rrset_add_rdata(rrset, NULL, 0, ttl, mm);
}
const rdata_descriptor_t *desc = get_rdata_descriptor(rrset->type);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment