Mailing List Archive

r2493 - trunk/varnish-cache/bin/varnishreplay
Author: des
Date: 2008-02-17 09:54:53 +0100 (Sun, 17 Feb 2008)
New Revision: 2493

Modified:
trunk/varnish-cache/bin/varnishreplay/varnishreplay.c
Log:
Make sure buf is freed in error case (Coverity CID#9)


Modified: trunk/varnish-cache/bin/varnishreplay/varnishreplay.c
===================================================================
--- trunk/varnish-cache/bin/varnishreplay/varnishreplay.c 2008-02-17 08:53:01 UTC (rev 2492)
+++ trunk/varnish-cache/bin/varnishreplay/varnishreplay.c 2008-02-17 08:54:53 UTC (rev 2493)
@@ -363,7 +363,8 @@
(2048 < length - nbuf ? 2048 : length - nbuf));
if (n <= 0) {
thread_log(0, "failed reading the block\n");
- return (-1);
+ nbuf = -1;
+ break;
}
nbuf += n;
}