Thread (1 message) 1 message, 1 author, 2015-01-25
DORMANTno replies

[PATCH 03/13] NFC: st21nfcb: Fix "WARNING: invalid free of devm_ allocated data"

From: Christophe Ricard <hidden>
Date: 2015-01-25 22:33:21
Subsystem: nfc subsystem, the rest · Maintainers: David Heidelberg, Linus Torvalds

ndlc pointer got allocated with devm_kzalloc in ndlc_probe function.

This gives this error message:
drivers/nfc/st21nfcb/ndlc.c:296:1-6: WARNING: invalid free of devm_ allocated data.

Reported-by: Dan Carpenter <redacted>
Reported-by: Julia Lawall <redacted>
Signed-off-by: Christophe Ricard <redacted>
---
 drivers/nfc/st21nfcb/ndlc.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/nfc/st21nfcb/ndlc.c b/drivers/nfc/st21nfcb/ndlc.c
index bac50e8..ef0f997 100644
--- a/drivers/nfc/st21nfcb/ndlc.c
+++ b/drivers/nfc/st21nfcb/ndlc.c
@@ -297,6 +297,5 @@ void ndlc_remove(struct llt_ndlc *ndlc)
 	skb_queue_purge(&ndlc->send_q);
 
 	st21nfcb_nci_remove(ndlc->ndev);
-	kfree(ndlc);
 }
 EXPORT_SYMBOL(ndlc_remove);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help