From: Dan Carpenter <dan.carpenter@oracle.com>
To: Thierry Escande <thierry.escande@collabora.com>
Cc: linux-wireless@vger.kernel.org
Subject: [bug report] NFC Digital: Add target NFC-DEP support
Date: Wed, 19 Apr 2017 15:22:05 +0300 [thread overview]
Message-ID: <20170419122205.nnzflximmxe22sd5@mwanda> (raw)
Hello Thierry Escande,
The patch 1c7a4c24fbfd: "NFC Digital: Add target NFC-DEP support"
from Sep 19, 2013, leads to the following static checker warning:
net/nfc/digital_dep.c:1303 digital_tg_recv_dep_req()
error: double free of 'resp'
net/nfc/digital_dep.c
1290
1291 rc = nfc_tm_data_received(ddev->nfc_dev, resp);
^^^^
resp is freed on error here.
1292
1293 exit:
1294 kfree_skb(ddev->chaining_skb);
1295 ddev->chaining_skb = NULL;
1296
1297 ddev->atn_count = 0;
1298
1299 kfree_skb(ddev->saved_skb);
1300 ddev->saved_skb = NULL;
1301
1302 if (rc)
1303 kfree_skb(resp);
^^^^^^^^^^^^^^^
Leading to a double free here, I think.
1304
1305 return;
1306
1307 free_resp:
1308 dev_kfree_skb(resp);
1309 }
regards,
dan carpenter
next reply other threads:[~2017-04-19 12:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-19 12:22 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-02-23 10:45 [bug report] NFC Digital: Add target NFC-DEP support Dan Carpenter
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=20170419122205.nnzflximmxe22sd5@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-wireless@vger.kernel.org \
--cc=thierry.escande@collabora.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