]> git.ipfire.org Git - thirdparty/libvirt.git/commit
capabilities: reduce scope in virCapabilitiesInitCaches()
authorShaleen Bathla <shaleen.bathla@oracle.com>
Mon, 20 Mar 2023 10:39:56 +0000 (16:09 +0530)
committerJán Tomko <jtomko@redhat.com>
Mon, 20 Mar 2023 13:29:38 +0000 (14:29 +0100)
commit9a3bccf6956aa8cd6c878e32e0ac70114fada30f
treef00bbe1a310f27c24218ad034693dfaf1f1adfdd
parent27d8bcc337c45f08af56211deccf8f77d9561888
capabilities: reduce scope in virCapabilitiesInitCaches()

over-writing a variable in inner while-loop without freeing previous memory
leaks it over time.
To fix this, we can just change scope of bank variable to the inner loop.

Signed-off-by: Shaleen Bathla <shaleen.bathla@oracle.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Fixes: 5c84485439ee63f40002c04914e111395c598db0
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/conf/capabilities.c