]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virCommandAddEnv: Make stealing of argument more obvious
authorPeter Krempa <pkrempa@redhat.com>
Tue, 23 Feb 2021 07:43:08 +0000 (08:43 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Mar 2021 08:50:19 +0000 (09:50 +0100)
commit13a9075ceaf834344ac0fd7a0a92d8d1476bc30a
treec9cf96759ee16477fbd67be650b1500b35aafa08
parentb356a3ce7c42134cf63f543ce7899ed5638d4809
virCommandAddEnv: Make stealing of argument more obvious

The function is supposed to always consume the passed environment
variable string. Use a temp variable with autofree and g_steal_pointer
to prevent having to free it manually.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/util/vircommand.c