]> xenbits.xensource.com Git - libvirt.git/commit
xen_xm: Resolve Coverity USE_AFTER_FREE
authorJohn Ferlan <jferlan@redhat.com>
Wed, 27 Aug 2014 11:48:37 +0000 (07:48 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 27 Aug 2014 16:52:27 +0000 (12:52 -0400)
commitcfbbeb36cf204fb2d87d45c5b8e9e676afefdfcd
treee08f6126578f07779fc7ec5093473d75546bc4f8
parent0454f23c3125ef7bd3ffd1f5fa9643c108d9a4d4
xen_xm: Resolve Coverity USE_AFTER_FREE

If virDomainDiskDefFree(disk) is called in 'skipdisk:', then it's possible
to either return to skipdisk without reallocating a new disk (via the if
condition just prior) or to end the loop having deleted the disk. Since
virDomainDiskDefFree() does not pass by reference, disk isn't changed in
this context, thus the possible issue.
src/xenconfig/xen_xm.c