]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix possible leak in af_ax25
authorDave Jones <davej@redhat.com>
Thu, 2 Sep 2004 07:39:28 +0000 (00:39 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 2 Sep 2004 07:39:28 +0000 (00:39 -0700)
Spotted with the source checker from Coverity.com.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
net/ax25/af_ax25.c

index 47fbd98e0e81c26366886fce40e44593421425ec..aa89d9611e5dce06317da1374315b98ead5a62a6 100644 (file)
@@ -1272,6 +1272,9 @@ static int ax25_connect(struct socket *sock, struct sockaddr *uaddr,
 
        sock->state = SS_CONNECTED;
 
+       if (digi != NULL)
+               kfree(digi);
+
        err=0;
 out:
        release_sock(sk);