make sure to call va_end if we hit an OOM error inside va_start (FDO Bug #12846)
authorJohn (J5) Palmieri <johnp@redhat.com>
Tue, 15 Jan 2008 20:30:19 +0000 (15:30 -0500)
committerJohn (J5) Palmieri <johnp@redhat.com>
Tue, 15 Jan 2008 20:30:19 +0000 (15:30 -0500)
2008-01-15  John (J5) Palmieri  <johnp@redhat.com>

* patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>

* dbus/dbus-errors.c (dbus_set_error): make sure to call va_end if we
hit an OOM error inside va_start (FDO Bug #12846)

ChangeLog
dbus/dbus-errors.c

index c3d79d1..84faa73 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,13 @@
        
        * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>
 
+       * dbus/dbus-errors.c (dbus_set_error): make sure to call va_end if we
+       hit an OOM error inside va_start (FDO Bug #12846)
+
+2008-01-15  John (J5) Palmieri  <johnp@redhat.com>
+       
+       * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>
+
        * dbus/dbus-connection.c (dbus_connection_send_with_reply): 
        fix possible crash if pending_return is NULL (FDO Bug #12673)
 
index 9629c68..6d14ff7 100644 (file)
@@ -384,6 +384,7 @@ dbus_set_error (DBusError  *error,
       if (!_dbus_string_append_printf_valist (&str, format, args))
         {
           _dbus_string_free (&str);
+          va_end (args);
           goto nomem;
         }
       va_end (args);