From: Jiri Slaby <jirislaby@gmail.com>
To: Pavel Machek <pavel@suse.cz>
Cc: kernel list <linux-kernel@vger.kernel.org>,
linux-wireless@vger.kernel.org, ath5k-devel@lists.ath5k.org,
linville@tuxdriver.com
Subject: Re: Small cleanups
Date: Wed, 25 Jun 2008 13:12:34 +0200 [thread overview]
Message-ID: <48622822.3000300@gmail.com> (raw)
In-Reply-To: <486227D2.6030801@gmail.com>
>> - if ((ai->APList == NULL) &&
>> - (ai->APList = kmalloc(sizeof(APListRid), GFP_KERNEL)) == NULL)
>> + if (!ai->APList)
>> + ai->APList = kmalloc(sizeof(APListRid), GFP_KERNEL);
>> + if (!ai->APList)
>> return -ENOMEM;
>> - if ((ai->SSID == NULL) &&
>> - (ai->SSID = kmalloc(sizeof(SsidRid), GFP_KERNEL)) == NULL)
>> + if (!ai->SSID)
>> + ai->SSID = kmalloc(sizeof(SsidRid), GFP_KERNEL);
>> + if (!ai->SSID)
>> return -ENOMEM;
>
> Would you mind sending another patch which would fix the potential leak?
Sorry, ignore this.
prev parent reply other threads:[~2008-06-25 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-25 10:25 Small cleanups Pavel Machek
2008-06-25 11:11 ` Jiri Slaby
2008-06-25 11:12 ` Jiri Slaby [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=48622822.3000300@gmail.com \
--to=jirislaby@gmail.com \
--cc=ath5k-devel@lists.ath5k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=pavel@suse.cz \
/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).