public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: yi.zhu@intel.com
Cc: linux-wireless@vger.kernel.org
Subject: iwmc3200wifi: using freed memory in iwm_hal_send_target_cmd()
Date: Sun, 19 Jul 2009 14:53:39 +0300 (EAT)	[thread overview]
Message-ID: <alpine.DEB.2.00.0907171555200.12306@bicker> (raw)

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;

regards,
dan carpenter

             reply	other threads:[~2009-07-19 12:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-19 11:53 Dan Carpenter [this message]
2009-07-20  2:09 ` iwmc3200wifi: using freed memory in iwm_hal_send_target_cmd() Zhu Yi

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=alpine.DEB.2.00.0907171555200.12306@bicker \
    --to=error27@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=yi.zhu@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