return message loader buffer in case of OOM (FDO Bug#12666)
authorJohn (J5) Palmieri <johnp@redhat.com>
Mon, 14 Jan 2008 23:09:14 +0000 (18:09 -0500)
committerJohn (J5) Palmieri <johnp@redhat.com>
Mon, 14 Jan 2008 23:09:14 +0000 (18:09 -0500)
2008-01-14  John (J5) Palmieri  <johnp@redhat.com>

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

* dbus/dbus-transport-socket.c(do_reading): return message
loader buffer in case of OOM (FDO Bug#12666)

ChangeLog
dbus/dbus-transport-socket.c

index a458d00..a8a63e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-01-14  John (J5) Palmieri  <johnp@redhat.com>
 
+       * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>
+
+       * dbus-1.0.2/dbus/dbus-transport-socket.c(do_reading): return message 
+       loader buffer in case of OOM (FDO Bug#12666)
+
+2008-01-14  John (J5) Palmieri  <johnp@redhat.com>
+
        * configure.in: add warning to output when libxml is selected since
        we don't have a libxml maintainer and expat works perfectly fine
        for what we need an xml parser for
index 05e3f3a..10b671c 100644 (file)
@@ -724,6 +724,10 @@ do_reading (DBusTransport *transport)
                                        buffer))
             {
               _dbus_verbose ("Out of memory decoding incoming data\n");
+              _dbus_message_loader_return_buffer (transport->loader,
+                                              buffer,
+                                              _dbus_string_get_length (buffer) - orig_len);
+
               oom = TRUE;
               goto out;
             }