From 422083689bcac0a7fd78e903897e4a775678c505 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Wed, 15 Feb 2012 23:47:56 +2000 Subject: [PATCH] Re: [PATCH] Free the results of scandir() --- 43/a8b5a3c7895ca99340e592618d9a2619c4c606 | 67 +++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 43/a8b5a3c7895ca99340e592618d9a2619c4c606 diff --git a/43/a8b5a3c7895ca99340e592618d9a2619c4c606 b/43/a8b5a3c7895ca99340e592618d9a2619c4c606 new file mode 100644 index 000000000..f5e231d7a --- /dev/null +++ b/43/a8b5a3c7895ca99340e592618d9a2619c4c606 @@ -0,0 +1,67 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 9A394431FBD + for ; Tue, 14 Feb 2012 19:48:13 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id IJ7AQCgWzmlr for ; + Tue, 14 Feb 2012 19:48:13 -0800 (PST) +Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id E9951431FBC + for ; Tue, 14 Feb 2012 19:48:12 -0800 (PST) +Received: from zancas.localnet + (fctnnbsc30w-142166230117.dhcp-dynamic.FibreOp.nb.bellaliant.net + [142.166.230.117]) (authenticated bits=0) + by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id q1F3lvu2009408 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); + Tue, 14 Feb 2012 23:47:57 -0400 +Received: from bremner by zancas.localnet with local (Exim 4.77) + (envelope-from ) + id 1RxVqW-0003Bd-SV; Tue, 14 Feb 2012 23:47:56 -0400 +From: David Bremner +To: Ethan Glasser-Camp , notmuch@notmuchmail.org +Subject: Re: [PATCH] Free the results of scandir() +In-Reply-To: <1328609103-7870-1-git-send-email-glasse@cs.rpi.edu> +References: <1328609103-7870-1-git-send-email-glasse@cs.rpi.edu> +User-Agent: Notmuch/0.11.1+188~ga5674c2 (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-pc-linux-gnu) +Date: Tue, 14 Feb 2012 23:47:56 -0400 +Message-ID: <871upw3ggj.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Cc: Ethan Glasser-Camp +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 15 Feb 2012 03:48:13 -0000 + +On Tue, 7 Feb 2012 05:05:03 -0500, Ethan Glasser-Camp wrote: +> From: Ethan Glasser-Camp +> +> scandir() returns "strings allocated via malloc(3)" which are then +> "collected in array namelist which is allocated via +> malloc(3)". Currently we just free the array namelist. Instead, free +> all the entries of namelist, and then free namelist. + +pushed, thanks + +d -- 2.26.2