]> Git Repo - qemu.git/commitdiff
pr-manager: Fix invalid g_free() crash bug
authorMarkus Armbruster <[email protected]>
Thu, 22 Aug 2019 13:38:46 +0000 (15:38 +0200)
committerKevin Wolf <[email protected]>
Tue, 10 Sep 2019 06:58:43 +0000 (08:58 +0200)
pr_manager_worker() passes its @opaque argument to g_free().  Wrong;
it points to pr_manager_worker()'s automatic @data.  Broken when
commit 2f3a7ab39be converted @data from heap- to stack-allocated.  Fix
by deleting the g_free().

Fixes: 2f3a7ab39bec4ba8022dc4d42ea641165b004e3e
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
scsi/pr-manager.c

index ee43663576ed32c3d27649157e83e6ea290ad92e..0c866e869835930767dacd3a0b218a75c2c16610 100644 (file)
@@ -39,7 +39,6 @@ static int pr_manager_worker(void *opaque)
     int fd = data->fd;
     int r;
 
-    g_free(data);
     trace_pr_manager_run(fd, hdr->cmdp[0], hdr->cmdp[1]);
 
     /* The reference was taken in pr_manager_execute.  */
This page took 0.021343 seconds and 4 git commands to generate.