aboutsummaryrefslogtreecommitdiff
blob: f98e028b69f6bd0e460ba19c430c2663e78c5c2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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