]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix possible memory leak in util/virxml.c
authorPavel Hrdina <phrdina@redhat.com>
Mon, 13 Jan 2014 14:06:03 +0000 (15:06 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Wed, 15 Jan 2014 10:11:34 +0000 (11:11 +0100)
commit67fbf129fc8727c98f7c4123c12a48938ccdf3fa
treed82185d4465d9bf0f3751e8c42f2a6e7f3ff74a7
parent788e6cb25bbcdbef6fe945ac1533a40faf8f4293
Fix possible memory leak in util/virxml.c

A "xmlstr" string may not be assigned into a "doc" pointer and it
could cause memory leak. To fix it if the "doc" pointer is NULL and
the "xmlstr" string is not assigned we should free it.

This has been found by coverity.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/util/virxml.c