From patchwork Thu Jun 18 15:50:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 486361 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2285C1401F0 for ; Fri, 19 Jun 2015 01:51:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=CrBv6XNU; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 896DD28BF84; Thu, 18 Jun 2015 17:50:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id E0D1128BF83 for ; Thu, 18 Jun 2015 17:50:52 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-wg0-f42.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 18 Jun 2015 17:50:52 +0200 (CEST) Received: by wgfq1 with SMTP id q1so20776414wgf.1 for ; Thu, 18 Jun 2015 08:50:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=A8VEDg9iLuTx/nACiomv31gkgrMHd4Y9QuL9NjsR4VU=; b=CrBv6XNU+o+ncDDWJE8izU3SV93pfHvZxclmin52pKg2aG5kNZPxfjtsuUiNStXDjd zRcsdbOHZ4QP45Oj3D1CSNSj77aU24E5jIL8xZTCZcw15G4a07dp0k/mixUQqxXQ8Ozc VT6ic+LQLb9p2lk7M+jDTv4TSjYVOr8i6bYNoFl36iNOrBSe/ps2koR8y9xCD718FDCA fMne39QDyw0EAEHFV8L1BxCugZ1lEwVYryeNee1O6qQh7zfPOoAxxXOLIcSsvqFG6d40 BU8CFNh7519uLYXq4BhlQ0wNxip9J/UAhHLMOEudlgiH7uBS5bmDAjYvVuf0KBbkYraG b71A== X-Received: by 10.194.104.98 with SMTP id gd2mr16111950wjb.35.1434642656636; Thu, 18 Jun 2015 08:50:56 -0700 (PDT) Received: from orion.local ([5.2.198.78]) by mx.google.com with ESMTPSA id s8sm8625028wik.5.2015.06.18.08.50.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Jun 2015 08:50:55 -0700 (PDT) From: Alexandru Ardelean To: openwrt-devel@lists.openwrt.org Date: Thu, 18 Jun 2015 18:50:46 +0300 Message-Id: <1434642649-20330-1-git-send-email-ardeleanalex@gmail.com> X-Mailer: git-send-email 2.1.4 Cc: Alexandru Ardelean Subject: [OpenWrt-Devel] [PATCH 1/4] swconfig: swlib.c: free device name and alias X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" From: Alexandru Ardelean Signed-off-by: Alexandru Ardelean --- package/network/config/swconfig/src/swlib.c | 2 ++ package/network/config/swconfig/src/swlib.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package/network/config/swconfig/src/swlib.c b/package/network/config/swconfig/src/swlib.c index 1222502..334d148 100644 --- a/package/network/config/swconfig/src/swlib.c +++ b/package/network/config/swconfig/src/swlib.c @@ -761,6 +761,8 @@ swlib_free(struct switch_dev *dev) swlib_free_attributes(&dev->ops); swlib_free_attributes(&dev->port_ops); swlib_free_attributes(&dev->vlan_ops); + free(dev->name); + free(dev->alias); free(dev); if (--refcount == 0) diff --git a/package/network/config/swconfig/src/swlib.h b/package/network/config/swconfig/src/swlib.h index 016f74b..bb2ebd8 100644 --- a/package/network/config/swconfig/src/swlib.h +++ b/package/network/config/swconfig/src/swlib.h @@ -116,8 +116,8 @@ struct uci_package; struct switch_dev { int id; char dev_name[IFNAMSIZ]; - const char *name; - const char *alias; + char *name; + char *alias; int ports; int vlans; int cpu_port;