]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virxml: Fix possible memory leak in virXMLNodeContentString()
authorKristina Hanicova <khanicov@redhat.com>
Wed, 17 Mar 2021 16:43:19 +0000 (17:43 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 18 Mar 2021 11:45:05 +0000 (12:45 +0100)
commitaaa98e3cfac4dd1c9af9f831b1cbd99c5ac83cd0
treef53e4f24b35ae2281aaaeca259938345a82dc542
parent4d09f35f577e47571335285faf1544b41ebcfde8
virxml: Fix possible memory leak in virXMLNodeContentString()

Previously, if xml node passed to the virXMLNodeContentString()
was not of type XML_ELEMENT_NODE, @ret could have caused a memory
leak because xmlNodeGetContent() works for other types of nodes
as well.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virxml.c