Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Payphone LIOU <lioupayphone@gmail.com>
Cc: linux-nfs <linux-nfs@vger.kernel.org>
Subject: Re: mem leak?
Date: Mon, 1 Sep 2008 17:20:04 -0400	[thread overview]
Message-ID: <20080901212003.GA13392@fieldses.org> (raw)
In-Reply-To: <200809011153057338447@gmail.com>

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.

      reply	other threads:[~2008-09-01 21:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-01  3:53 mem leak? Payphone LIOU
2008-09-01 21:20 ` J. Bruce Fields [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080901212003.GA13392@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=lioupayphone@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox