[master] bf3912448 lck: Make it clear that we take ilck away

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon May 10 13:14:07 UTC 2021


commit bf3912448125e62702ea4696910f9df20c6b0f9b
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon May 10 15:08:05 2021 +0200

    lck: Make it clear that we take ilck away

diff --git a/bin/varnishd/cache/cache_lck.c b/bin/varnishd/cache/cache_lck.c
index c3c726708..3e507119c 100644
--- a/bin/varnishd/cache/cache_lck.c
+++ b/bin/varnishd/cache/cache_lck.c
@@ -269,9 +269,8 @@ Lck_Delete(struct lock *lck)
 {
 	struct ilck *ilck;
 
-	CAST_OBJ_NOTNULL(ilck, lck->priv, ILCK_MAGIC);
+	TAKE_OBJ_NOTNULL(ilck, &lck->priv, ILCK_MAGIC);
 	ilck->stat->destroy++;
-	lck->priv = NULL;
 	AZ(pthread_mutex_destroy(&ilck->mtx));
 	FREE_OBJ(ilck);
 }


More information about the varnish-commit mailing list