--- Jason Gauthier <[EMAIL PROTECTED]> wrote:
> You'll need to free 'ep' when done with it.
> (Each iteration!)
>
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Friday, October 24, 2003 8:52 AM
> > To: [email protected]
> > Subject: Trying to find Memory leak in function
> >
> > Ok.. I have a function that seems to have (definately has) a
> > memory leak.
[SNIP]
> > if (dp != NULL)
> > {
> > while ( (ep = readdir (dp)) )
> > {
> > if ( ep->d_name[0] == '.' )
> > continue;
> >
> > victim = new_char();
> > victim->pcdata = new_pcdata();
> > fOld = FALSE;
> >
> > sprintf( buf2, "%s%s", PLAYER_DIR, capitalize( ep->d_name ) );
[SNIP]
Erm. Actually ep is something that he doesnt need to free (assuming his posix
libraries are up to the standards).