X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Martin Str|mberg Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP scandir and alphasort example code Date: Wed, 27 Mar 2013 09:23:18 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 14 Message-ID: References: <261476b1-c137-495d-95df-a92075cd9960 AT googlegroups DOT com> <2245ebea-be44-4a40-8b2f-7ef5e0e67157 AT googlegroups DOT com> <5f806b56-af98-4f72-8984-a944be9348a4 AT googlegroups DOT com> <6b49a77b-dcba-4c23-8a29-4ac0263e7713 AT googlegroups DOT com> NNTP-Posting-Host: ftvAZcRvOze4hbePWaim7g.user.speranza.aioe.org X-Complaints-To: abuse AT aioe DOT org User-Agent: tin/1.4.7-20030322 ("Suggestions") (UNIX) (SunOS/5.9 (sun4u)) X-Notice: Filtered by postfilter v. 0.8.2 Bytes: 1400 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Georg Potthast wrote: > Anyway below is what I wanted to post. Maybe someone can tell what is wrong with the glob() usage part. I don't know. I just want to warn you about your memory leak. > //dynamic tdir array allocation > static struct dirent *tdir; > tdir = (struct dirent*) calloc(cnt,sizeof(struct dirent)); I can't see where you free tdir. Memory leak. -- MartinS