diff mbox series

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

Message ID 20230921075500.694585-4-den@openvz.org (mailing list archive)
State New, archived
Headers show
Series [PULL,v2,01/22] parallels: fix formatting in bdrv_parallels initialization | expand

Commit Message

Woodhouse, David" via Sept. 21, 2023, 7:54 a.m. UTC
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 mbox series


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:
     ret = -EINVAL;
+    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.