[PATCH] Fix possible leak in af_ax25

From: Dave Jones
Date: Wed Sep 01 2004 - 12:21:47 EST


Spotted with the source checker from Coverity.com.

Signed-off-by: Dave Jones <davej@xxxxxxxxxx>


diff -urpN --exclude-from=/home/davej/.exclude bk-linus/net/ax25/af_ax25.c linux-2.6/net/ax25/af_ax25.c
--- bk-linus/net/ax25/af_ax25.c 2004-06-07 00:00:22.000000000 +0100
+++ linux-2.6/net/ax25/af_ax25.c 2004-06-07 11:07:06.000000000 +0100
@@ -1272,6 +1272,9 @@ static int ax25_connect(struct socket *s

sock->state = SS_CONNECTED;

+ if (digi != NULL)
+ kfree(digi);
+
err=0;
out:
release_sock(sk);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/