scsi/pr-manager-helper: free path on finalization

set_path allocates path via g_strdup, but
pr_manager_helper_instance_finalize did not free it.

Fixes: 9bad2a6b9d ("scsi: add persistent reservation manager using qemu-pr-helper")
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau
2026-04-27 14:53:48 +04:00
parent c6edc5ee44
commit 19c2f45c5d

View File

@@ -284,6 +284,7 @@ static void pr_manager_helper_instance_finalize(Object *obj)
{
PRManagerHelper *pr_mgr = PR_MANAGER_HELPER(obj);
g_free(pr_mgr->path);
object_unref(OBJECT(pr_mgr->ioc));
qemu_mutex_destroy(&pr_mgr->lock);
}