parallels: fix memory leak in parallels_open()

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>
This commit is contained in:
Denis V. Lunev 2023-09-18 20:00:40 +02:00
parent 73f3e13692
commit c74cd7bd32
1 changed files with 1 additions and 0 deletions

View File

@ -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.