提交 405a2764 编写于 作者: K Kevin Wolf 提交者: Stefan Hajnoczi

rbd: Fix leaks in rbd_start_aio() error path

Signed-off-by: NKevin Wolf <kwolf@redhat.com>
Reviewed-by: NBenoit Canet <benoit@irqsave.net>
Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 d6635c4d
......@@ -685,13 +685,16 @@ static BlockDriverAIOCB *rbd_start_aio(BlockDriverState *bs,
}
if (r < 0) {
goto failed;
goto failed_completion;
}
return &acb->common;
failed_completion:
rbd_aio_release(c);
failed:
g_free(rcb);
qemu_vfree(acb->bounce);
qemu_aio_release(acb);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册