From: Jesper Juhl <j...@chaosbits.net>

Fixes a couple of memory leaks in the error recovery path.

Signed-off-by: Jesper Juhl <j...@chaosbits.net>
Signed-off-by: Bob Moore <robert.mo...@intel.com>
Signed-off-by: Lin Ming <ming.m....@intel.com>
Signed-off-by: Len Brown <len.br...@intel.com>
---
 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);
                        }
 
-- 
1.7.12.rc0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to