git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge ../linus
[pandora-kernel.git]
/
net
/
ipv4
/
tcp_probe.c
diff --git
a/net/ipv4/tcp_probe.c
b/net/ipv4/tcp_probe.c
index
d7d517a
..
dab37d2
100644
(file)
--- a/
net/ipv4/tcp_probe.c
+++ b/
net/ipv4/tcp_probe.c
@@
-114,7
+114,7
@@
static int tcpprobe_open(struct inode * inode, struct file * file)
static ssize_t tcpprobe_read(struct file *file, char __user *buf,
size_t len, loff_t *ppos)
{
static ssize_t tcpprobe_read(struct file *file, char __user *buf,
size_t len, loff_t *ppos)
{
- int error = 0, cnt;
+ int error = 0, cnt
= 0
;
unsigned char *tbuf;
if (!buf || len < 0)
unsigned char *tbuf;
if (!buf || len < 0)
@@
-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)
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);
cnt = kfifo_get(tcpw.fifo, tbuf, len);
error = copy_to_user(buf, tbuf, cnt);
+out_free:
vfree(tbuf);
return error ? error : cnt;
vfree(tbuf);
return error ? error : cnt;