Skip to content
Snippets Groups Projects
Commit 1ef0f80e authored by Marek Vavrusa's avatar Marek Vavrusa Committed by Lubos Slovak
Browse files

Fixed TSIG memory leak and DDNS failure debug messages.

refs #937

Conflicts:

	src/knot/server/zones.c
parent fd60299b
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ const error_table_t knot_error_msgs[] = {
{KNOT_ECRYPTO, "Error in crypto library."},
{KNOT_ENSEC3PAR, "Missing or wrong NSEC3PARAM record."},
{KNOT_ENSEC3CHAIN, "Missing or wrong NSEC3 chain in the zone."},
{KNOT_EBADZONE, "Domain name does not belong to the given zone."},
{KNOT_EBADZONE, "Name does not belong to the zone."},
{KNOT_EHASH, "Error in hash table."},
{KNOT_EZONEINVAL, "Invalid zone file."},
{KNOT_ENOZONE, "No such zone found."},
......
......@@ -937,6 +937,9 @@ int knot_tsig_add(uint8_t *msg, size_t *msg_len, size_t msg_max_len,
knot_dname_free(&key_name);
return KNOT_ENOMEM;
}
/* Already referenced in tmp_tsig, release. */
knot_dname_release(key_name);
/* Create rdata for TSIG RR. */
knot_rdata_t *rdata = knot_rdata_new();
......@@ -957,7 +960,6 @@ int knot_tsig_add(uint8_t *msg, size_t *msg_len, size_t msg_max_len,
malloc(sizeof(knot_rdata_item_t) * desc->length);
if (items == NULL) {
dbg_tsig("TSIG: items = NULL\n");
ERR_ALLOC_FAILED;
knot_rrset_deep_free(&tmp_tsig, 1, 1, 1);
return KNOT_ENOMEM;
}
......
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