]> git.cworth.org Git - obsolete/notmuch-old/commit
Free the results of scandir()
authorEthan Glasser-Camp <ethan@betacantrips.com>
Tue, 7 Feb 2012 10:05:03 +0000 (05:05 -0500)
committerDavid Bremner <bremner@debian.org>
Wed, 15 Feb 2012 03:44:30 +0000 (23:44 -0400)
commit5f39979a4aa2aea7d587201702fa3443248334bd
tree37841c9a67391cbc996bd89658ddd03a6fdecfa8
parentd8bff4b3af412cd56283e6e2cda256b79d2fd40b
Free the results of scandir()

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.

entry only points to elements of namelist, so we don't free it
separately.
notmuch-new.c