From patchwork Wed Jul 8 06:21:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 492736 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 3CC05140770 for ; Wed, 8 Jul 2015 16:22:52 +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=EgtSCT0o; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id C1492283F62; Wed, 8 Jul 2015 08:22:18 +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 A46402800E7 for ; Wed, 8 Jul 2015 08:21:38 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 8 Jul 2015 08:21:38 +0200 (CEST) Received: by wiga1 with SMTP id a1so275263125wig.0 for ; Tue, 07 Jul 2015 23:21:55 -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=YGSWb2JVK8wxjGKpd+qs/aJ3hucV+Or376Po2AYk8H0=; b=EgtSCT0oYDvyteXhFkOeQlnGEvu169w00UDi/e0u51d8/BsDYHcCqkzQAMFniHi2oM 2PfVTnXHRJ6f8MTEc1aKyMgatn9XVU/btdLpQm7m7YxIELheMasguoyfpswFgy96Ib+9 FLzlnHOEvCxvcUDppCTgqVqeJ4XR5xSXgv49ht5coe4Chrp+6TfvORB+OGtENATtepnA RDVDkQTKu/4iA6YkIGPgTg9FIkoBn4akpQJqMf5qegMeZOf3uW3Omc0xJAcU+Xe+vgP/ gpPaR2n5dnKUMbqsUxCBJLNOIt+bHTBvGP7tld3hFRSaTSFUruhXCSj86ViJKWW8FF8V XGTA== X-Received: by 10.180.24.40 with SMTP id r8mr73515160wif.24.1436336515600; Tue, 07 Jul 2015 23:21:55 -0700 (PDT) Received: from orion.ocedo.cluj.local ([5.2.198.78]) by smtp.gmail.com with ESMTPSA id q9sm1081802wiz.23.2015.07.07.23.21.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jul 2015 23:21:55 -0700 (PDT) From: Alexandru Ardelean To: openwrt-devel@lists.openwrt.org Date: Wed, 8 Jul 2015 09:21:47 +0300 Message-Id: <1436336507-15686-1-git-send-email-ardeleanalex@gmail.com> X-Mailer: git-send-email 2.1.4 Cc: Helmut Schaa Subject: [OpenWrt-Devel] [PATCH] 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 --- openwrt/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; }