|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 31/32] block-raw-posix: Fix memory leak in posix_aio_init()
From: Yunlei Ding <yunlei.ding@xxxxxxxxxx>
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 file changed, 1 insertion(+)
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;
}
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |