]> xenbits.xensource.com Git - libvirt.git/commit
util: Fix memory leak in virAuthGetCredential
authorJohn Ferlan <jferlan@redhat.com>
Tue, 16 Jun 2020 12:07:02 +0000 (08:07 -0400)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 16 Jun 2020 13:01:05 +0000 (15:01 +0200)
commitd585847d2e9c98ccb765027999824568c355ddc6
treefefd655ffb56e9197805895ae5735373cec00a40
parent3a58613b0cf6a29960b909e6fd7420639ff794bd
util: Fix memory leak in virAuthGetCredential

Since 5084091a, @tmp 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/remote/remote_driver.c
src/util/virauth.c
src/util/virauthconfig.c
src/util/virauthconfig.h
tests/virauthconfigtest.c