Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Fix a memory leak in the resume handler.



details:   https://anonhg.NetBSD.org/src/rev/6bef66cde688
branches:  trunk
changeset: 751240:6bef66cde688
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Fri Jan 29 11:23:25 2010 +0000

description:
Fix a memory leak in the resume handler.

diffstat:

 sys/dev/acpi/asus_acpi.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r b9f12b8f28f1 -r 6bef66cde688 sys/dev/acpi/asus_acpi.c
--- a/sys/dev/acpi/asus_acpi.c  Fri Jan 29 10:49:07 2010 +0000
+++ b/sys/dev/acpi/asus_acpi.c  Fri Jan 29 11:23:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asus_acpi.c,v 1.12 2010/01/08 20:40:41 dyoung Exp $ */
+/* $NetBSD: asus_acpi.c,v 1.13 2010/01/29 11:23:25 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008, 2009 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: asus_acpi.c,v 1.12 2010/01/08 20:40:41 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: asus_acpi.c,v 1.13 2010/01/29 11:23:25 jruoho Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -312,6 +312,9 @@
                aprint_error_dev(self, "couldn't evaluate PBLS: %s\n",
                    AcpiFormatException(rv));
 
+       if (ret.Pointer != NULL)
+               ACPI_FREE(ret);
+
        return true;
 }
 



Home | Main Index | Thread Index | Old Index