Skip to content
Snippets Groups Projects
Commit e3b32125 authored by Jan Kadlec's avatar Jan Kadlec
Browse files

Added NULL check to rrset_deep_free.

parent 5e468d57
No related branches found
No related tags found
No related merge requests found
......@@ -119,7 +119,7 @@ void dnslib_rrset_deep_free(dnslib_rrset_t **rrset, int free_owner,
dnslib_rdata_t *next_rdata;
tmp_rdata = (*rrset)->rdata;
while ((tmp_rdata->next != (*rrset)->rdata) &&
while ((tmp_rdata != NULL) && (tmp_rdata->next != (*rrset)->rdata) &&
(tmp_rdata->next != NULL)) {
next_rdata = tmp_rdata->next;
dnslib_rdata_deep_free(&tmp_rdata, (*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