From patchwork Tue Feb 2 12:12:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Darren Jenkins X-Patchwork-Id: 76360 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o12CCHS4026125 for ; Tue, 2 Feb 2010 12:12:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753549Ab0BBMMQ (ORCPT ); Tue, 2 Feb 2010 07:12:16 -0500 Received: from mail-yw0-f198.google.com ([209.85.211.198]:56447 "EHLO mail-yw0-f198.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752977Ab0BBMMP (ORCPT ); Tue, 2 Feb 2010 07:12:15 -0500 Received: by ywh36 with SMTP id 36so5080373ywh.15 for ; Tue, 02 Feb 2010 04:12:14 -0800 (PST) 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=RaPfOf8jFBY2hktrt0lbcvz4A2mGRUmlCKzaNYjzhLo=; b=icd7VOnFKW2O3mNwbb1PLmPcaRau6mFpk6yGreqFdJD4KmMzFsiSHej351uOaxgmg7 ewwTEcmIZucnBM7QsklDma4f0vveSh4X7WsFdrHrjgySRlMbpJK6nLHtMUA9SwsiVRx+ 3pK9KoafsBTlcT5EzQxlM4/VR/7SvWT30d50E= 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=MA7M9LO4OAmD42vix86WE0OjkxTqxCKvi/Ns4S4hRHmbEX60V2t4YV529Kw+9DA3wL +/hgmSTPQCTuUXlPunmsX26P2YBQWzDT61jV4KkRwyL/Y3xtPivxwcA2WEHaR6sxi+M5 ekxk2GKR8rJA04xN+MjQ4YkTXk7GT/0u9wxRk= Received: by 10.101.6.22 with SMTP id j22mr7316634ani.224.1265112734030; Tue, 02 Feb 2010 04:12:14 -0800 (PST) Received: from ?192.168.2.3? ([59.101.140.230]) by mx.google.com with ESMTPS id 16sm3967402gxk.15.2010.02.02.04.12.09 (version=SSLv3 cipher=RC4-MD5); Tue, 02 Feb 2010 04:12:12 -0800 (PST) Subject: [PATCH] drivers/acpi/ec.c fix a small memory leak From: Darren Jenkins To: Kernel Janitors , Len Brown , linux ACPI Cc: Linux Kernel Mailing List , astarikovskiy@suse.de Date: Tue, 02 Feb 2010 23:12:10 +1100 Message-ID: <1265112730.4804.8.camel@ICE-BOX> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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]); Tue, 02 Feb 2010 12:12:17 +0000 (UTC) diff --git drivers/acpi/ec.c drivers/acpi/ec.c index d6471bb..13061dc 100644 --- drivers/acpi/ec.c +++ drivers/acpi/ec.c @@ -1009,8 +1009,10 @@ int __init acpi_ec_ecdt_probe(void) /* fall through */ } - if (EC_FLAGS_SKIP_DSDT_SCAN) + if (EC_FLAGS_SKIP_DSDT_SCAN) { + kfree(saved_ec); return -ENODEV; + } /* This workaround is needed only on some broken machines, * which require early EC, but fail to provide ECDT */