Re: mem leak?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 01, 2008 at 11:53:07AM +0800, Payphone LIOU wrote:
> Hi, linux-nfs :
> 			
>   in nfs-utils1.1.3,  procedure "get_exportlist()" would malloc() some
>   memory for storing the directories and groups for "showmount".
>   obviously those memory are not released when the procedure ends.
>   once mountd received a signal for quiting itself(eg : kill -9 `pidof
>   mountd`), it will call "killer()" for some exiting-works. but those
>   memory allocated in "get_exportlist()" were not released. memory
>   leak? i am not sure. :-(

You're talking about the allocation done on this line?:

	e = (struct exportnode *) xmalloc(sizeof(*e));

>From a quick glance, it looks like the code tries to free that up the
next time get_exportlist() is called, in that first loop over elist.  I
haven't tried to figure out whether that code's correct, though; maybe
you have?  Patches always welcome.

--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux