At this point, voldef has been added into pool->volumes.objs[], but
voldef hasn't been NULLed out yet, so there is an extra pointer to it.
If you goto cleanup, you will end up calling
virStorageVolDefFree(voldef), so that object will get freed, but
pool->volumes.objs still has a pointer to it.

You either need to NULL out voldef, or remove it from
pool->volumes.objs[] (ie, just decrement the count). I'm too tired to
figure out which is more appropriate :-)