projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f54fa84
)
[TCP]: Fix botched memory leak fix to tcpprobe_read().
author
David S. Miller
<davem@davemloft.net>
Mon, 14 Aug 2006 01:05:09 +0000
(18:05 -0700)
committer
David S. Miller
<davem@davemloft.net>
Mon, 14 Aug 2006 01:05:09 +0000
(18:05 -0700)
Somehow I clobbered James's original fix and only my
subsequent compiler warning change went in for that
changeset.
Get the real fix in there.
Noticed by Jesper Juhl.
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_probe.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv4/tcp_probe.c
b/net/ipv4/tcp_probe.c
index b3435324b573fb468f429bb3db805158d8aac2ae..dab37d2f65fcf09a820bce52300d7f335ab5066c 100644
(file)
--- a/
net/ipv4/tcp_probe.c
+++ b/
net/ipv4/tcp_probe.c
@@
-130,11
+130,12
@@
static ssize_t tcpprobe_read(struct file *file, char __user *buf,
error = wait_event_interruptible(tcpw.wait,
__kfifo_len(tcpw.fifo) != 0);
if (error)
-
return error
;
+
goto out_free
;
cnt = kfifo_get(tcpw.fifo, tbuf, len);
error = copy_to_user(buf, tbuf, cnt);
+out_free:
vfree(tbuf);
return error ? error : cnt;