From nobody Wed Jul 16 12:32:37 2025 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1533818012741355.0315455500753; Thu, 9 Aug 2018 05:33:32 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 79F0481115; Thu, 9 Aug 2018 12:33:30 +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 3D2A95E1BA; Thu, 9 Aug 2018 12:33:30 +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 E5361181A386; Thu, 9 Aug 2018 12:33:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w79CXEgS000516 for ; Thu, 9 Aug 2018 08:33:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 32014CAE67; Thu, 9 Aug 2018 12:33:14 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2BF57CB184 for ; Thu, 9 Aug 2018 12:33:11 +0000 (UTC) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB75080F7B for ; Thu, 9 Aug 2018 12:33:10 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id a14-v6so2682134pgv.10 for ; Thu, 09 Aug 2018 05:33:10 -0700 (PDT) Received: from centos.localdomain ([49.33.163.55]) by smtp.gmail.com with ESMTPSA id j15-v6sm8649810pfn.52.2018.08.09.05.33.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Aug 2018 05:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=+QkN2z4KJU24VG9TfQLduifw+1QwS/ggd0iWflP32Ks=; b=KWYRabPJJmVxsYbECZCFjuHZjirNw4fn4b0TmIN9W0sT2NblqMq9YoPHZa48FL15Ee T9+jkeH9icT1kG5ZGVQUFrOD30XhB1tutz4KpwdAL2CdlJipGNxZ0e2inRDekxy6aj6j FAWTB4JUwEi8nKb7vc5U738GwUrLLCrfeF9u6k9yVdmMImTUEF2RPWamBY1PuLsFuo5F UjFERtFRpErpCR7Ycv2JKymDd5aNI9PNXw8bdSVXMCh+EFaH+ZX1Gk5vK2IRO3bOErTz 9sWAPGyYQXD9qmQuPNBYBwPkdS0YxtJfXtGHgw7CZiH7hznHcPWTThi6kiWaYFQonI1k fKvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=+QkN2z4KJU24VG9TfQLduifw+1QwS/ggd0iWflP32Ks=; b=rrb4ZR/qUdebEXRX8DOGgezoE13x/L+Sotyr7hzl3oJYwnq9CyZyMtLgpF1aw3nIV9 oWYTtMXrDDbrbu5za4YxNmjSMPtHVoPEuXyJikauFGioK/ePxkEXleTRATmaVQZLPVJI R2sEEP8qXf7CiPaHmWhN7dTjWE34xc0ttWxchQTx+FzWLT5ifgL3HSX83hDeM2B8qY0k kTk1+yfbXqMOFsKkIrxfz1AFZ4v/LM/xFn3o1j4kGtYoW5PueHk6/ypPwKRb9YxKR2oy xTqAWljCo47AUIdl0aijMflBmviGtUFHjiVMeDhpDgDKjsMUy1mQ/fJ6BXPlsbLRhHhw Jnhw== X-Gm-Message-State: AOUpUlEhjWcbgajol6pNurgDdAsFJFSdR/LRWsv3BpulpE4MAIGgokKR cVSFeEBwPRCrOwG9DIgThyjkggbg X-Google-Smtp-Source: AA+uWPxZktwthUj30QfqPQ3EEKeNhzoujuVZqwuulnuHaEaucGRBK3ZqUYSAnjUflQm5HH5L/rOMZA== X-Received: by 2002:aa7:8713:: with SMTP id b19-v6mr2180987pfo.151.1533817989910; Thu, 09 Aug 2018 05:33:09 -0700 (PDT) From: Sukrit Bhatnagar To: libvir-list@redhat.com Date: Thu, 9 Aug 2018 09:42:19 +0530 Message-Id: <1533787939-28634-12-git-send-email-skrtbhtngr@gmail.com> In-Reply-To: <1533787939-28634-1-git-send-email-skrtbhtngr@gmail.com> References: <1533787939-28634-1-git-send-email-skrtbhtngr@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 09 Aug 2018 12:33:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 09 Aug 2018 12:33:10 +0000 (UTC) for IP:'209.85.215.193' DOMAIN:'mail-pg1-f193.google.com' HELO:'mail-pg1-f193.google.com' FROM:'skrtbhtngr@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.973 (DATE_IN_PAST_06_12, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.215.193 mail-pg1-f193.google.com 209.85.215.193 mail-pg1-f193.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 11/11] util: qemu: use VIR_AUTOPTR for aggregate types 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: , MIME-Version: 1.0 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 09 Aug 2018 12:33:31 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar --- src/util/virqemu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/virqemu.c b/src/util/virqemu.c index bc78853..1cd2b93 100644 --- a/src/util/virqemu.c +++ b/src/util/virqemu.c @@ -281,6 +281,7 @@ virQEMUBuildDriveCommandlineFromJSON(virJSONValuePtr sr= cdef) cleanup: virBufferFreeAndReset(&buf); return ret; + } =20 =20 --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list