]> granicus.if.org Git - mutt/commitdiff
Fix fp resource leak. (closes #3965)
authorKevin McCarthy <kevin@8t8.us>
Mon, 4 Sep 2017 16:20:53 +0000 (09:20 -0700)
committerKevin McCarthy <kevin@8t8.us>
Mon, 4 Sep 2017 16:20:53 +0000 (09:20 -0700)
Thanks to dcb314 for reporting the issue.

mutt_ssl_gnutls.c

index 5481e1cb267a6f3d3fd27b48aa88f377fcd5ba3e..56ff84065361eb407ac972b26d0f6bd6f4debaf7 100644 (file)
@@ -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';