aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-11-11 10:40:08 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-11-11 12:49:52 -0600
commit095ed5be7b61b7168020f0b807c9789b277a3956 (patch)
tree180666e7fb17469af0109c2390de1f224f50b7a7
parent9d9474726274d0e1c420f055849a0e3058cad0e4 (diff)
posix-aio-compat: Plug memory leak on paio_init() error path
Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--posix-aio-compat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/posix-aio-compat.c b/posix-aio-compat.c
index d3c1174ebf..0c0035cb18 100644
--- a/posix-aio-compat.c
+++ b/posix-aio-compat.c
@@ -667,6 +667,7 @@ int paio_init(void)
s->first_aio = NULL;
if (qemu_pipe(fds) == -1) {
fprintf(stderr, "failed to create pipe\n");
+ g_free(s);
return -1;
}