From: Amos Jeffries Date: Thu, 1 Oct 2015 12:22:44 +0000 (-0700) Subject: negotiate_wrapper: Fix bad pointer comparisons in rev.14290 X-Git-Tag: SQUID_4_0_1~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e070222904761cfa0c9234bd93f2825b784b712c;p=thirdparty%2Fsquid.git negotiate_wrapper: Fix bad pointer comparisons in rev.14290 Detected by Coverity Scan. Issues 1324560, 1324561, 1324562, 1324563 --- diff --git a/helpers/negotiate_auth/wrapper/negotiate_wrapper.cc b/helpers/negotiate_auth/wrapper/negotiate_wrapper.cc index 705820eb0f..4d359c0cbc 100644 --- a/helpers/negotiate_auth/wrapper/negotiate_wrapper.cc +++ b/helpers/negotiate_auth/wrapper/negotiate_wrapper.cc @@ -95,13 +95,13 @@ void usage(void) static void closeFds(FILE *a, FILE *b, FILE *c, FILE *d) { - if (a >= 0) + if (a) fclose(a); - if (b >= 0) + if (b) fclose(b); - if (c >= 0) + if (c) fclose(c); - if (d >= 0) + if (d) fclose(d); }