From: hno <> Date: Fri, 12 May 2006 22:05:10 +0000 (+0000) Subject: Bug #1558 (cosmetic): cachmgr leaks a stdio buffer X-Git-Tag: SQUID_3_0_PRE4~140 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ab5fa7518f0a8da451bda8275dca9bc26111321c;p=thirdparty%2Fsquid.git Bug #1558 (cosmetic): cachmgr leaks a stdio buffer --- diff --git a/tools/cachemgr.cc b/tools/cachemgr.cc index ebe73803b5..ecb8c882e7 100644 --- a/tools/cachemgr.cc +++ b/tools/cachemgr.cc @@ -1,6 +1,6 @@ /* - * $Id: cachemgr.cc,v 1.1 2006/05/11 01:36:57 hno Exp $ + * $Id: cachemgr.cc,v 1.2 2006/05/12 16:05:10 hno Exp $ * * DEBUG: section 0 CGI Cache Manager * AUTHOR: Duane Wessels @@ -626,6 +626,7 @@ read_reply(int s, cachemgr_request * req) while ((reply=recv(s, buf , sizeof(buf), 0)) > 0) fwrite(buf, 1, reply, fp); + close(s); rewind(fp); #endif @@ -745,7 +746,7 @@ read_reply(int s, cachemgr_request * req) } } - close(s); + fclose(fp); return 0; }