hal/libhal libhal.c,1.23,1.24

David Zeuthen david at freedesktop.org
Wed Aug 4 08:35:19 PDT 2004


Update of /cvs/hal/hal/libhal
In directory pdx:/tmp/cvs-serv27376/libhal

Modified Files:
	libhal.c 
Log Message:
2004-08-04  David Zeuthen  <david at fubar.dk>

	* doc/spec/hal-spec.xml.in: Work in progress

2004-08-04  David Zeuthen  <david at fubar.dk>

	Patch from Dan Williams <dcbw at redhat.com>
	
	* libhal/libhal.c (filter_func): fix small memory leaks when
	LibHalFunctions are missing



Index: libhal.c
===================================================================
RCS file: /cvs/hal/hal/libhal/libhal.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- libhal.c	2 Aug 2004 20:17:27 -0000	1.23
+++ libhal.c	4 Aug 2004 15:35:17 -0000	1.24
@@ -429,8 +429,8 @@
 					   DBUS_TYPE_INVALID)) {
 			if (ctx->functions->device_added != NULL) {
 				ctx->functions->device_added (ctx, udi);
-				dbus_free (udi);
 			}
+			dbus_free (udi);
 		}
 		return DBUS_HANDLER_RESULT_HANDLED;
 	} else
@@ -443,8 +443,8 @@
 					   DBUS_TYPE_INVALID)) {
 			if (ctx->functions->device_removed != NULL) {
 				ctx->functions->device_removed (ctx, udi);
-				dbus_free (udi);
 			}
+			dbus_free (udi);
 		}
 		return DBUS_HANDLER_RESULT_HANDLED;
 	} else
@@ -461,9 +461,9 @@
 				ctx->functions->device_new_capability (ctx, 
 								       udi,
 								  capability);
-				dbus_free (udi);
-				dbus_free (capability);
 			}
+			dbus_free (udi);
+			dbus_free (capability);
 		}
 		return DBUS_HANDLER_RESULT_HANDLED;
 	} else




More information about the hal-commit mailing list