diff options
author | Kevin Wolf <kwolf@redhat.com> | 2014-06-05 16:19:26 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-06-06 11:05:04 +0200 |
commit | 405a27640b33c31ccef4001b3f3936b8c9d2218f (patch) | |
tree | 58ef45728a54c43ce329ae52c8fdef9b9d498a15 | |
parent | d6635c4dbbcfca7f5bd379dd970617fc3430428f (diff) |
rbd: Fix leaks in rbd_start_aio() error path
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r-- | block/rbd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/rbd.c b/block/rbd.c index a78760b7fe..93639f783c 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -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; } |