From patchwork Mon Jun 28 06:30:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 108313 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5S6SATP018095 for ; Mon, 28 Jun 2010 06:28:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752664Ab0F1G2J (ORCPT ); Mon, 28 Jun 2010 02:28:09 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:57961 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752794Ab0F1G2I (ORCPT ); Mon, 28 Jun 2010 02:28:08 -0400 Received: by iwn7 with SMTP id 7so836266iwn.19 for ; Sun, 27 Jun 2010 23:28:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=heXpq80nN7ltG86COtOaUWp4zAeDJFyYAHEwNuIJLwk=; b=USdBzcacOq5qh5PjraHbimKnx2O9MqBrZIrJDFekREzmMxz+N/DUXZAXHPNPzAhCOS GsXTnRLt+9JiRK9kn1G/4mgqcMKoaVsklmwvZ6mMk/PSAr9BGFK4rd7qL1pAFzkUG5Jr ibgz0wbH5bL/WmKp2XPIAkTz6V2K3eVdV/WnI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=QpypLlLMxAfEXgUVQjVc4nVr4TzaME8pzG1hqOBqJHum3IrczKMB1q+BWNmTl2wJAa 35CrFezHrsRaVzYddXXttCmOOcQYHLuWyCxcdFp7SHWTA7tPk0miLdoSLRCWYAvrz796 PS5u0OMaowIxcATw6PSQ6wuUbnUfLQWeJdkqU= Received: by 10.231.168.135 with SMTP id u7mr4542029iby.125.1277706487156; Sun, 27 Jun 2010 23:28:07 -0700 (PDT) Received: from [192.168.100.50] (60-251-136-127.HINET-IP.hinet.net [60.251.136.127]) by mx.google.com with ESMTPS id 35sm13510401ibs.10.2010.06.27.23.28.02 (version=SSLv3 cipher=RC4-MD5); Sun, 27 Jun 2010 23:28:06 -0700 (PDT) Subject: [PATCH] wistron_btns: fix a memory leak in wb_module_init error path From: Axel Lin To: linux-kernel Cc: Miloslav Trmac , Dmitry Torokhov , Rakib Mullick , TJ , Julia Lawall , Samu Onkalo , linux-input@vger.kernel.org Date: Mon, 28 Jun 2010 14:30:20 +0800 Message-Id: <1277706620.4148.2.camel@mola> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 28 Jun 2010 06:28:11 +0000 (UTC) diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 4dac8b7..55ce70e 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c @@ -1371,6 +1371,7 @@ static int __init wb_module_init(void) platform_driver_unregister(&wistron_driver); err_unmap_bios: unmap_bios(); + kfree(keymap); return err; }