Linux NFS development
 help / color / mirror / Atom feed
* mem leak?
@ 2008-09-01  3:53 Payphone LIOU
  2008-09-01 21:20 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Payphone LIOU @ 2008-09-01  3:53 UTC (permalink / raw)
  To: linux-nfs; +Cc: bfields

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. :-(
 

Payphone LIOU 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mem leak?
  2008-09-01  3:53 mem leak? Payphone LIOU
@ 2008-09-01 21:20 ` J. Bruce Fields
  0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2008-09-01 21:20 UTC (permalink / raw)
  To: Payphone LIOU; +Cc: linux-nfs

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-01 21:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-01  3:53 mem leak? Payphone LIOU
2008-09-01 21:20 ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox