rpms/hal/F-8 hal-0.5.10-fix-memory-leaks.patch, NONE, 1.1 hal.spec, 1.141, 1.142

Richard Hughes (rhughes) fedora-extras-commits at redhat.com
Mon Jun 16 11:59:48 UTC 2008


Author: rhughes

Update of /cvs/pkgs/rpms/hal/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12220

Modified Files:
	hal.spec 
Added Files:
	hal-0.5.10-fix-memory-leaks.patch 
Log Message:
* Mon Jun 16 2008 Richard Hughes <rhughes at redhat.com> - 0.5.10-3
- Plug a couple of memory leaks which have already been fixed in git master


hal-0.5.10-fix-memory-leaks.patch:

--- NEW FILE hal-0.5.10-fix-memory-leaks.patch ---
diff --git a/hald/device_info.c b/hald/device_info.c
index 2b18346..438ec52 100644
--- a/hald/device_info.c
+++ b/hald/device_info.c
@@ -621,6 +621,7 @@ handle_match (struct rule *rule, HalDevice *d)
 					break;
 
 			} /* for all siblings */
+			g_slist_free (siblings);			
 		}
 
 		return contains;
diff --git a/hald/linux/apm.c b/hald/linux/apm.c
index 11f56b9..79c54ad 100644
--- a/hald/linux/apm.c
+++ b/hald/linux/apm.c
@@ -81,6 +81,7 @@ apm_poll (gpointer data)
 		apm_rescan_device (d);
 	}
 
+	g_slist_free (devices);
 	return TRUE;
 }
 
diff --git a/hald/linux/hotplug.c b/hald/linux/hotplug.c
index 38e416c..bd1f37c 100644
--- a/hald/linux/hotplug.c
+++ b/hald/linux/hotplug.c
@@ -397,6 +397,7 @@ hotplug_reprobe_generate_remove_events (HalDevice *d)
 		child = HAL_DEVICE (i->data);
 		hotplug_reprobe_generate_remove_events (child);
 	}
+	g_slist_free (childs);
 
 	/* then remove self */
 	HAL_INFO (("Generate remove event for udi %s", hal_device_get_udi (d)));
@@ -480,6 +481,7 @@ hotplug_reprobe_generate_add_events (HalDevice *d)
 		child = HAL_DEVICE (i->data);
 		hotplug_reprobe_generate_add_events (child);
 	}
+	g_slist_free (childs);
 }
 
 gboolean
diff --git a/hald/linux/pmu.c b/hald/linux/pmu.c
index d8f6fc3..e98bbae 100644
--- a/hald/linux/pmu.c
+++ b/hald/linux/pmu.c
@@ -251,6 +251,8 @@ pmu_poll (gpointer data)
 		}
 	}
 
+	g_slist_free (devices);
+	devices = NULL;
 	devices = hal_device_store_match_multiple_key_value_string (hald_get_gdl (),
 								    "info.category",
 								    "ac_adapter");
@@ -266,6 +268,7 @@ pmu_poll (gpointer data)
 		}
 	}
 
+	g_slist_free (devices);
 	return TRUE;
 }
 


Index: hal.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hal/F-8/hal.spec,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -r1.141 -r1.142
--- hal.spec	7 Jun 2008 22:05:51 -0000	1.141
+++ hal.spec	16 Jun 2008 11:59:03 -0000	1.142
@@ -26,11 +26,12 @@
 Summary: Hardware Abstraction Layer
 Name: hal
 Version: 0.5.10
-Release: 2%{?dist}
+Release: 3%{?dist}
 URL: http://www.freedesktop.org/Software/hal
 Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz
 Patch0: hal-0.5.10-acltool-serialize.patch
 Patch1: hal-0.5.10-int_outof-fix.patch
+Patch2: hal-0.5.10-fix-memory-leaks.patch
 
 License: AFL/GPL
 Group: System Environment/Libraries
@@ -124,6 +125,7 @@
 %setup -q
 %patch0 -p1 -b .serialize-acl
 %patch1 -p1 -b .int_outof-fix
+%patch2 -p1 -b .memory-leaks-fix
 
 %build
 %configure --enable-docbook-docs --docdir=%{_datadir}/doc/%{name}-%{version} --with-os-type=redhat --enable-console-kit --enable-policy-kit --enable-acl-management --enable-umount-helper --enable-acpi-ibm --enable-acpi-toshiba --with-eject=/usr/sbin/eject
@@ -236,6 +238,9 @@
 %{_datadir}/gtk-doc/html/libhal-storage/*
 
 %changelog
+* Mon Jun 16 2008 Richard Hughes <rhughes at redhat.com> - 0.5.10-3
+- Plug a couple of memory leaks which have already been fixed in git master
+
 * Sat Jun 07 2008 Dan Williams <dcbw at redhat.com> - 0.5.10-2
 - Fix problems parsing fdi files with int_outof directives
 




More information about the fedora-extras-commits mailing list