From: Claudius Zingerli Date: Tue, 21 Jun 2022 14:58:29 +0000 (+0200) Subject: Free line memory even if zone file parsing fails X-Git-Tag: 1.8.2-rc.1~11^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea1c323bfafea8dad00de34f72682b90e2ca13d5;p=thirdparty%2Fldns.git Free line memory even if zone file parsing fails --- diff --git a/rr.c b/rr.c index eb24f3c9..d12e5b16 100644 --- a/rr.c +++ b/rr.c @@ -742,6 +742,7 @@ _ldns_rr_new_frm_fp_l_internal(ldns_rr **newrr, FILE *fp, /* read an entire line in from the file */ if ((s = ldns_fget_token_l_st( fp, &line, &limit, false , LDNS_PARSE_SKIP_SPACE, line_nr))) + LDNS_FREE(line); return s; if (strncmp(line, "$ORIGIN", 7) == 0 && isspace((unsigned char)line[7])) {