]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuagenttest: Don't leak virTypedParameter on failure
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 1 Nov 2021 09:34:33 +0000 (10:34 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 11 Nov 2021 15:16:02 +0000 (16:16 +0100)
commitac35a9fca2664a7c276fbc569581223fe193dba1
tree2d5b4c57fbd5cdced3d5efdebc007fc23ca5dcf2
parent061b691cffd00dae3423bdf4a5efe5c2cb59eb5d
qemuagenttest: Don't leak virTypedParameter on failure

There are two functions (testQemuAgentOSInfo() and
testQemuAgentTimezone()) which call virTypedParamsFree() only in
successful paths. If an error is met then those parameters would
be leaked. Fix this by placing the virTypedParamsFree() calls on
better place.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
tests/qemuagenttest.c