* bus/bus.c (process_config_first_time_only): get rid of an unused
authorOlivier Andrieu <oliv__a@users.sourceforge.net>
Tue, 10 Aug 2004 21:32:25 +0000 (21:32 +0000)
committerOlivier Andrieu <oliv__a@users.sourceforge.net>
Tue, 10 Aug 2004 21:32:25 +0000 (21:32 +0000)
  DBusError that was causing a memoy leak (bug #989).

* dbus/dbus-keyring.c, dbus/dbus-message.c: fix compilation on
  Solaris/Forte C (bug #974)

* bus/main.c (main): plug two minuscule memleaks.

ChangeLog
bus/bus.c
bus/main.c
dbus/dbus-keyring.c
dbus/dbus-message.c

index f9344e7..0727428 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-08-10  Olivier Andrieu  <oliv__a@users.sourceforge.net>
+
+       * bus/bus.c (process_config_first_time_only): get rid of an unused
+       DBusError that was causing a memoy leak (bug #989).
+
+       * dbus/dbus-keyring.c, dbus/dbus-message.c:
+       fix compilation on Solaris/Forte C (bug #974)
+
+       * bus/main.c (main): plug two minuscule memleaks.
+
 2004-08-10  Havoc Pennington  <hp@redhat.com>
 
        * doc/dbus-tutorial.xml: add some more info on GLib bindings
index c732280..c66b7b3 100644 (file)
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -282,17 +282,14 @@ process_config_first_time_only (BusContext      *context,
     {
       DBusString u;
       DBusStat stbuf;
-      DBusError tmp_error;
       
-      dbus_error_init (&tmp_error);
       _dbus_string_init_const (&u, pidfile);
       
-      if (_dbus_stat (&u, &stbuf, &tmp_error))
+      if (_dbus_stat (&u, &stbuf, NULL))
        {
          dbus_set_error (error, DBUS_ERROR_FAILED,
                          "The pid file \"%s\" exists, if the message bus is not running, remove this file",
                          pidfile);
-         dbus_error_free (&tmp_error);
          goto failed;
        }
     }
index 391627f..01a6dd4 100644 (file)
@@ -351,6 +351,7 @@ main (int argc, char **argv)
           print_addr_fd = val;
         }
     }
+  _dbus_string_free (&addr_fd);
 
   print_pid_fd = -1;
   if (print_pid)
@@ -372,6 +373,7 @@ main (int argc, char **argv)
           print_pid_fd = val;
         }
     }
+  _dbus_string_free (&pid_fd);
 
   if (!bus_selinux_init ())
     {
index d144435..9877dca 100644 (file)
@@ -291,7 +291,7 @@ add_new_key (DBusKey  **keys_p,
   DBusKey *new;
   DBusString bytes;
   int id;
-  unsigned long timestamp;
+  long timestamp;
   const unsigned char *s;
   dbus_bool_t retval;
   DBusKey *keys;
index dc0a6a6..b191337 100644 (file)
@@ -5480,8 +5480,10 @@ _dbus_message_loader_queue_messages (DBusMessageLoader *loader)
          return TRUE;
         }      
       
-      header_len_unsigned = _dbus_unpack_uint32 (byte_order, header_data + 4);
-      body_len_unsigned = _dbus_unpack_uint32 (byte_order, header_data + 8);
+      header_len_unsigned = _dbus_unpack_uint32 (byte_order, 
+                                                 (const unsigned char *) header_data + 4);
+      body_len_unsigned = _dbus_unpack_uint32 (byte_order, 
+                                               (const unsigned char *) header_data + 8);
 
       if (header_len_unsigned < 16)
         {