From patchwork Mon Jul 22 23:45:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 2831619 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 830759F4D4 for ; Mon, 22 Jul 2013 23:46:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A8E0B20204 for ; Mon, 22 Jul 2013 23:46:25 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B27D4201F0 for ; Mon, 22 Jul 2013 23:46:24 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V1Po0-0001Wj-NA; Mon, 22 Jul 2013 23:46:16 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V1Pnw-000149-PI; Mon, 22 Jul 2013 23:46:12 +0000 Received: from mail-la0-f46.google.com ([209.85.215.46]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V1Pnt-00013X-Ly for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2013 23:46:10 +0000 Received: by mail-la0-f46.google.com with SMTP id es20so199697lab.19 for ; Mon, 22 Jul 2013 16:45:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=X31n53AMc6tBBBxfyKlXCvcSDGsWmAAjSzlLHC77LRo=; b=pixbmU8lvaFT/4x3gSXIzB67PZUoHDD544Tag+sYuTgsA/Z0KZwsnQOXuMUIQnAAMe i7URicofxt6qz+5Hh1/8uU1pWh7dR/7WHongrQY8c50axd7Q3qu58WUskOFnlzhDzIqb T7gwMsQ8NK5nbM5e/yYGShrUF189np+adIYVNH+ng8mxhUMLeov5N7zDKWF+KxwrJyAo p9L0DyGUInjeVvHPuU48skd/AaEVOR0HSgOWHHGNtmCyItiAL7njpF234KPxY+/brbtN 95Z8GI56nOzsOHScAnBQdNsdfF99HtrIXWS5JJh5yIN6XDNYawfxBrNr0tDCiAtF1g8R OZTQ== X-Received: by 10.112.55.104 with SMTP id r8mr13097566lbp.49.1374536747043; Mon, 22 Jul 2013 16:45:47 -0700 (PDT) Received: from localhost.localdomain (c83-249-208-126.bredband.comhem.se. [83.249.208.126]) by mx.google.com with ESMTPSA id w9sm11733409lbd.9.2013.07.22.16.45.45 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 22 Jul 2013 16:45:46 -0700 (PDT) From: Linus Walleij To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] pinctrl: fix a memleak when freeing maps Date: Tue, 23 Jul 2013 01:45:39 +0200 Message-Id: <1374536739-18966-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.1.4 X-Gm-Message-State: ALoCoQmkYLb2W8/WSQMt+QmNoGs/RMwkm0rEOTRKCoBdStz83z/Sqa9T7IaUifvxHWsOvhT8aWPt X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130722_194609_880638_3D1539BB X-CRM114-Status: UNSURE ( 8.48 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: Linus Walleij , Stephen Warren , xulinuxkernel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We forgot to free the node itself when free:ing a map. Reported-by: xulinuxkernel Signed-off-by: Linus Walleij Reviewed-by: Stephen Warren --- drivers/pinctrl/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 5b272bf..2a00239 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -1193,6 +1193,7 @@ void pinctrl_unregister_map(struct pinctrl_map const *map) list_for_each_entry(maps_node, &pinctrl_maps, node) { if (maps_node->maps == map) { list_del(&maps_node->node); + kfree(maps_node); mutex_unlock(&pinctrl_maps_mutex); return; }