]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Fix memory leak in virAuthConfigLookup
authorJohn Ferlan <jferlan@redhat.com>
Tue, 16 Jun 2020 12:07:03 +0000 (08:07 -0400)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 16 Jun 2020 13:01:05 +0000 (15:01 +0200)
commitd25758141723d45aecd368ee3e5183ccb5c7eea2
treec6ee0142c1fca0c8cfdb6cdfcc5cca302af3797a
parentd585847d2e9c98ccb765027999824568c355ddc6
util: Fix memory leak in virAuthConfigLookup

Since 5084091a, @authcred is filled by a g_key_file_get_string which is
now an allocated string as opposed to some hash table lookup value, so
we need to treat it as so.

Found by Coverity

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/util/virauthconfig.c