From: Kevin McCarthy Date: Mon, 4 Sep 2017 16:20:53 +0000 (-0700) Subject: Fix fp resource leak. (closes #3965) X-Git-Tag: mutt-1-9-1-rel~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c86e294267890b9d9f3614186e31835c490bf551;p=mutt Fix fp resource leak. (closes #3965) Thanks to dcb314 for reporting the issue. --- diff --git a/mutt_ssl_gnutls.c b/mutt_ssl_gnutls.c index 5481e1cb..56ff8406 100644 --- a/mutt_ssl_gnutls.c +++ b/mutt_ssl_gnutls.c @@ -647,7 +647,8 @@ static int tls_check_stored_hostname (const gnutls_datum_t *cert, if (REGCOMP(&preg, "^#H ([a-zA-Z0-9_\\.-]+) ([0-9A-F]{4}( [0-9A-F]{4}){7})[ \t]*$", REG_ICASE) != 0) { - return 0; + safe_fclose (&fp); + return 0; } buf[0] = '\0';