[master] 959a7b3 Release the esi_data storage when we release the object storage it refers to.
Poul-Henning Kamp
phk at varnish-cache.org
Mon Feb 7 17:49:20 CET 2011
commit 959a7b3e02c78a03da7706eeac27088245fd887e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Feb 7 16:48:53 2011 +0000
Release the esi_data storage when we release the object storage
it refers to.
diff --git a/bin/varnishd/cache_hash.c b/bin/varnishd/cache_hash.c
index 3694a75..88a809c 100644
--- a/bin/varnishd/cache_hash.c
+++ b/bin/varnishd/cache_hash.c
@@ -691,10 +691,6 @@ HSH_Deref(struct worker *w, struct objcore *oc, struct object **oo)
DSL(0x40, SLT_Debug, 0, "Object %u workspace min free %u",
o->xid, WS_Free(o->ws_o));
- if (o->esidata != NULL) {
- STV_free(o->esidata);
- o->esidata = NULL;
- }
if (oc != NULL)
oc_freeobj(oc);
w->stats.n_object--;
diff --git a/bin/varnishd/stevedore.c b/bin/varnishd/stevedore.c
index ef61bfd..8e0ee36 100644
--- a/bin/varnishd/stevedore.c
+++ b/bin/varnishd/stevedore.c
@@ -301,6 +301,10 @@ STV_Freestore(struct object *o)
{
struct storage *st, *stn;
+ if (o->esidata != NULL) {
+ STV_free(o->esidata);
+ o->esidata = NULL;
+ }
VTAILQ_FOREACH_SAFE(st, &o->store, list, stn) {
CHECK_OBJ_NOTNULL(st, STORAGE_MAGIC);
VTAILQ_REMOVE(&o->store, st, list);
More information about the varnish-commit
mailing list