From nobody Wed May 14 01:22:12 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 1528123980691948.2883043371231; Mon, 4 Jun 2018 07:53:00 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 892EBECF9B; Mon, 4 Jun 2018 14:52:56 +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 15183600C8; Mon, 4 Jun 2018 14:52:56 +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 53F6918005DF; Mon, 4 Jun 2018 14:52:55 +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 w54Eakdf008098 for ; Mon, 4 Jun 2018 10:36:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id E6D0A308BDAF; Mon, 4 Jun 2018 14:36:46 +0000 (UTC) Received: from mx1.redhat.com (ext-mx17.extmail.prod.ext.phx2.redhat.com [10.5.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DE67A308BDAE for ; Mon, 4 Jun 2018 14:36:46 +0000 (UTC) Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) (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 B8B4130CADE7 for ; Mon, 4 Jun 2018 14:36:35 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id c9-v6so11715004pgf.5 for ; Mon, 04 Jun 2018 07:36:35 -0700 (PDT) Received: from centos.localdomain ([42.106.2.208]) by smtp.gmail.com with ESMTPSA id f63-v6sm23448806pfe.143.2018.06.04.07.36.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 07:36:34 -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=s2qMJ2Tp/vbElWv3lNioZ8IWR96pXElEPCkmCXf6VcM=; b=aDcgQyZPpzva0l+Yaobe4QP62da83LoHXUsvuiGS6ojRJpfAuNwcD5CcL/s0o2PXnB aEJ32s6sLT5m5upM7JMC5RAmvMpF7Xdim18tgpi2YOqM5u2TiIr+RNj1TXFJzMr8EVJQ Kn/GICT35PMHjvxU0q9Wqm7/ZxPrTy1VgWVIlCDcaPWUBCmbyK9W7oMigzKpid4Ct83Q ohQGh0mvi5ksame3QvT9tbSHWiUPQrcxe7dP102X/ba9NYH/Xj0WvWs8ETdCsxgz9YO/ OVfbADmDdbYEhdz3RNGUNC9XdwD8AFYxZL4dDAfyvJd1RJqz/URAD7OTQywV5pPFU68H BeJg== 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=s2qMJ2Tp/vbElWv3lNioZ8IWR96pXElEPCkmCXf6VcM=; b=ZtzC9X+gBDyJ35UliU/p2deNPhnD0NC1P1hQ4nSaLG6OdfTQYJz08pDkjslO83i0fR F+oesXyzbzYamzCruIKpNcKRk6woKih3iKUcKP4ai3qAR+KDZhAPbky3lgECivQTZ6fj 5q4IWcEpOuIaaA0qPAdrtY/VG62Zxkh5zTmUSbRWKIchFv/5HBDkYeVOmKEeHxJf9Cbh 6Mqv61dLDXBvrguUV0g+pHLl+6i65Jz+vm10g+Fyfy2wuWGhOBHEDWerut4rr1dzoHw+ RMeqazI0coZOYe59CLDgLfK+/Q3VFfTKSMwbpV1J6K1mls3xXJivZhO+4BPBWQBda4Pl KR/w== X-Gm-Message-State: ALKqPwfs3Fl5hgdStIPF4Pk6Q1PP6/DRBhVp9o7h180oML2Vttl6cE5i kS94CbDL13P+pQOptHziEbftBWsq X-Google-Smtp-Source: ADUXVKIOj6XSHKUkuZtvqvrr5dDUihfo3UsN7Uy5j5vMHxmL+gzRWXws8+uByYwqVD5JmAV361OkkA== X-Received: by 2002:a65:61d1:: with SMTP id j17-v6mr14543948pgv.447.1528122994878; Mon, 04 Jun 2018 07:36:34 -0700 (PDT) From: Sukrit Bhatnagar To: libvir-list@redhat.com Date: Sun, 3 Jun 2018 13:42:04 +0530 Message-Id: <1528013536-22196-7-git-send-email-skrtbhtngr@gmail.com> In-Reply-To: <1528013536-22196-1-git-send-email-skrtbhtngr@gmail.com> References: <1528013536-22196-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.46]); Mon, 04 Jun 2018 14:36:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 04 Jun 2018 14:36:35 +0000 (UTC) for IP:'74.125.83.66' DOMAIN:'mail-pg0-f66.google.com' HELO:'mail-pg0-f66.google.com' FROM:'skrtbhtngr@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.766 * (DATE_IN_PAST_24_48, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 74.125.83.66 mail-pg0-f66.google.com 74.125.83.66 mail-pg0-f66.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.46 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v1 06/18] use VIR_AUTOFREE in src/util/viraudit.c 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 04 Jun 2018 14:52:59 +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" Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/viraudit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/viraudit.c b/src/util/viraudit.c index 0085dc3..a49d458 100644 --- a/src/util/viraudit.c +++ b/src/util/viraudit.c @@ -97,7 +97,7 @@ void virAuditSend(virLogSourcePtr source, virAuditRecordType type ATTRIBUTE_UNUSED, bool success, const char *fmt, ...) { - char *str =3D NULL; + VIR_AUTOFREE(char *) str =3D NULL; va_list args; =20 /* Duplicate later checks, to short circuit & avoid printf overhead @@ -144,7 +144,6 @@ void virAuditSend(virLogSourcePtr source, } } #endif - VIR_FREE(str); } =20 void virAuditClose(void) --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list