]> git.ipfire.org Git - thirdparty/libvirt.git/commit
domain: avoid potential memory leak in virDomainGraphicsListenSet*()
authorLaine Stump <laine@laine.org>
Tue, 10 Feb 2015 19:04:40 +0000 (14:04 -0500)
committerLaine Stump <laine@laine.org>
Wed, 11 Feb 2015 16:05:35 +0000 (11:05 -0500)
commit6d1194ffc08499922d6518bbf910941eedb26ea6
tree8fbce3f15f484915b0d495c180a47ffbfb5c93cf
parent699299419b4d079a57fc7faa5e819403ba198381
domain: avoid potential memory leak in virDomainGraphicsListenSet*()

virDomainGraphicsListenSetAddress() and
virDomainGraphicsListenSetNetwork() both set their respective char* to
NULL directly when asked to set it to NULL, which is okay as long as
it's already set to NULL. If these functions are ever called to clear
a listen object that has a valid string in address or network, it will
end up leaking the old value. Currently that doesn't happen, so this
is just a preemptive strike.
src/conf/domain_conf.c