linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: Dan Carpenter <error27@gmail.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: iwmc3200wifi: using freed memory in iwm_hal_send_target_cmd()
Date: Mon, 20 Jul 2009 10:09:32 +0800	[thread overview]
Message-ID: <1248055772.3747.0.camel@debian> (raw)
In-Reply-To: <alpine.DEB.2.00.0907171555200.12306@bicker>

On Sun, 2009-07-19 at 19:53 +0800, Dan Carpenter wrote:
> Hello,
> 
> I found this with a source code checker (http://repo.or.cz/w/smatch.git).
> 
> We free "cmd" on line 390 and then dereference it on line 396.  I don't 
> know what we should return in that case or I would have sent a patch.  
> Sorry.
> 
> drivers/net/wireless/iwmc3200wifi/hal.c
>    390          if (!udma_cmd->resp)
>    391                  kfree(cmd);
>    392  
>    393          if (ret < 0)
>    394                  return ret;
>    395  
>    396          return cmd->seq_num;

Good catch! I'll send out a patch later.

Thanks,
-yi


      reply	other threads:[~2009-07-20  2:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-19 11:53 iwmc3200wifi: using freed memory in iwm_hal_send_target_cmd() Dan Carpenter
2009-07-20  2:09 ` Zhu Yi [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=1248055772.3747.0.camel@debian \
    --to=yi.zhu@intel.com \
    --cc=error27@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /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).