2003-05-16 Havoc Pennington <hp@redhat.com>
authorHavoc Pennington <hp@redhat.com>
Fri, 16 May 2003 16:48:07 +0000 (16:48 +0000)
committerHavoc Pennington <hp@redhat.com>
Fri, 16 May 2003 16:48:07 +0000 (16:48 +0000)
* bus/policy.c (free_rule_list_func): avoid a crash when passed
NULL as DBusHashTable is annoyingly likely to do.

ChangeLog
bus/policy.c

index 1d60b5a..8f9bfa0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-16  Havoc Pennington  <hp@redhat.com>
+
+       * bus/policy.c (free_rule_list_func): avoid a crash when passed
+       NULL as DBusHashTable is annoyingly likely to do.
+
 2003-05-16  Colin Walters  <walters@verbum.org>
 
        * tools/dbus-monitor.c: Add --session argument and usage()
index 74ed710..938f7da 100644 (file)
@@ -124,6 +124,9 @@ free_rule_list_func (void *data)
 {
   DBusList **list = data;
 
+  if (list == NULL) /* DBusHashTable is on crack */
+    return;
+  
   _dbus_list_foreach (list, free_rule_func, NULL);
   
   _dbus_list_clear (list);