pcp
[Top] [All Lists]

Re: [pcp] [patch] memory leak in xfs project quotas

To: Nathan Scott <nscott@xxxxxxxxxx>
Subject: Re: [pcp] [patch] memory leak in xfs project quotas
From: Martin Hicks <mort@xxxxxxx>
Date: Thu, 7 May 2009 08:38:42 -0500
Cc: pcp@xxxxxxxxxxx
In-reply-to: <1135334126.4560841241653519852.JavaMail.root@xxxxxxxxxxxxxxxxxx>
References: <20090506191613.GR14353@xxxxxxxxxxxxxxxxxxxxxxxxx> <1135334126.4560841241653519852.JavaMail.root@xxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.17 (2007-11-01)
On Thu, May 07, 2009 at 09:45:19AM +1000, Nathan Scott wrote:
> 
> > In the linux PMDA.  Any complaints with this patch?
> > 
> > The changes at the beginning just get rid of whitespace annoyances.
> > The last two hunks are what fix the problem.
> 
> Good catch!

valgrind is a very nice tool...

> > -           continue;
> > +           goto next;
> >         if (sts != PMDA_CACHE_INACTIVE) {
> >             qp = (project_t *)malloc(sizeof(project_t));
> 
> This malloc return code is unchecked too - the filesys code
> further on just (silently) continues on this class of error,
> guess we should do the same thing here (well, "goto next" on
> a NULL "qp") as SIGSEGV here would take out pmcd.

Yep, should be fixed also.  I've added a check here too and pushed
out the change to oss.

mh

<Prev in Thread] Current Thread [Next in Thread>