• Nils Goroll's avatar
    Fix surplus vcldir cleanup · c096659d
    Nils Goroll authored
    in VRT_AddDirector, we create the new vcldir with an initial
    reference, which we need to drop if we can not add it.
    
    Compare:
    
    	VRT_AddDirector()
    		...
    		vdir->refcnt++;
    
    	vcldir_free()
    		...
    		AZ(vdir->refcnt);
    
    Noticed when testing other experimental changes while working on
    https://github.com/nigoroll/libvmod-dynamic/issues/110
    
     #5  0x000055820c8cb845 in VAS_Fail (func=0x55820c904559 "vcldir_free", file=0x55820c903a47 "cache/cache_vrt_vcl.c",
         line=150, cond=0x55820c90459a "(vdir->refcnt) == 0", kind=VAS_ASSERT) at vas.c:67
     #6  0x000055820c83a442 in vcldir_free (vdir=0x7f662aa53140) at cache/cache_vrt_vcl.c:150
     #7  0x000055820c839fe1 in VRT_AddDirector (ctx=0x7f662befe250, m=0x55820c965260 <vbe_methods_noprobe>,
         priv=0x7f662aa20780, fmt=0x55820c900f7f "%s") at cache/cache_vrt_vcl.c:219
     #8  0x000055820c7c7c4d in VRT_new_backend_clustered (ctx=0x7f662befe250, vc=0x0, vrt=0x7f662befdd10, via=0x0)
        at cache/cache_backend.c:737
     #9  0x000055820c7c8632 in VRT_new_backend (ctx=0x7f662befe250, vrt=0x7f662befdd10, via=0x0)
         at cache/cache_backend.c:755
    c096659d
Name
Last commit
Last update
..
varnishadm Loading commit data...
varnishd Loading commit data...
varnishhist Loading commit data...
varnishlog Loading commit data...
varnishncsa Loading commit data...
varnishstat Loading commit data...
varnishtest Loading commit data...
varnishtop Loading commit data...
Makefile.am Loading commit data...
flint.lnt Loading commit data...