From patchwork Fri May 19 08:01:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17019 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 37E478346F; Fri, 19 May 2017 10:01:50 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=mX/6hsfO; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 21F3982FC4 for ; Fri, 19 May 2017 10:01:49 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from sven-desktop.home.narfation.org (p2003007C6F5C42FE527B9DFFFECE2683.dip0.t-ipconnect.de [IPv6:2003:7c:6f5c:42fe:527b:9dff:fece:2683]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id B49A41100CE; Fri, 19 May 2017 10:01:48 +0200 (CEST) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1495180908; bh=lYSEwOo3XHcVZfZKKPL1Bp6yqySjmhwg2eSpHtTy72Q=; h=From:To:Cc:Subject:Date:From; b=mX/6hsfOi55l6ZdCMAr+5bBerkk1LNjNIwBDcn96mCKrd5J0+lH06+cqKVkOo51V7 5edgjsAnBvZ5W1MlzjdYGg0dj+dQ0xkfq4HPQmBlQFAPSn9jL4reGfk1HGZ1mk95+S K80w3jJxcjdu/DzbgadtixD5NY2v0oHLX2bW+FLI= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 19 May 2017 10:01:42 +0200 Message-Id: <20170519080142.21070-1-sven@narfation.org> X-Mailer: git-send-email 2.11.0 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: fix memory leak when dropping packet from other gateway X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" From: Andreas Pape This patch fixes a memory leak introduced with commit "batman-adv: drop unicast packets from other backbone gw". Fixes: bfe2a1971f43 ("batman-adv: drop unicast packets from other backbone gw") Signed-off-by: Andreas Pape --- net/batman-adv/routing.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index e1ebe14..ae9f4d3 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c @@ -987,7 +987,7 @@ int batadv_recv_unicast_packet(struct sk_buff *skb, batadv_dbg(BATADV_DBG_BLA, bat_priv, "recv_unicast_packet(): Dropped unicast pkt received from another backbone gw %pM.\n", orig_addr_gw); - return NET_RX_DROP; + goto free_skb; } }