From patchwork Wed Jul 8 06:37:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 492739 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 486C21402B0 for ; Wed, 8 Jul 2015 16:37:39 +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=x4ztAhj2; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 55234283F62; Wed, 8 Jul 2015 08:37:15 +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 312362800E7 for ; Wed, 8 Jul 2015 08:37:07 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 8 Jul 2015 08:37:06 +0200 (CEST) Received: by wgxm20 with SMTP id m20so3098915wgx.3 for ; Tue, 07 Jul 2015 23:37:24 -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=b8cbGyK0psLb71nabvQm8TLHdevt/S4WtrPsbu9vLgM=; b=x4ztAhj2b0pFCnRJ7KOD76z2q58zTPlkxJqZ/3D6GB5rmCypNMUkshgtZSO03nxrbY jx3X6JVNahQvrIfqusZcyNn5iMpyBGGnzDxi/rx42D7ijsv8l+8eFDD/VFcGadUV5+Te H7yMca9GN51A6lj9R37fSu9sFfNFfkifs8zBwHZvXlI6oB+g5myNhj0HeWZRwENRCMtz Z3eZihwQU4uQQn5HD0xcydEhWc98o+nlrcwj8jfIIppp8efUL8EebkHCsiexPcKR1brE ZseZnMcIAx/lhNkKVUjngrlc7iPr8NWNSNS2sKmzwgoNegzS28I0iJGriu5B2Kr3wXnP xO/g== X-Received: by 10.180.99.71 with SMTP id eo7mr66514771wib.95.1436337444623; Tue, 07 Jul 2015 23:37:24 -0700 (PDT) Received: from orion.ocedo.cluj.local ([5.2.198.78]) by smtp.gmail.com with ESMTPSA id o6sm1153189wiz.16.2015.07.07.23.37.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jul 2015 23:37:23 -0700 (PDT) From: Alexandru Ardelean To: openwrt-devel@lists.openwrt.org Date: Wed, 8 Jul 2015 09:37:16 +0300 Message-Id: <1436337436-32354-1-git-send-email-ardeleanalex@gmail.com> X-Mailer: git-send-email 2.1.4 Cc: Helmut Schaa Subject: [OpenWrt-Devel] [PATCH] [RESEND] swconfig: swlib.c: Fix another memleak 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: Helmut Schaa Signed-off-by: Helmut Schaa Signed-off-by: Helmut Schaa --- package/network/config/swconfig/src/swlib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/network/config/swconfig/src/swlib.c b/package/network/config/swconfig/src/swlib.c index dae603c..f79b826 100644 --- a/package/network/config/swconfig/src/swlib.c +++ b/package/network/config/swconfig/src/swlib.c @@ -529,10 +529,13 @@ struct switch_attr *swlib_lookup_attr(struct switch_dev *dev, static void swlib_priv_free(void) { + if (family) + nl_object_put((struct nl_object*)family); if (cache) nl_cache_free(cache); if (handle) nl_socket_free(handle); + family = NULL; handle = NULL; cache = NULL; }