From patchwork Wed May 19 14:02:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 164 Return-Path: Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by open-mesh.net (Postfix) with SMTP id 2F9F91542F6 for ; Wed, 19 May 2010 10:38:21 +0200 (CEST) Received: (qmail invoked by alias); 19 May 2010 14:02:06 -0000 Received: from unknown (EHLO sven-desktop.lazhur.ath.cx) [89.246.192.108] by mail.gmx.net (mp056) with SMTP; 19 May 2010 16:02:06 +0200 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX18rj/knVW0rX07spKCtz3sqStfpYwoc920RiXXYM2 7m6a5W8qwOksOX From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 19 May 2010 16:02:02 +0200 Message-Id: <1274277722-25571-1-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.1 X-Y-GMX-Trusted: 0 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Don't call free_netdev twice X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 08:38:21 -0000 Free_netdev is registered as destructor in interface_setup for every soft_device. This destructor is automatically called from unregister_netdev and we must not call it again for the freed net_device. Signed-off-by: Sven Eckelmann --- batman-adv-kernelland/main.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/batman-adv-kernelland/main.c b/batman-adv-kernelland/main.c index 51856a7..c9132c0 100644 --- a/batman-adv-kernelland/main.c +++ b/batman-adv-kernelland/main.c @@ -130,6 +130,9 @@ unreg_sysfs: sysfs_del_meshif(soft_device); unreg_soft_device: unregister_netdev(soft_device); + soft_device = NULL; + return -ENOMEM; + free_soft_device: free_netdev(soft_device); soft_device = NULL;