Commit 959a7b3e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Release the esi_data storage when we release the object storage

it refers to.
parent b4916ea1
......@@ -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--;
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment