[TCP]: fix memory leak in net/ipv4/tcp_probe.c::tcpprobe_read()
authorJames Morris <jmorris@namei.org>
Mon, 31 Jul 2006 03:21:45 +0000 (20:21 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 2 Aug 2006 20:38:18 +0000 (13:38 -0700)
Based upon a patch by Jesper Juhl.

Signed-off-by: James Morris <jmorris@namei.org>
Acked-by: Stephen Hemminger <shemminger@osdl.org>
Acked-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_probe.c

index d7d517a3a238b918862896e114e3ea0261f5652c..b3435324b573fb468f429bb3db805158d8aac2ae 100644 (file)
@@ -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)
 {
-       int error = 0, cnt;
+       int error = 0, cnt = 0;
        unsigned char *tbuf;
 
        if (!buf || len < 0)