Commit 31a65a99 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Storage allocation failues happen, let other code deal with it.

Fixes #927
parent cdda8895
......@@ -371,7 +371,7 @@ vfp_esi_end(struct sess *sp)
assert(l > 0);
/* XXX: This is a huge waste of storage... */
sp->obj->esidata = STV_alloc(sp, l);
AN(sp->obj->esidata);
XXXAN(sp->obj->esidata);
memcpy(sp->obj->esidata->ptr, VSB_data(vsb), l);
sp->obj->esidata->len = l;
VSB_delete(vsb);
......
......@@ -191,7 +191,8 @@ stv_alloc(const struct sess *sp, size_t size)
if (++fail == 50) /* XXX Param */
break;
}
CHECK_OBJ_NOTNULL(st, STORAGE_MAGIC);
if (st != NULL)
CHECK_OBJ_NOTNULL(st, STORAGE_MAGIC);
return (st);
}
......
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