Skip to content
Snippets Groups Projects
Commit 1e176be8 authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

Resolved memory leak on failed AXFR/OUT.

refs #1423
parent ec928660
No related branches found
No related tags found
No related merge requests found
......@@ -1103,9 +1103,9 @@ static int xfr_process_request(xfrworker_t *w, uint8_t *buf, size_t buflen)
r_addr, r_port);
}
/* Free allocated data. */
free(xfr.tsig_data);
xfr.tsig_data = NULL;
/* Free allocated data. */
free(xfr.tsig_data);
xfr.tsig_data = NULL;
}
if (xfr.digest) {
......@@ -1115,7 +1115,10 @@ static int xfr_process_request(xfrworker_t *w, uint8_t *buf, size_t buflen)
}
free(xfr.query->wireformat);
xfr.query->wireformat = 0;
knot_packet_free(&xfr.query); /* Free query. */
knot_packet_free(&xfr.query); /* Free query. */
xfr.query = NULL;
knot_packet_free(&xfr.response); /* Free response. */
xfr.response = NULL;
if (qname != NULL) {
free(zname);
......
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