From nobody Tue May 13 22:23:15 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 1528400132549128.91760629670318; Thu, 7 Jun 2018 12:35:32 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 8066B308626B; Thu, 7 Jun 2018 19:35:31 +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 40FA960BE1; Thu, 7 Jun 2018 19:35:31 +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 E11F0180121C; Thu, 7 Jun 2018 19:35:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w57JZQN7018982 for ; Thu, 7 Jun 2018 15:35:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 32101308BDAE; Thu, 7 Jun 2018 19:35:26 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 28DA1308BDAA for ; Thu, 7 Jun 2018 19:35:23 +0000 (UTC) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) (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 A91F83680F for ; Thu, 7 Jun 2018 19:35:12 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id c22-v6so4988079pfi.2 for ; Thu, 07 Jun 2018 12:35:12 -0700 (PDT) Received: from centos.localdomain ([49.32.106.159]) by smtp.gmail.com with ESMTPSA id d23-v6sm86686407pfn.3.2018.06.07.12.35.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 12:35: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=YnmKKJYA97MfRt65O2VvT4DWo7k3mcJAOFpVqB6PoGU=; b=cV8cSz00/uPwqFw48n8LF9edRxiJfxwQmWzaKsHxnh8RAGpQmyjwcqZVtcxFxViJk4 12ZscyyWGpym4VKqwv7MMFeCTAAaAIrfT9NbehrhpoSDPRbSyZDHPArV2mAKaMWIJdOq XPXTG+iRb8cLc+QGhzO238p/paL0SyvrXWxoTL76kZ17surbrwcZlR+POqb8TTaiNJik lBxlVlwVyx3amLCyM3q8KMkgJDG3198nsj9cu0I3Wh+f6z45ejUwnKfKY9JQlD5Xagp0 4L8PO1/Kf4Z9yOj1Xf1pn955ZhzU8OSFoKI9fZMWKRnUmL44sfVQSRlvbFcivapBGRXP XYVw== 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=YnmKKJYA97MfRt65O2VvT4DWo7k3mcJAOFpVqB6PoGU=; b=KqMGSxQcHjhiro3rNVo0cNGAoHVA8ttC44KwT5plEFeKIUX9sb3g9bcD37uKsJ1bCn 0EYqd+FLHZpCCanEleAUk+sxl/yaYIu1PJLeizqhJqDZJCSOmBz/HWoK5ww5t6SB/nas Br4jn7HYOiKWSM93C/X2w/XB8+rk7n44hEd0pcQp6cddisMEKB1ESTYg5uqomtFrGSke 9M3MgSdeRFq/ReMYCrXxOtq/q16g+f7tw83oTKDH/ngnBKW+//fJeJGXQiUHSk0znYoB eA/FMOAcRx8q/mej7PVhjx5SFzhg6kZeHy70Ps9F4wplKbOX8CjgfL4B18nmWt/6h4Ou jsbw== X-Gm-Message-State: APt69E3POykXZAj3XU0o/cXkA2rgN0NeSR8Ta7H78/ZW8K4OgyoCuGns RcFpGl0RLInjn2wKsp3+mPDNKcE3 X-Google-Smtp-Source: ADUXVKJLeVtxBJOYF6Wf46GrN8UF9WQi6MEL2oOaKqnUDMnE2+wFAXKLaW7r0S8O9wXWqKjM3am6Iw== X-Received: by 2002:a63:63c4:: with SMTP id x187-v6mr2665100pgb.9.1528400110257; Thu, 07 Jun 2018 12:35:10 -0700 (PDT) From: Sukrit Bhatnagar To: libvir-list@redhat.com Date: Fri, 8 Jun 2018 01:04:30 +0530 Message-Id: <1528400083-6788-9-git-send-email-skrtbhtngr@gmail.com> In-Reply-To: <1528400083-6788-1-git-send-email-skrtbhtngr@gmail.com> References: <1528400083-6788-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.30]); Thu, 07 Jun 2018 19:35:12 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 07 Jun 2018 19:35:12 +0000 (UTC) for IP:'209.85.192.195' DOMAIN:'mail-pf0-f195.google.com' HELO:'mail-pf0-f195.google.com' FROM:'skrtbhtngr@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.511 (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, T_DKIM_INVALID) 209.85.192.195 mail-pf0-f195.google.com 209.85.192.195 mail-pf0-f195.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v1 08/21] util: authconfig: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 07 Jun 2018 19:35:32 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Using the VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. --- src/util/virauthconfig.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/virauthconfig.h b/src/util/virauthconfig.h index ac0ceeb..375ccad 100644 --- a/src/util/virauthconfig.h +++ b/src/util/virauthconfig.h @@ -24,6 +24,7 @@ # define __VIR_AUTHCONFIG_H__ =20 # include "internal.h" +# include "viralloc.h" =20 typedef struct _virAuthConfig virAuthConfig; typedef virAuthConfig *virAuthConfigPtr; @@ -42,4 +43,6 @@ int virAuthConfigLookup(virAuthConfigPtr auth, const char *credname, const char **value); =20 +VIR_DEFINE_AUTOPTR_FUNC(virAuthConfigPtr, virAuthConfigFree) + #endif /* __VIR_AUTHCONFIG_H__ */ --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list