[master] 14ea7ff2e assert that the destination pointer for vcl_get be zero

Nils Goroll nils.goroll at uplex.de
Mon Jan 27 15:21:06 UTC 2020


commit 14ea7ff2ea7da98d216899fe642ccc93a760287b
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Jan 22 09:42:04 2020 +0100

    assert that the destination pointer for vcl_get be zero
    
    This is already implied in the code (because otherwise we would
    potentially leak a vcl reference (busy counter)).
    
    (yes, I have run make check with this)

diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index 66b8ff775..4dc504b03 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -260,6 +260,7 @@ void
 vcl_get(struct vcl **vcc, struct vcl *vcl)
 {
 	AN(vcc);
+	AZ(*vcc);
 
 	Lck_Lock(&vcl_mtx);
 	if (vcl == NULL)


More information about the varnish-commit mailing list