Fix crash when multiple event callbacks were registered

CVE-2013-2230

Don't overwrite the callback ID returned by
virDomainEventStateRegisterID in ret by 0.

Introduced by abf75aea.
(cherry picked from commit f38c8185f97720ecae7ef2291fbaa5d6b0209e17)
This commit is contained in:
Ján Tomko 2013-07-02 15:17:09 +02:00
parent b1eaa535db
commit 0b0b662059

View File

@ -9914,9 +9914,7 @@ qemuConnectDomainEventRegisterAny(virConnectPtr conn,
driver->domainEventState,
dom, eventID,
callback, opaque, freecb, &ret) < 0)
goto cleanup;
ret = 0;
ret = -1;
cleanup:
return ret;