Skip to content

Commit

Permalink
Fix memory leak -- was forgetting to destroy additionals
Browse files Browse the repository at this point in the history
  • Loading branch information
zrottman committed Oct 27, 2023
1 parent 8e468a3 commit 3ce7a68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 640,7 @@ int destroy_DNSPacket(DNSPacket **packet) {
destroy_DNSQuestion(&((*packet)->questions));
destroy_DNSRecord(&((*packet)->answers));
destroy_DNSRecord(&((*packet)->authorities));
destroy_DNSRecord(&((*packet)->authorities));
destroy_DNSRecord(&((*packet)->additionals));
free(*packet);
(*packet) = NULL;
return 0;
Expand Down

0 comments on commit 3ce7a68

Please sign in to comment.