From 428877d34ca6d41f682ca44cc7fa7bb354c63c7d Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Thu, 2 Sep 2004 00:39:28 -0700 Subject: [PATCH] [PATCH] Fix possible leak in af_ax25 Spotted with the source checker from Coverity.com. Signed-off-by: Dave Jones Signed-off-by: Linus Torvalds --- net/ax25/af_ax25.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 47fbd98e0e81c..aa89d9611e5dc 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -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); -- 2.53.0