hald, invalid free and new udev location

Sjoerd Simons sjoerd at air.luon.net
Fri Mar 5 11:00:52 EET 2004


Hi,

  Current cvs of hal tries to free() a static string inside a
  sysfs_class_device struct. And as someone noted already, udevinfo is
  placed in /usr/bin this week :)
  
  Attached patch fixes these things.

  Sjoerd
-- 
Anything cut to length will be too short.
-------------- next part --------------
Index: hald/linux/linux_class_v4l.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/linux_class_v4l.c,v
retrieving revision 1.5
diff -u -u -r1.5 linux_class_v4l.c
--- hald/linux/linux_class_v4l.c	3 Mar 2004 17:56:56 -0000	1.5
+++ hald/linux/linux_class_v4l.c	5 Mar 2004 08:57:06 -0000
@@ -233,8 +233,6 @@
 	    ("linux.sysfs_path_device", sysdevice_sysfs_path, TRUE,
 	     visit_class_device_v4l_got_sysdevice, (void *) d, NULL,
 	     is_probing ? 0 : HAL_LINUX_HOTPLUG_TIMEOUT);
-
-	free (sysdevice_sysfs_path);
 }
 
 /** Callback when the sysdevice is found or if there is no sysdevice.. This is
Index: hald/linux/linux_common.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/linux_common.c,v
retrieving revision 1.10
diff -u -u -r1.10 linux_common.c
--- hald/linux/linux_common.c	3 Mar 2004 17:56:56 -0000	1.10
+++ hald/linux/linux_common.c	5 Mar 2004 08:57:06 -0000
@@ -346,6 +346,7 @@
 udevinfo_path (void)
 {
 	char *possible_paths[] = { "/sbin/udevinfo",
+		"/usr/bin/udevinfo",
 		"/usr/sbin/udevinfo",
 		"/usr/local/sbin/udevinfo"
 	};


More information about the xdg mailing list