From 976dcfc9f101b61ed2c5c9f98d9d23005aa927d5 Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Mon, 16 Nov 2015 16:06:48 +0100 Subject: [PATCH] gtp: fix the order of error cases in gtp_encap_enable The ordering of the error case exit was wrong and would attempt to release the wrong socket. Signed-off-by: Andreas Schultz Signed-off-by: Pablo Neira Ayuso --- gtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtp.c b/gtp.c index 179368e..8782fea 100644 --- a/gtp.c +++ b/gtp.c @@ -933,10 +933,10 @@ static int gtp_encap_enable(struct net_device *dev, struct gtp_instance *gti, sk->sk_user_data = gti; return 0; -err1: - sockfd_put(sock0); err2: sockfd_put(sock1u); +err1: + sockfd_put(sock0); return err; }