]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virconf: Resolve a possible memory leak in virConfSetValue
authorJohn Ferlan <jferlan@redhat.com>
Fri, 9 Jan 2015 13:42:13 +0000 (08:42 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 12 Jan 2015 13:59:55 +0000 (08:59 -0500)
commitb789db36ae1cb5a48986c3b9e3bfb64131367872
tree789eb12f1da9490dacdb6ab276420841b2bc6663
parenta267f0153231983d767f7019e2ef7e7dfe6c8a97
virconf: Resolve a possible memory leak in virConfSetValue

Found this one by inspection... The API claims to "own" the input
value even in the case of error.  However, in the initial entry
to the API if the value exists, was STRING, but without a str value
it just returned without freeing the 'value' which it claims to now
own.  So I added the virConfFreeValue() call in order to resolve.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/util/virconf.c