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>
This commit is contained in:
parent
9d94747262
commit
095ed5be7b
@ -667,6 +667,7 @@ int paio_init(void)
|
|||||||
s->first_aio = NULL;
|
s->first_aio = NULL;
|
||||||
if (qemu_pipe(fds) == -1) {
|
if (qemu_pipe(fds) == -1) {
|
||||||
fprintf(stderr, "failed to create pipe\n");
|
fprintf(stderr, "failed to create pipe\n");
|
||||||
|
g_free(s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user