From nobody Mon Feb 9 17:23:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1600070535; cv=none; d=zohomail.com; s=zohoarc; b=WkieM7cci1lNZ+1OGU9oCLeWpsp5hJQ4Xagy7a5FodcamfO+9ZXJDl8lJlgThs4lR9CGbKcFYtXMDHxLseP+Q5AUpHfkE/KQZpWLYS4EzPt108OgXmXqNXGA+m9ncpUHKzhrHdToRrYi4XeLPuomjTR+kbTNpII5LTUG5Te+r3I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600070535; h=Content-Type:Content-Transfer-Encoding:Cc: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=KinCrFZXsAr9PCXpffAZ6XUKKvYR6aHy7IYgsj7q++w=; b=FGBKBWWAD/N4rv3PQDDT2rYEuZbid9a5oV3Pd4C0IA+w09afBLlUBONdo+f1qD4WMqG9ko+fqrIWOGZ8MDnG1tGMOGmdR8uPuMAWaQqm0M4Y4ZgbqWz8s/TsLTolXDxeD4y30d7t4LNv2Y/Sj7KS94bO9hn9QHK4Ihn/eeq4iJM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1600070535184844.1744102784273; Mon, 14 Sep 2020 01:02: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-227-j2cACxWTMcelnmchVpKP7w-1; Mon, 14 Sep 2020 04:02:11 -0400 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 86592801AB1; Mon, 14 Sep 2020 08:02:06 +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 63C237A414; Mon, 14 Sep 2020 08:02:06 +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 328958C7C6; Mon, 14 Sep 2020 08:02:06 +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 08E825o1008749 for ; Mon, 14 Sep 2020 04:02:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id B7E111A8EC; Mon, 14 Sep 2020 08:02:05 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-156.ams2.redhat.com [10.36.112.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id EEEEA1A268; Mon, 14 Sep 2020 08:02:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600070534; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=KinCrFZXsAr9PCXpffAZ6XUKKvYR6aHy7IYgsj7q++w=; b=THhg5Oj/XzgZeswwycmivE/ayW3BrOIksDZs8QNGeP42sK+6DWYhtYEptbHhaYI0P46oGm p8Zlpp2xj+TtJlTHMGDg30YU0VNCx8Az4CafZ12qeKNRWVKTlTJesPMJEnuu6aZkEZkLRT PJVQa5zPr0YNUC62Gw2/c9l/E0oGitU= X-MC-Unique: j2cACxWTMcelnmchVpKP7w-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 2/7] util: Use glib memory functions in virErrorCopyNew Date: Mon, 14 Sep 2020 10:01:49 +0200 Message-Id: <20200914080154.26361-3-twiederh@redhat.com> In-Reply-To: <20200914080154.26361-1-twiederh@redhat.com> References: <20200914080154.26361-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.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" Signed-off-by: Tim Wiederhake --- src/util/virerror.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/util/virerror.c b/src/util/virerror.c index 6b057057a3..d89948f198 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -223,14 +223,8 @@ virCopyError(virErrorPtr from, virErrorPtr virErrorCopyNew(virErrorPtr err) { - virErrorPtr ret; - - if (VIR_ALLOC_QUIET(ret) < 0) - return NULL; - - if (virCopyError(err, ret) < 0) - VIR_FREE(ret); - + virErrorPtr ret =3D g_new0(virError, 1); + virCopyError(err, ret); return ret; } =20 --=20 2.26.2