From nobody Wed May 14 01:30:01 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 1528124745872884.3506066669247; Mon, 4 Jun 2018 08:05:45 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A28F630BFEDE; Mon, 4 Jun 2018 15:05:43 +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 62DB63001A5E; Mon, 4 Jun 2018 15:05:43 +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 CD1D4180BA80; Mon, 4 Jun 2018 15:05:42 +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 w54Eb2rG008189 for ; Mon, 4 Jun 2018 10:37:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9F5C3308BDB0; Mon, 4 Jun 2018 14:37:02 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 967A5308BDAE for ; Mon, 4 Jun 2018 14:37:02 +0000 (UTC) Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) (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 9DCA630B8990 for ; Mon, 4 Jun 2018 14:36:51 +0000 (UTC) Received: by mail-pf0-f196.google.com with SMTP id z24-v6so1889691pfe.7 for ; Mon, 04 Jun 2018 07:36:51 -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.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 07:36:50 -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=1kGa7e3WZPzYnXf4Eq42CpJ3QXd9xSH5QLIo35lbIOc=; b=gEAEX27HKKeBrrkpMVZDWSnAnCkHIgSwyXJf3oZq0s1v6AebCU4NbvpELA0HaHx5av mn70dkGn8tqwTWoZZVo4ZwNHU9/iq/qJmSZVjnWM2VCwOkSdBWzm6cCKBD/8fjNCXJ/P Hm8yEeDCrIOU73bvowBudiESLDQUQ9JQ7+OESEzJibikuEwOvbEQIFSF7vXifTm2o5CF +trTk1QXEByVucxs4WMS75O4+62V2ja6dYaqvcSdH/tb7l2yCexVg2AkJWHneTfhwwZ/ X3S4PRLm/vZIxs65S5y4INC9I8KRIQQ/Lz+xy3Mb0wdOQ9Bh/18qkgxCVhcuZoZgtdWn kKsg== 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=1kGa7e3WZPzYnXf4Eq42CpJ3QXd9xSH5QLIo35lbIOc=; b=Q8FjsSifxP6HkU0uc8V8kG/LzJEjZexZErtI6BeZAIK0UgrMg0JDXplgEA5POt0Tbt VowWnOcBKZiPfITIku6nYn2mrLD4bFex1GR7gQ3cihyFwJn4nUot3kwpeckyUkRUOjB/ HodH8tO8FIkmZIz5rSYgQPyZLKKC7BzgGz1dpCdbMApPd1HHtogBry9shoqaarw2Z7yE U9FcJ2LIIArWjwCaQnpc0BHRkmXXDcFerh4JWVwv5j4tL6hZhailx5hitAf/46+TmMls hR5KktD1IItbuLKLZBcrOVcJYosMpCzMSz8DsizO/1ihBoDqaOmLV/iufOWeT7YpinnA hs2w== X-Gm-Message-State: ALKqPwckp2myVPHfe0TAtHDj/gHswGfhj5T6uwQPR6g+0LhnnNCbsZbs zb+g90UDHrTdCQGfipIuMGj9ptrL X-Google-Smtp-Source: ADUXVKLN9so+PLeLGx3+rzfFLWDk3tJyzP3l6bs0pfW39iDbAj7Yl3ndi/vQPNrQOVtV7VNTflFkow== X-Received: by 2002:a62:3e11:: with SMTP id l17-v6mr21797341pfa.18.1528123010701; Mon, 04 Jun 2018 07:36:50 -0700 (PDT) From: Sukrit Bhatnagar To: libvir-list@redhat.com Date: Sun, 3 Jun 2018 13:42:11 +0530 Message-Id: <1528013536-22196-14-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.43]); Mon, 04 Jun 2018 14:36:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 04 Jun 2018 14:36:51 +0000 (UTC) for IP:'209.85.192.196' DOMAIN:'mail-pf0-f196.google.com' HELO:'mail-pf0-f196.google.com' FROM:'skrtbhtngr@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.991 (DATE_IN_PAST_24_48, 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.196 mail-pf0-f196.google.com 209.85.192.196 mail-pf0-f196.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v1 13/18] use VIR_AUTOFREE in src/util/virfdstream.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.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 04 Jun 2018 15:05:45 +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/virfdstream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virfdstream.c b/src/util/virfdstream.c index e4973a2..e7befbc 100644 --- a/src/util/virfdstream.c +++ b/src/util/virfdstream.c @@ -431,7 +431,7 @@ virFDStreamThreadDoRead(virFDStreamDataPtr fdst, virFDStreamMsgPtr msg =3D NULL; int inData =3D 0; long long sectionLen =3D 0; - char *buf =3D NULL; + VIR_AUTOFREE(char *) buf =3D NULL; ssize_t got; =20 if (sparse && *dataLen =3D=3D 0) { @@ -496,7 +496,6 @@ virFDStreamThreadDoRead(virFDStreamDataPtr fdst, return got; =20 error: - VIR_FREE(buf); virFDStreamMsgFree(msg); return -1; } --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list