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

[Xen-changelog] [qemu-xen-traditional stable-4.6] block-raw-posix: Fix memory leak in posix_aio_init()



commit 734b9a8f05418c6cdb21b4c3d24b9d35960595eb
Author:     Yunlei Ding <yunlei.ding@xxxxxxxxxx>
AuthorDate: Tue Mar 11 10:14:56 2014 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Fri Oct 16 16:52:07 2015 +0100

    block-raw-posix: Fix memory leak in posix_aio_init()
    
    Free allocated memory s before return.
    
    Signed-off-by: Yunlei Ding <yunlei.ding@xxxxxxxxxx>
    Coverity-ID: 1055915
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 block-raw-posix.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/block-raw-posix.c b/block-raw-posix.c
index 795cd5b..8a1baa8 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -602,6 +602,7 @@ static int posix_aio_init(void)
     s->first_aio = NULL;
     if (pipe(fds) == -1) {
         fprintf(stderr, "failed to create pipe\n");
+        qemu_free(s);
         return -errno;
     }
 
--
generated by git-patchbot for /home/xen/git/qemu-xen-traditional.git#stable-4.6

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.