From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 44DB6431FB6 for ; Tue, 7 Feb 2012 02:30:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.01 X-Spam-Level: X-Spam-Status: No, score=0.01 tagged_above=-999 required=5 tests=[T_MIME_NO_TEXT=0.01] 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 oA+Z4U1gZX8w for ; Tue, 7 Feb 2012 02:30:18 -0800 (PST) Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66]) by olra.theworths.org (Postfix) with ESMTP id 7DA50431FAE for ; Tue, 7 Feb 2012 02:30:18 -0800 (PST) Received: by guru.guru-group.fi (Postfix, from userid 501) id 5487268055; Tue, 7 Feb 2012 12:30:17 +0200 (EET) From: Tomi Ollila 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+164~g6619341 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" 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: Tue, 07 Feb 2012 10:30:19 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Tue, 7 Feb 2012 05:05:03 -0500, Ethan Glasser-Camp = wrote: > From: Ethan Glasser-Camp >=20 > 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. >=20 > entry only points to elements of namelist, so we don't free it > separately. > --- +1 Tomi --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFPMP05oEBNrhe2D3URAtIiAJsH3W1dFLa7XkPHOJa0VSBgASz4GQCgmHAo SV1oWmyyaPivI+D9cS2+Sik= =K9a/ -----END PGP SIGNATURE----- --=-=-=--