From patchwork Wed Jul 25 03:40:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 1235381 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id CA7533FD4F for ; Wed, 25 Jul 2012 03:56:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756367Ab2GYD4T (ORCPT ); Tue, 24 Jul 2012 23:56:19 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:33308 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756284Ab2GYDmD (ORCPT ); Tue, 24 Jul 2012 23:42:03 -0400 Received: by qaas11 with SMTP id s11so247411qaa.19 for ; Tue, 24 Jul 2012 20:42:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:reply-to:organization; bh=xqzQet3ieiuM7rAwI6P4lfIMY222axYt2nQ6VprIJD8=; b=f/0LsJfEIG7CetFEHETpMdCdr12HL/qNCsYoB2UsPe+UmKKFI/870TR7i7zwxab9eQ da+yKJwPltO8uGE65EpPJp4NjEEi3/Xbawr6OG81YFuejelwxSel6JVS/z+YBtzapEJX 0pfiPOGhjPxsGxOgTnT6s7QQzSNGDSPW55iHJUcGsB3FB3TTLGgSkkFn/Oo3wyDH8k0E 7wzCidFVmSyDg/tQfl2sswFJwssW6slle93BEYFb141ThaXbgBsG3yLENjnYoiPJAWJv QohQCWW12yHHgKrqf8yO0nwPp5rbKR314I6f8tqoL7av1heKak9uT8LS3APhFDz3EQAv qE1A== Received: by 10.224.70.195 with SMTP id e3mr35239303qaj.86.1343187722164; Tue, 24 Jul 2012 20:42:02 -0700 (PDT) Received: from x980.localdomain6 (h184-61-125-197.altnnh.dsl.dynamic.tds.net. [184.61.125.197]) by mx.google.com with ESMTPS id et6sm15489186qab.8.2012.07.24.20.42.00 (version=SSLv3 cipher=OTHER); Tue, 24 Jul 2012 20:42:01 -0700 (PDT) From: Len Brown To: linux-acpi@vger.kernel.org, linux-pm@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org, Jesper Juhl , Bob Moore , Lin Ming , Len Brown Subject: [PATCH 01/52] ACPICA: AML Parser: Fix two possible memory leaks in error path Date: Tue, 24 Jul 2012 23:40:57 -0400 Message-Id: <6af1c4fc5227af65092ebc848989693562bfa3e8.1343187617.git.len.brown@intel.com> X-Mailer: git-send-email 1.7.12.rc0 In-Reply-To: <1343187708-19532-1-git-send-email-lenb@kernel.org> References: <1343187708-19532-1-git-send-email-lenb@kernel.org> Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Jesper Juhl Fixes a couple of memory leaks in the error recovery path. Signed-off-by: Jesper Juhl Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- drivers/acpi/acpica/psargs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c index 5ac36ab..a683d66 100644 --- a/drivers/acpi/acpica/psargs.c +++ b/drivers/acpi/acpica/psargs.c @@ -618,6 +618,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state arg = acpi_ps_alloc_op(AML_INT_BYTELIST_OP); if (!arg) { + acpi_ps_free_op(field); return_PTR(NULL); } @@ -662,6 +663,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state } else { arg = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP); if (!arg) { + acpi_ps_free_op(field); return_PTR(NULL); }