a184563778
There are some error paths in blk_exp_add() that jump to 'fail:' before
'exp' is even created. So we can't just unconditionally access exp->blk.
Add a NULL check, and switch from exp->blk to blk, which is available
earlier, just to be extra sure that we really cover all cases where
BlockDevOps could have been set for it (in practice, this only happens
in drv->create() today, so this part of the change isn't strictly
necessary).
Fixes: Coverity CID 1509238
Fixes:
|
||
---|---|---|
.. | ||
export.c | ||
fuse.c | ||
meson.build | ||
vduse-blk.c | ||
vduse-blk.h | ||
vhost-user-blk-server.c | ||
vhost-user-blk-server.h | ||
virtio-blk-handler.c | ||
virtio-blk-handler.h |