projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
249eb5b
)
NFC: llcp: Fix possible memory leak while sending I frames
author
Szymon Janc
<szymon.janc@gmail.com>
Sat, 30 Nov 2013 15:14:57 +0000
(16:14 +0100)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Sat, 4 Jan 2014 02:32:27 +0000
(
03:32
+0100)
If sending was not completed due to low memory condition msg_data
was not free before returning from function.
Signed-off-by: Szymon Janc <szymon.janc@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/llcp_commands.c
patch
|
blob
|
blame
|
history
diff --git
a/net/nfc/llcp_commands.c
b/net/nfc/llcp_commands.c
index 693cd1aad582314a81accc30d60e528eb0ad2335..80057a818737b6ef8abdaf653ed59868a743f005 100644
(file)
--- a/
net/nfc/llcp_commands.c
+++ b/
net/nfc/llcp_commands.c
@@
-684,8
+684,10
@@
int nfc_llcp_send_i_frame(struct nfc_llcp_sock *sock,
pdu = llcp_allocate_pdu(sock, LLCP_PDU_I,
frag_len + LLCP_SEQUENCE_SIZE);
- if (pdu == NULL)
+ if (pdu == NULL) {
+ kfree(msg_data);
return -ENOMEM;
+ }
skb_put(pdu, LLCP_SEQUENCE_SIZE);