diff options
author | Kevin Wolf <kwolf@redhat.com> | 2011-09-22 14:21:30 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-10-11 09:41:47 +0200 |
commit | 449c184ed23c6238da7fcc8b965c8fcc865d72a9 (patch) | |
tree | 3de875cff621745716291e503a9ab5787139c888 /linux-aio.c | |
parent | 55b949c84761ade81ca93b2596ea45b09ad6d60a (diff) | |
download | qemu-449c184ed23c6238da7fcc8b965c8fcc865d72a9.zip qemu-449c184ed23c6238da7fcc8b965c8fcc865d72a9.tar.gz qemu-449c184ed23c6238da7fcc8b965c8fcc865d72a9.tar.bz2 |
linux-aio: Fix laio_submit error handling
The error handling order was in the wrong order, so that either the ACB would
be leaked or the counter would be decremented when it shouldn't.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'linux-aio.c')
-rw-r--r-- | linux-aio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-aio.c b/linux-aio.c index bffa6cd..50da75d 100644 --- a/linux-aio.c +++ b/linux-aio.c @@ -185,10 +185,10 @@ BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd, goto out_dec_count; return &laiocb->common; -out_free_aiocb: - qemu_aio_release(laiocb); out_dec_count: s->count--; +out_free_aiocb: + qemu_aio_release(laiocb); return NULL; } |