r2372 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Wed Jan 23 11:13:43 CET 2008


Author: phk
Date: 2008-01-23 11:13:43 +0100 (Wed, 23 Jan 2008)
New Revision: 2372

Modified:
   trunk/varnish-cache/bin/varnishd/mgt_vcc.c
Log:
mgt_cli_askchild() always returns a pointer.

Coverity Scan (CID:12)


Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_vcc.c	2008-01-23 10:05:45 UTC (rev 2371)
+++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c	2008-01-23 10:13:43 UTC (rev 2372)
@@ -592,10 +592,12 @@
 	(void)priv;
 	vp = mcf_find_vcl(cli, av[2]);
 	if (vp != NULL && vp->active == 0) {
-		if (child_pid >= 0 &&
-		    mgt_cli_askchild(&status, &p, "vcl.use %s\n", av[2])) {
-			cli_result(cli, status);
-			cli_out(cli, "%s", p);
+		if (child_pid >= 0) {
+			if (mgt_cli_askchild(&status, &p,
+			    "vcl.use %s\n", av[2])) {
+				cli_result(cli, status);
+				cli_out(cli, "%s", p);
+			}
 			free(p);
 		} else {
 			vp->active = 2;




More information about the varnish-commit mailing list