]> git.ipfire.org Git - thirdparty/libvirt.git/commit
parallels: fix possible crash in case of errors in prlsdkLoadDomain
authorMaxim Nestratov <mnestratov@parallels.com>
Thu, 21 May 2015 13:49:35 +0000 (16:49 +0300)
committerDmitry Guryanov <dguryanov@parallels.com>
Mon, 25 May 2015 21:11:13 +0000 (00:11 +0300)
commit55714f78c4309c89f35db2bbb5ab48872493b4ec
treeceb69c3901ddc07c0b68f1b07a2170762a93fd66
parentdc58e7424ac1c06a464d2ed7a50cc01d38e0f7ac
parallels: fix possible crash in case of errors in prlsdkLoadDomain

Cleanup code in prlsdkLoadDomain doesn't take into account the fact
if private domain structure along with freeing function is assigned
or not. In case it is, we shouldn't call it manually because
virDomainObjListRemove calls it and frees pdom.
Also, allocated def structure should be freed only if it's not
assigned to domain. Otherwise it will be called twice: one time by
virDomainObjListRemove and the second by prlsdkLoadDomain itself.

Signed-off-by: Maxim Nestratov <mnestratov@parallels.com>
src/parallels/parallels_sdk.c