]> xenbits.xensource.com Git - libvirt.git/commit
lxc: Resolve memory leak
authorJohn Ferlan <jferlan@redhat.com>
Thu, 20 Sep 2018 20:50:37 +0000 (16:50 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 24 Sep 2018 13:44:37 +0000 (09:44 -0400)
commit996f101431a28e19b8546049674a1a014b5559f7
tree429a3ddaa6469e0de433bb40965afd8664cf0a5a
parentf6399b9d8966a1572e1b908a7a777be7b960f590
lxc: Resolve memory leak

Commit 40b5c99a modified the virConfGetValue callers to use
virConfGetValueString. However, using the virConfGetValueString
resulted in leaking the returned @value string in each case.
So, let's modify each instance to use the VIR_AUTOFREE(char *)
syntax. In some instances changing the variable name since
@value was used more than once.

Found by Coverity

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/lxc/lxc_native.c