[libvirt] [PATCH 2/4] qemuDomainAttachDeviceLiveAndConfig: Don't overwrite @ret

Peter Krempa pkrempa at redhat.com
Fri Apr 26 14:20:13 UTC 2019


On Fri, Apr 26, 2019 at 15:52:21 +0200, Michal Privoznik wrote:
> If we're attaching a device to both inactive and live XML then
> @ret is overwritten which may result in incorrect return value.
> For instance, if attaching to inactive XML succeeds, @ret is
> assigned value of zero and control proceeds to attaching the
> device to live XML. Here, if say
> virDomainDeviceValidateAliasForHotplug() fails the control jumps
> over to 'cleanup' label and zero is returned indicating success.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/qemu/qemu_driver.c | 23 +++++++++++------------
>  1 file changed, 11 insertions(+), 12 deletions(-)

ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190426/55a54b89/attachment-0001.sig>


More information about the libvir-list mailing list