qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PULL v2 03/22] parallels: fix memory leak in parallels_open()


From: Denis V. Lunev
Subject: [PULL v2 03/22] parallels: fix memory leak in parallels_open()
Date: Thu, 21 Sep 2023 09:54:41 +0200

We should free opts allocated through qemu_opts_create() at the end.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
---
 block/parallels.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/parallels.c b/block/parallels.c
index 428f72de1c..af7be427c9 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -1217,6 +1217,7 @@ fail_format:
 fail_options:
     ret = -EINVAL;
 fail:
+    qemu_opts_del(opts);
     /*
      * "s" object was allocated by g_malloc0 so we can safely
      * try to free its fields even they were not allocated.
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]