From nobody Mon Feb 9 16:20:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1638543671; cv=none; d=zohomail.com; s=zohoarc; b=UsolTRjI3SWcXbttYgpUWYebA9ovRLgUwQ07EtT/ekRN9oFSjueX8AcNF/X3JA6z77uM0zSmKbdK/18W6nG9Ca6t8K/zveMtEi64zcRxLXELGbM4TMyZ2lThItyVOraWwywCmVrX+Fj2i3SaXwk7FeDNGP7vnV1BMzDieHidttc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638543671; 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=tBkqmqX2IESO3U/ABMKU5lFYqSn2LP1pEyMGGldmZVI=; b=NeCMyCOGdRHJ6R4zYoBEWRtzbjw1n2k4iw0uqEzDLBKpZ9BMeSwPpHU7SvNLgp3QRgkhgvpzM9icDtitQb0d+yfTIcKmj9h2a0D+K+Iaq01u2lMuiRc0hr/llXwPGpMU62gE1gYFlMdbVK86Q04die8TS8M66u2tiNdk/f0XbnU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1638543671402286.8110961716143; Fri, 3 Dec 2021 07:01:11 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-572-2Kxe3z7pPEejyH05KqPICg-1; Fri, 03 Dec 2021 10:01:08 -0500 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 329C0100CCE7; Fri, 3 Dec 2021 15:00:48 +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 E7C8145D79; Fri, 3 Dec 2021 15:00:47 +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 A96FD1802FEA; Fri, 3 Dec 2021 15:00:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1B3Evuvl029645 for ; Fri, 3 Dec 2021 09:57:56 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2C28F10023AE; Fri, 3 Dec 2021 14:57:56 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E60B10016F5 for ; Fri, 3 Dec 2021 14:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638543670; 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=tBkqmqX2IESO3U/ABMKU5lFYqSn2LP1pEyMGGldmZVI=; b=VMJdPDHLtyFizXkyjNM7JGDnIyDxmAJa7tO3+6qHjGLtu29a31TSAdCiLVRycba2PR4WME E+f3iww3CVYZniAfFd7BVFyFv1ME4NM7OfpQ4jifVri7HmPLVcs+x/np9+VsZn2l9UyDKN cW5CiEWKbbVMswIdPrpQL2MAu6OJ/xc= X-MC-Unique: 2Kxe3z7pPEejyH05KqPICg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 10/16] tests/virnetdaemontest.c: testExecRestart: Automatically free virJSONValue-s Date: Fri, 3 Dec 2021 15:57:37 +0100 Message-Id: <9d49986dda2d85d727ace9faf133cbba53b20dbb.1638543041.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1638543672808100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa --- tests/virnetdaemontest.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index 70af1480df..24f4761bb7 100644 --- a/tests/virnetdaemontest.c +++ b/tests/virnetdaemontest.c @@ -273,8 +273,8 @@ static int testExecRestart(const void *opaque) g_autofree char *outfile =3D NULL; g_autofree char *injsonstr =3D NULL; g_autofree char *outjsonstr =3D NULL; - virJSONValue *injson =3D NULL; - virJSONValue *outjson =3D NULL; + g_autoptr(virJSONValue) injson =3D NULL; + g_autoptr(virJSONValue) outjson =3D NULL; int fdclient[2] =3D { -1, -1 }, fdserver[2] =3D { -1, -1 }; if (socketpair(PF_UNIX, SOCK_STREAM, 0, fdclient) < 0) { @@ -351,8 +351,6 @@ static int testExecRestart(const void *opaque) VIR_TEST_DEBUG("Test should have failed"); ret =3D -1; } - virJSONValueFree(injson); - virJSONValueFree(outjson); virObjectUnref(dmn); VIR_FORCE_CLOSE(fdserver[0]); VIR_FORCE_CLOSE(fdserver[1]); --=20 2.31.1