From nobody Sun Feb 8 22:05:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1549651060911178.34345992097246; Fri, 8 Feb 2019 10:37:40 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C72B83F51; Fri, 8 Feb 2019 18:37:38 +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 E39CF17A66; Fri, 8 Feb 2019 18:37:37 +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 ABBBA3F7CD; Fri, 8 Feb 2019 18:37:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x18IbYXN007530 for ; Fri, 8 Feb 2019 13:37:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5BA064250; Fri, 8 Feb 2019 18:37:34 +0000 (UTC) Received: from unknown0050b6a41c42.attlocal.net.com (ovpn-117-20.phx2.redhat.com [10.3.117.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 01FF060C55; Fri, 8 Feb 2019 18:37:33 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Fri, 8 Feb 2019 13:36:55 -0500 Message-Id: <20190208183726.30903-2-jferlan@redhat.com> In-Reply-To: <20190208183726.30903-1-jferlan@redhat.com> References: <20190208183726.30903-1-jferlan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH v2 01/32] conf, util, qemu: Use VIR_STEAL_PTR for authdef processing 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 08 Feb 2019 18:37:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: John Ferlan Reviewed-by: Erik Skultety Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 3 +-- src/conf/storage_conf.c | 3 +-- src/qemu/qemu_parse_command.c | 3 +-- src/util/virstoragefile.c | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6772c327ed..a33f18c957 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7632,8 +7632,7 @@ virDomainHostdevSubsysSCSIiSCSIDefParseXML(xmlNodePtr= sourcenode, authdef->secrettype); goto cleanup; } - iscsisrc->src->auth =3D authdef; - authdef =3D NULL; + VIR_STEAL_PTR(iscsisrc->src->auth, authdef); } cur =3D cur->next; } diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 1ee31ca676..fbd62e1305 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -584,8 +584,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt, goto cleanup; } =20 - source->auth =3D authdef; - authdef =3D NULL; + VIR_STEAL_PTR(source->auth, authdef); } =20 /* Option protocol version string (NFSvN) */ diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c index c4650f01e0..679d49d442 100644 --- a/src/qemu/qemu_parse_command.c +++ b/src/qemu/qemu_parse_command.c @@ -133,8 +133,7 @@ qemuParseDriveURIString(virDomainDiskDefPtr def, virURI= Ptr uri, if (VIR_STRDUP(authdef->secrettype, secrettype) < 0) goto error; } - def->src->auth =3D authdef; - authdef =3D NULL; + VIR_STEAL_PTR(def->src->auth, authdef); =20 /* Cannot formulate a secretType (eg, usage or uuid) given * what is provided. diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 8319ba9c8c..98f9bc803f 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -2895,9 +2895,8 @@ virStorageSourceParseRBDColonString(const char *rbdst= r, if (VIR_STRDUP(authdef->secrettype, virSecretUsageTypeToString(VIR_SECRET_USAGE_TYP= E_CEPH)) < 0) goto error; - src->auth =3D authdef; + VIR_STEAL_PTR(src->auth, authdef); src->authInherited =3D true; - authdef =3D NULL; =20 /* Cannot formulate a secretType (eg, usage or uuid) given * what is provided. --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list