]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virtpm: Fix @path handling in virTPMEmulatorInit()
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 25 Feb 2021 10:58:38 +0000 (11:58 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 2 Mar 2021 08:49:23 +0000 (09:49 +0100)
commit144cb28e6b1a1c26a1cd00864432c161785e0307
tree8f5321298947457b1c3cceec7930a13ec727b819
parent25ebb45a81603335b6e2344c633ef925c1c6b520
virtpm: Fix @path handling in virTPMEmulatorInit()

This function finds "swtmp", "swtpm_setup" and "swtpm_ioctl"
binaries in $PATH and stores resolved paths in global variables
so that they can be obtainer later. Anyway, the resolved path is
marked as g_autofree and to avoid its freeing later on in the
function the variable is set to NULL manually. Well, we have
g_steal_pointer() for that.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virtpm.c