aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'hal-0.5.11-patches/0012-fixed-possible-memory-leak.patch')
-rw-r--r--hal-0.5.11-patches/0012-fixed-possible-memory-leak.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/hal-0.5.11-patches/0012-fixed-possible-memory-leak.patch b/hal-0.5.11-patches/0012-fixed-possible-memory-leak.patch
new file mode 100644
index 00000000..f98e028b
--- /dev/null
+++ b/hal-0.5.11-patches/0012-fixed-possible-memory-leak.patch
@@ -0,0 +1,28 @@
+From 76b577e4a727f19926bad156a99628bc160e85a0 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Mon, 11 Aug 2008 12:08:09 +0200
+Subject: [PATCH 12/48] fixed possible memory leak
+
+Fixed possible memory leak due to usage of g_strsplit().
+---
+ hald/linux/acpi.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/hald/linux/acpi.c b/hald/linux/acpi.c
+index a7892ea..6f76af6 100644
+--- a/hald/linux/acpi.c
++++ b/hald/linux/acpi.c
+@@ -530,6 +530,10 @@ get_processor_model_name (gint proc_num)
+ }
+ }
+ }
++
++ if (lines) {
++ g_strfreev (lines);
++ }
+ }
+ else {
+ HAL_ERROR (("Couldn't open /proc/cpuinfo: %s", error->message));
+--
+1.6.1.2
+