Commit 39e5492b authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

The storage element may be empty on fetch fail

A failed fetch won't have the storage trimmed, which may result in an
empty storage element in the body list. Do not assert on non-empty
size in the simple iterator.

Fixes: #2186
parent 44b50556
......@@ -260,8 +260,7 @@ sml_iterator(struct worker *wrk, struct objcore *oc,
if (boc == NULL) {
VTAILQ_FOREACH_SAFE(st, &obj->list, list, checkpoint) {
AN(st->len);
if (ret == 0)
if (ret == 0 && st->len > 0)
ret = func(priv, 1, st->ptr, st->len);
if (final) {
VTAILQ_REMOVE(&obj->list, 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