[libvirt] [PATCH 2/2] vz: Don't try to jump on a non-existent label in prlsdkRemoveBootDevices()

Ján Tomko jtomko at redhat.com
Wed Jan 8 09:05:37 UTC 2020


On Wed, Jan 08, 2020 at 09:52:12AM +0100, Michal Privoznik wrote:
>Commit v5.10.0-522-g9000b2f298 was too aggressive and removed the
>'error' label from prlsdkRemoveBootDevices() even though it's
>used. Luckily, it's used only from one place and we have an
>alternative for it that doesn't require the label.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> src/vz/vz_sdk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Ah, the dangers of changing code without compile-testing it.

>diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
>index 71ca1a9148..f820634cd2 100644
>--- a/src/vz/vz_sdk.c
>+++ b/src/vz/vz_sdk.c
>@@ -2725,7 +2725,7 @@ prlsdkRemoveBootDevices(PRL_HANDLE sdkdom)
>     PRL_DEVICE_TYPE devType;
>
>     pret = PrlVmCfg_GetBootDevCount(sdkdom, &devCount);
>-    prlsdkCheckRetGoto(pret, error);
>+    prlsdkCheckRetExit(pret, -1);
>
>     for (i = 0; i < devCount; i++) {
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

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


More information about the libvir-list mailing list