rpms/hal/FC-6 hal-0.5.8.1-ups-leak.patch, NONE, 1.1 hal.spec, 1.111, 1.112

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Dec 13 22:50:17 UTC 2006


Author: davidz

Update of /cvs/dist/rpms/hal/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv8720

Modified Files:
	hal.spec 
Added Files:
	hal-0.5.8.1-ups-leak.patch 
Log Message:
* Wed Dec 13 2006 David Zeuthen <davidz at redhat.com> - 0.5.8.1-6%{?dist}
- Fix leak when driving a UPS
- Resolves: #214204



hal-0.5.8.1-ups-leak.patch:
 hald/linux/addons/addon-hid-ups.c |    7 ++++++-
 libhal/libhal.c                   |    3 +++
 2 files changed, 9 insertions(+), 1 deletion(-)

--- NEW FILE hal-0.5.8.1-ups-leak.patch ---
diff --git a/hald/linux/addons/addon-hid-ups.c b/hald/linux/addons/addon-hid-ups.c
index 31f3803..d130bf7 100644
--- a/hald/linux/addons/addon-hid-ups.c
+++ b/hald/linux/addons/addon-hid-ups.c
@@ -400,7 +400,12 @@ main (int argc, char *argv[])
 
 			dbus_error_init (&error);
 			/* NOTE: commit_changeset won't do IPC if set is empty */
-			libhal_device_commit_changeset (ctx, cs, &error);
+			if (!libhal_device_commit_changeset (ctx, cs, &error)) {
+				if (dbus_error_is_set (&error)) {
+					HAL_INFO (("got error %s: %s", error.name, error.message));
+					dbus_error_free (&error);
+				}
+			}
 			libhal_device_free_changeset (cs);
 
 		}
diff --git a/libhal/libhal.c b/libhal/libhal.c
index e88ca3d..376807b 100644
--- a/libhal/libhal.c
+++ b/libhal/libhal.c
@@ -3949,6 +3949,8 @@ libhal_device_commit_changeset (LibHalCo
 		return FALSE;
 	}
 
+	dbus_message_unref (message);
+	dbus_message_unref (reply);
 	return TRUE;
 }
 
@@ -3984,6 +3986,7 @@ libhal_device_free_changeset (LibHalChan
 			fprintf (stderr, "%s %d : unknown change_type %d\n", __FILE__, __LINE__, elem->change_type);
 			break;
 		}
+		free (elem->key);
 		free (elem);
 	}
 


Index: hal.spec
===================================================================
RCS file: /cvs/dist/rpms/hal/FC-6/hal.spec,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- hal.spec	14 Nov 2006 22:59:54 -0000	1.111
+++ hal.spec	13 Dec 2006 22:50:13 -0000	1.112
@@ -22,7 +22,7 @@
 Summary: Hardware Abstraction Layer
 Name: hal
 Version: 0.5.8.1
-Release: 5%{?dist}
+Release: 6%{?dist}
 URL: http://www.freedesktop.org/Software/hal
 Source0: %{name}-%{version}.tar.gz
 Source1: 99-redhat-storage-policy-fixed-drives.fdi
@@ -34,6 +34,7 @@
 Patch4: hal-0.5.8.1-partutil-fix.patch
 Patch5: hal-alignment.patch
 Patch6: hal-0.5.8.1-remove-link-not-remove.patch
+Patch7: hal-0.5.8.1-ups-leak.patch
 
 License: AFL/GPL
 Group: System Environment/Libraries
@@ -112,6 +113,7 @@
 %patch4 -p1 -b .partutil-fix
 %patch5 -p1 -b .alignment
 %patch6 -p1 -b .link
+%patch7 -p1 -b .fix-ups
 
 %build
 %configure --disable-docbook-docs --with-os-type=redhat --disable-policy-kit
@@ -225,6 +227,10 @@
 %{_datadir}/applications/*.desktop
 
 %changelog
+* Wed Dec 13 2006 David Zeuthen <davidz at redhat.com> - 0.5.8.1-6%{?dist}
+- Fix leak when driving a UPS
+- Resolves: #214204
+
 * Tue Nov 14 2006 David Zeuthen <davidz at redhat.com> - 0.5.8.1-5%{?dist}
 - Alignment fixes on ia64; Add patch to not crash when using D-Bus 1.0
 




More information about the fedora-cvs-commits mailing list