diff options
author | Daniel Salzman <daniel.salzman@nic.cz> | 2024-09-13 14:57:37 +0200 |
---|---|---|
committer | Daniel Salzman <daniel.salzman@nic.cz> | 2024-09-13 14:57:37 +0200 |
commit | 33e32b17fcc54926cbd7981031eee9ee54995b29 (patch) | |
tree | ba3943d1ead6405d4897b3219968bb1bf54c272a /src | |
parent | libknot/QUIC/DDNS: fix race when unblocking conn after sent DDNS reply (diff) | |
download | knot-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.c | 1 |
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); |