From nobody Sun Feb 8 12:51:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1580140876535609.6339270389302; Mon, 27 Jan 2020 08:01:16 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-146-so7EDw2mO6SzFomuKUS7nw-1; Mon, 27 Jan 2020 11:00:54 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2F2FA107ACC4; Mon, 27 Jan 2020 16:00:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F318489E7D; Mon, 27 Jan 2020 16:00:44 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8CBB18577A; Mon, 27 Jan 2020 16:00:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00RG0M6q005235 for ; Mon, 27 Jan 2020 11:00:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id 961A485747; Mon, 27 Jan 2020 16:00:22 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.43.2.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 203AB811FA for ; Mon, 27 Jan 2020 16:00:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580140875; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=FEpOfYoX16cIxHw/GFj04d5aTW5F7BvkyK2LhBEuRcU=; b=LI3kp/Px7asjkCInRjg946Br8cPI1DKs5PPOo+l1sdbeBT7+GNiN93hY2kTfe3o67QmES2 JF9EQO+3Vzwrx3UMnaRUD5aHCJbPsia+IJBOL58QlYEOUd5dn3ECiydR9ypjrJ1bGP5u9n hcwQweTVjHlrrb8XO+YMhQQxVO7mfLE= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 4/4] qemu: snapshot: go through cleanup on error Date: Mon, 27 Jan 2020 17:00:13 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: so7EDw2mO6SzFomuKUS7nw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" A recent commit added an error check for too-nested backing chains followed by a return, even though errors above jump to cleanup. Signed-off-by: J=C3=A1n Tomko Fixes: b168fa88b85dec181882816ab65a59a6c4500667 --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index fc080b4a48..048855b533 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14654,7 +14654,7 @@ qemuDomainSnapshotCreateInactiveExternal(virQEMUDri= verPtr driver, snapdisk->src->format =3D VIR_STORAGE_FILE_QCOW2; =20 if (qemuDomainStorageSourceValidateDepth(defdisk->src, 1, defdisk-= >dst) < 0) - return -1; + goto cleanup; =20 /* creates cmd line args: qemu-img create -f qcow2 -o */ if (!(cmd =3D virCommandNewArgList(qemuImgPath, --=20 2.21.0