qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 36/42] rbd: Fix leaks in rbd_start_aio() error path


From: Stefan Hajnoczi
Subject: [Qemu-devel] [PULL 36/42] rbd: Fix leaks in rbd_start_aio() error path
Date: Fri, 6 Jun 2014 18:13:57 +0200

From: Kevin Wolf <address@hidden>

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Reviewed-by: Josh Durgin <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
 block/rbd.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/block/rbd.c b/block/rbd.c
index a78760b..93639f7 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;
 }
-- 
1.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]