From nobody Sun Feb 8 17:46:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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 (zoho.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 ARC-Seal: i=1; a=rsa-sha256; t=1571576175; cv=none; d=zoho.com; s=zohoarc; b=TC3/P0qRwgwXXX1WxK6WDiblsGNTOvHWXhJOBHO7qvaIulopMK7JGVPpxvhqfrsz07KG9/ypUTU+4qZNSoiYB4wcyFGepuLej/3SeK9AoWc4HFevdLax+69BRy3LZYiUW3AXWM7TKUq8frloEVrb0nguigGWm5jYK/e0pkfgHCg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571576175; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BH/+0tiF1ZuwP6eHlx/jQKaR4ktlbCNTz0r1iZGtgeo=; b=izlDvsa3OGbQskIMijw6ifcFQKIUXeGFTAmsH0sbeud6M/WjNeY1nqLTec69vLgnsexLvm5AkpLGGZ0b9bWtz3hjqARgg3VFttktRMIYwfB3kxGGvJrD6ZBPqJxYiiBIF7IodYSPYI5rzpzNF0/fs0IZq8D+QNCRWqD3hvyxxXI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 157157617536661.82116147779311; Sun, 20 Oct 2019 05:56:15 -0700 (PDT) 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-30-RKYoIWqUOHGf3ujZs6xGYw-1; Sun, 20 Oct 2019 08:56:12 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C0B181800DFD; Sun, 20 Oct 2019 12:56:07 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9C6C2194B9; Sun, 20 Oct 2019 12:56:07 +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 60D62180B761; Sun, 20 Oct 2019 12:56:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9KCtXEe023314 for ; Sun, 20 Oct 2019 08:55:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 74AD8196AE; Sun, 20 Oct 2019 12:55:33 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-23.brq.redhat.com [10.40.200.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id D108D194B9 for ; Sun, 20 Oct 2019 12:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571576174; 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=BH/+0tiF1ZuwP6eHlx/jQKaR4ktlbCNTz0r1iZGtgeo=; b=NcGel4JMBKtM1dhcoZZVbGROMRocRRjz6jaVDA1xOH2kOBvwHYw3TQe/uhFn2YjQ6rak1O asYbUmsHiEcWHQzBUmw/BtBoUVEcYPRxr7LuogUIlCCASX+R+LLqidKPF0aIegY82VWDoE B/uim2Awv3xq+ZiC9+MFnJV6Rp2c59I= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Sun, 20 Oct 2019 14:55:20 +0200 Message-Id: <5dbc5f6c7009cd13d50529243805c2c9df140050.1571575889.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 02/34] util: fix check for iscsi initiator copy 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.84 on 10.5.11.23 X-MC-Unique: RKYoIWqUOHGf3ujZs6xGYw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" virStorageSourceInitiatorCopy propagates the return value from VIR_STRDUP, which returns 1 on a successful copy. Only error out on < 0, not non-zero values. Fixes: 9ea3fdc6e90a96e3d7d7aeb9867e8f0a3992b7c6 Signed-off-by: J=C3=A1n Tomko --- src/util/virstoragefile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index e04cc413a4..acf26721e7 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -2331,7 +2331,7 @@ virStorageSourceCopy(const virStorageSource *src, !(def->pr =3D virStoragePRDefCopy(src->pr))) return NULL; =20 - if (virStorageSourceInitiatorCopy(&def->initiator, &src->initiator)) + if (virStorageSourceInitiatorCopy(&def->initiator, &src->initiator) < = 0) return NULL; =20 if (backingChain && src->backingStore) { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list