r5183 - trunk/varnish-cache/lib/libvcl

phk at varnish-cache.org phk at varnish-cache.org
Wed Sep 8 11:41:01 CEST 2010


Author: phk
Date: 2010-09-08 11:41:00 +0200 (Wed, 08 Sep 2010)
New Revision: 5183

Modified:
   trunk/varnish-cache/lib/libvcl/vcc_vmod.c
Log:
Do not dereference vmod until the meta function has been run.



Modified: trunk/varnish-cache/lib/libvcl/vcc_vmod.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_vmod.c	2010-09-08 09:00:43 UTC (rev 5182)
+++ trunk/varnish-cache/lib/libvcl/vcc_vmod.c	2010-09-08 09:41:00 UTC (rev 5183)
@@ -80,9 +80,6 @@
 	EncString(tl->fi, fn, NULL, 0);
 	Fi(tl, 0, ");\n");
 
-	/* XXX: zero the function pointer structure */
-	Ff(tl, 0, "\tVRT_Vmod_Fini(&VGC_vmod_%.*s);\n", PF(mod));
-
 	SkipToken(tl, ';');
 
 	hdl = dlopen(fn, RTLD_NOW | RTLD_LOCAL);
@@ -138,4 +135,7 @@
 		}
 	}
 	Fh(tl, 0, "\n%s\n", proto);
+
+	/* XXX: zero the function pointer structure */
+	Ff(tl, 0, "\tVRT_Vmod_Fini(&VGC_vmod_%.*s);\n", PF(mod));
 }




More information about the varnish-commit mailing list