From: ryancaicse <73822648+ryancaicse@users.noreply.github.com> Date: Tue, 21 Dec 2021 04:12:27 +0000 (+0800) Subject: Fix some minor resource leaks X-Git-Tag: v2.4.1~16^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F313%2Fhead;p=thirdparty%2Fcups.git Fix some minor resource leaks Fix some minor resource leaks in test18n.c --- diff --git a/cups/testi18n.c b/cups/testi18n.c index 4a67c93ba2..7be0fa2770 100644 --- a/cups/testi18n.c +++ b/cups/testi18n.c @@ -167,6 +167,7 @@ main(int argc, /* I - Argument Count */ if (encoding == CUPS_AUTO_ENCODING) { fprintf(stderr, "%s: Unknown character set!\n", argv[2]); + fclose(fp); return (1); } @@ -175,6 +176,7 @@ main(int argc, /* I - Argument Count */ if (cupsCharsetToUTF8(utf8dest, line, sizeof(utf8dest), encoding) < 0) { fprintf(stderr, "%s: Unable to convert line: %s", argv[1], line); + fclose(fp); return (1); }