From nobody Sun Feb 8 22:08:36 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=1571755568; cv=none; d=zoho.com; s=zohoarc; b=drTsvFPaNCIoN0iMZfNrJS0cJwBMre/YEvkZ9sNAVy5zXUcEeSRG1syCq2HgvAh3pckSSTUtSC7qFj+8zv7/4AgzNiZ2nvDtTYRKtMFkO/t5+lNZS5307XoixMaxUycJ6iVvb1upJj2e+MlQEkqZBJop1pFIgujZO8OUXYnD9lI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571755568; 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=gqKsqr9+ucvgVUW00HbWDYKts4VHdDwMVOSCYJC3Pls=; b=ViSUkYzi7l4OYSnb1pW9b53dOSRvPMa47T8XV2LyBiI0Sq9GJPRPUcvEDBiq8FyxuHGnX2Qchqu17u1MJAnG6w2XA1xAASMX7LOiQKqIU94Kg8RIwhSnOuAMV0G9o4NlWxk/dnKiTuETzMrsVBe9yfC8ksrJ27c6XMv/yxzI24s= 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-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1571755568724941.395883920509; Tue, 22 Oct 2019 07:46:08 -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-90-S7Ui8XLAPSy2l9oej2wWBw-1; Tue, 22 Oct 2019 10:46:04 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D7419801E5F; Tue, 22 Oct 2019 14:45:58 +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 A295C60126; Tue, 22 Oct 2019 14:45:58 +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 4CDB018037C9; Tue, 22 Oct 2019 14:45:58 +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 x9MEjsfo006468 for ; Tue, 22 Oct 2019 10:45:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id F029952D1; Tue, 22 Oct 2019 14:45:54 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 52C9F52CC; Tue, 22 Oct 2019 14:45:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571755567; 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=gqKsqr9+ucvgVUW00HbWDYKts4VHdDwMVOSCYJC3Pls=; b=XdsA0hOL9NHKyveB9/k7UlxnvTGNpHUp08p7e0bMdMFWB1WxGnLXBCeObqLJblYvVMoV3N fKJ2oW25zMucVRFFhNKMUWJ/1oNULJDQ9jOdAdBT2merCJzSjlh+xQxioLM7hxWow/+GLX nQD6w6jynNFvB2xScYc3/HYJh/698uE= From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 22 Oct 2019 16:45:45 +0200 Message-Id: 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 Cc: Peter Krempa Subject: [libvirt] [PATCH 2/4] remote: Replace VIR_ALLOC_N with g_new0 in remoteRelayDomainEventGraphics 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.11 X-MC-Unique: S7Ui8XLAPSy2l9oej2wWBw-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" Allocate the array of graphics identity objects using g_new0 to allow droppint the 'error' label. Signed-off-by: Peter Krempa --- src/remote/remote_daemon_dispatch.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon= _dispatch.c index f53c79fec8..392a32fed8 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -596,8 +596,7 @@ remoteRelayDomainEventGraphics(virConnectPtr conn, data.remote.service =3D g_strdup(remote->service); data.subject.subject_len =3D subject->nidentity; - if (VIR_ALLOC_N(data.subject.subject_val, data.subject.subject_len) < = 0) - goto error; + data.subject.subject_val =3D g_new0(remote_domain_event_graphics_ident= ity, data.subject.subject_len); for (i =3D 0; i < data.subject.subject_len; i++) { data.subject.subject_val[i].type =3D g_strdup(subject->identities[= i].type); @@ -619,11 +618,6 @@ remoteRelayDomainEventGraphics(virConnectPtr conn, } return 0; - - error: - xdr_free((xdrproc_t)xdr_remote_domain_event_lifecycle_msg, - (char *) &data); - return -1; } static int --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list