From: Doug Ledford <dledford@redhat.com>
To: "Hawrylewicz Czarnowski,
Przemyslaw" <przemyslaw.hawrylewicz.czarnowski@intel.com>,
Neil Brown <neilb@suse.de>,
"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
Williams,
Subject: Re: [PATCH 1/2] imsm: delete subarray functionality
Date: Thu, 01 Apr 2010 12:31:37 -0400 [thread overview]
Message-ID: <4BB4CA69.7060705@redhat.com> (raw)
In-Reply-To: <20100401060922.GA15461@maude.comedia.it>
[-- Attachment #1: Type: text/plain, Size: 863 bytes --]
On 04/01/2010 02:09 AM, Luca Berra wrote:
> On Wed, Mar 31, 2010 at 09:50:40PM +0100, Hawrylewicz Czarnowski,
> Przemyslaw wrote:
>> int mdmon_pid(int devnum)
>> @@ -1502,7 +1523,11 @@ int mdmon_pid(int devnum)
>> char pid[10];
>> int fd;
>> int n;
>> - sprintf(path, "%s/%s.pid", pid_dir, devnum2devname(devnum));
>> + char *devname = devnum2devname(devnum);
>> +
>> + sprintf(path, "%s/%s.pid", pid_dir, devname);
>> + free(devname);
>> +
>> fd = open(path, O_RDONLY | O_NOATIME, 0);
>>
>> if (fd < 0)
> why?
Looks like it leaks memory in the old implementation.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: CFBFF194
http://people.redhat.com/dledford
Infiniband specific RPMs available at
http://people.redhat.com/dledford/Infiniband
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-04-01 16:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-31 20:50 [PATCH 1/2] imsm: delete subarray functionality Hawrylewicz Czarnowski, Przemyslaw
2010-04-01 6:09 ` Luca Berra
2010-04-01 16:31 ` Doug Ledford [this message]
2010-04-01 21:31 ` Hawrylewicz Czarnowski, Przemyslaw
2010-04-02 5:36 ` Neil Brown
2010-04-01 21:29 ` Hawrylewicz Czarnowski, Przemyslaw
2010-04-01 16:41 ` Doug Ledford
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=4BB4CA69.7060705@redhat.com \
--to=dledford@redhat.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=przemyslaw.hawrylewicz.czarnowski@intel.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;
as well as URLs for NNTP newsgroup(s).