1
0
Fork 0
remarkable-linux/drivers/nfc
Christophe Ricard f84e11df67 NFC: st21nfca: fix use of uninitialized variables in error path
commit 5a3570061a upstream.

st21nfca_hci_load_session() calls kfree_skb() on unitialized
variables skb_pipe_info and skb_pipe_list if the call to
nfc_hci_connect_gate() failed. Reword the error path to not use
these variables when they are not initialized. While at it, there
seemed to be a memory leak because skb_pipe_info was only freed
once, after the for-loop, even though several ones were created
by nfc_hci_send_cmd.

Fixes: ec03ff1a8f
("NFC: st21nfca: Remove skb_pipe_list and skb_pipe_info
useless allocation")

Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 19:25:55 +02:00
..
microread NFC: logging neatening 2015-04-07 12:05:12 +02:00
nfcmrvl NFC: logging neatening 2015-04-07 12:05:12 +02:00
nxp-nci NFC: nxp-nci: Release firmware when switching to FW mode fails 2015-04-06 00:58:51 +02:00
pn544 NFC: logging neatening 2015-04-07 12:05:12 +02:00
st21nfca NFC: st21nfca: fix use of uninitialized variables in error path 2015-09-29 19:25:55 +02:00
st21nfcb NFC: st21nfcb: remove st21nfcb_nci_i2c_disable 2015-08-03 09:29:01 -07:00
Kconfig NFC: nxp-nci: Add support for NXP NCI chips 2015-03-26 11:07:50 +01:00
Makefile NFC: nxp-nci: Add support for NXP NCI chips 2015-03-26 11:07:50 +01:00
mei_phy.c NFC: mei_phy: Using kfree_skb() instead of kfree() 2014-01-04 03:32:26 +01:00
mei_phy.h NFC: mei: Add a common mei bus API for NFC drivers 2013-04-16 00:39:31 +02:00
nfcsim.c NFC: Convert nfc_dev_info and nfc_dev_err to nfc_<level> 2013-09-25 01:35:39 +02:00
nfcwilink.c nfc: drop owner assignment from platform_drivers 2014-10-20 16:21:19 +02:00
pn533.c NFC: logging neatening 2015-04-07 12:05:12 +02:00
port100.c NFC: logging neatening 2015-04-07 12:05:12 +02:00
trf7970a.c NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-15 15:12:21 +01:00