hal: Branch 'master'

Danny Kukawka dkukawka at kemper.freedesktop.org
Thu Dec 6 12:16:15 PST 2007


 hald/device_info.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit ab31f06ca5388d4915156d3dac60c3fc52908260
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Thu Dec 6 21:16:02 2007 +0100

    fix possible segfault on fdi-cache recreation
    
    This fixes https://bugzilla.novell.com/show_bug.cgi?id=344231, where
    HAL crash if a fdi-file get changed/updated and a new device appears
    after the recreation of the FDI cache.

diff --git a/hald/device_info.c b/hald/device_info.c
index d601e60..88936cd 100644
--- a/hald/device_info.c
+++ b/hald/device_info.c
@@ -1119,13 +1119,15 @@ rules_match_and_merge_device (void *fdi_rules_list, HalDevice *d)
 /* merge the device info type, either preprobe, info or policy */
 gboolean
 di_search_and_merge (HalDevice *d, DeviceInfoType type){
-	struct cache_header *header = (struct cache_header*) RULES_PTR(0);
+	struct cache_header *header;
 
         /* make sure our fdi rule cache is up to date */
         if (di_cache_coherency_check (FALSE)) {
                 di_rules_init ();
 	}
 
+	header = (struct cache_header*) RULES_PTR(0);
+
 	switch (type) {
 	case DEVICE_INFO_TYPE_PREPROBE:
 		/* Checking if we have at least one preprobe rule */


More information about the hal-commit mailing list