summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorElena Afanasova2020-10-09 21:09:59 +0200
committerLaurent Vivier2020-10-13 13:33:46 +0200
commit5b4c95d0a377fe4d898572d35ec5d82b6f89338d (patch)
tree837e98968f5858b68e8fb00f3dc3c37667c2d0b4 /block
parenthw/pci: Fix typo in PCI hot-plug error message (diff)
downloadqemu-5b4c95d0a377fe4d898572d35ec5d82b6f89338d.tar.gz
qemu-5b4c95d0a377fe4d898572d35ec5d82b6f89338d.tar.xz
qemu-5b4c95d0a377fe4d898572d35ec5d82b6f89338d.zip
block/blkdebug: fix memory leak
Spotted by PVS-Studio Signed-off-by: Elena Afanasova <eafanasova@gmail.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1e903f928eb3da332cc95e2a6f87243bd9fe66e4.camel@gmail.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'block')
-rw-r--r--block/blkdebug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c
index eecbf3e5c4..54da719dd1 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -215,6 +215,7 @@ static int add_rule(void *opaque, QemuOpts *opts, Error **errp)
BLKDEBUG_IO_TYPE__MAX, &local_error);
if (local_error) {
error_propagate(errp, local_error);
+ g_free(rule);
return -1;
}
if (iotype != BLKDEBUG_IO_TYPE__MAX) {