qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block/blkdebug: fix memory leak
@ 2020-10-09 19:09 Elena Afanasova
  2020-10-09 19:56 ` Eric Blake
  2020-10-12 14:38 ` Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: Elena Afanasova @ 2020-10-09 19:09 UTC (permalink / raw)
  To: kwolf, mreitz, qemu-block, qemu-devel; +Cc: qemu-trivial

Spotted by PVS-Studio

Signed-off-by: Elena Afanasova <eafanasova@gmail.com>
---
 block/blkdebug.c | 1 +
 1 file changed, 1 insertion(+)

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) {
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-12 14:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-09 19:09 [PATCH] block/blkdebug: fix memory leak Elena Afanasova
2020-10-09 19:56 ` Eric Blake
2020-10-12 14:38 ` Laurent Vivier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).