summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Salzman <daniel.salzman@nic.cz>2024-09-13 14:57:37 +0200
committerDaniel Salzman <daniel.salzman@nic.cz>2024-09-13 14:57:37 +0200
commit33e32b17fcc54926cbd7981031eee9ee54995b29 (patch)
treeba3943d1ead6405d4897b3219968bb1bf54c272a /src
parentlibknot/QUIC/DDNS: fix race when unblocking conn after sent DDNS reply (diff)
downloadknot-33e32b17fcc54926cbd7981031eee9ee54995b29.tar.xz
knot-33e32b17fcc54926cbd7981031eee9ee54995b29.zip
knsupdate: fix memory leak if rdata parsing fails
Diffstat (limited to 'src')
-rw-r--r--src/utils/knsupdate/knsupdate_exec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/utils/knsupdate/knsupdate_exec.c b/src/utils/knsupdate/knsupdate_exec.c
index d716ffb53..ae13db4c8 100644
--- a/src/utils/knsupdate/knsupdate_exec.c
+++ b/src/utils/knsupdate/knsupdate_exec.c
@@ -310,6 +310,7 @@ static int parse_partial_rr(zs_scanner_t *s, const char *lp, unsigned flags)
if (zs_set_input_string(s, rr, strlen(rr)) != 0 ||
zs_parse_all(s) != 0) {
ERR("invalid rdata (%s)", zs_strerror(s->error.code));
+ free(rr);
return KNOT_EPARSEFAIL;
}
free(rr);