unbound: Fix memory leak

This commit is contained in:
Tobias Brunner committed 2016-09-20 15:36:14 +02:00
1 parent 8c33a1897a
commit 3a25032c16
1 file changed
+2
@@ -154,11 +154,13 @@ unbound_rr_t *unbound_rr_create_frm_ldns_rr(ldns_rr *rr)
if (status != LDNS_STATUS_OK)
{
DBG1(DBG_LIB, "failed to get the RDATA field of a DNS RR");
ldns_buffer_free(buf);
_destroy(this);
return NULL;
}
this->rdata = ldns_buffer_export(buf);
ldns_buffer_free(buf);
return &this->public;
}