1.99.25 ("Potato and Leek Soup") LIBSOUP_1_99_25
authorDan Winship <danw@src.gnome.org>
Tue, 29 Jul 2003 15:04:01 +0000 (15:04 +0000)
committerDan Winship <danw@src.gnome.org>
Tue, 29 Jul 2003 15:04:01 +0000 (15:04 +0000)
* configure.in: 1.99.25 ("Potato and Leek Soup")

* libsoup/soup-message.c (requeue_read_finished,
release_connection): Free the passed-in body data. Otherwise the
response body ends up getting leaked on most 3xx and 4xx
responses.
(soup_message_cleanup): Remove a piece of code that didn't
actually do anything and its associated confused comment.

* libsoup/soup-auth.c (ntlm_free): plug an occasional NTLM auth leak

* libsoup/soup-context.c (connection_free): plug a non-occasional
NTLM auth leak.

ChangeLog
configure.in
libsoup/soup-auth.c
libsoup/soup-context.c
libsoup/soup-message.c

index 6078974..94ab74e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2003-07-29  Dan Winship  <danw@ximian.com>
+
+       * configure.in: 1.99.25 ("Potato and Leek Soup")
+
+       * libsoup/soup-message.c (requeue_read_finished,
+       release_connection): Free the passed-in body data. Otherwise the
+       response body ends up getting leaked on most 3xx and 4xx
+       responses.
+       (soup_message_cleanup): Remove a piece of code that didn't
+       actually do anything and its associated confused comment.
+
+       * libsoup/soup-auth.c (ntlm_free): plug an occasional NTLM auth leak
+
+       * libsoup/soup-context.c (connection_free): plug a non-occasional
+       NTLM auth leak.
+
 2003-06-26  Joe Shaw  <joe@ximian.com>
 
        * configure.in: Version 1.99.24
index 24c886c..3be931c 100644 (file)
@@ -4,7 +4,7 @@ dnl *******************************************
 
 AC_INIT(libsoup/soup.h)
 
-AM_INIT_AUTOMAKE(libsoup, 1.99.24)
+AM_INIT_AUTOMAKE(libsoup, 1.99.25)
 AM_CONFIG_HEADER(config.h)
 AM_MAINTAINER_MODE
 AC_PROG_MAKE_SET
index d149084..c8e3305 100644 (file)
@@ -541,6 +541,7 @@ ntlm_free (SoupAuth *sa)
        SoupAuthNTLM *auth = (SoupAuthNTLM *) sa;
 
        g_free (auth->response);
+       g_free (auth->header);
        g_free (auth);
 }
 
index 940d80e..e5dc6e9 100644 (file)
@@ -257,6 +257,11 @@ connection_free (SoupConnection *conn)
        conn->server->connections =
                g_slist_remove (conn->server->connections, conn);
 
+       if (conn->auth) {
+               soup_auth_invalidate (conn->auth, conn->context);
+               soup_auth_free (conn->auth);
+       }
+
        g_io_channel_unref (conn->channel);
        soup_context_unref (conn->context);
        soup_socket_unref (conn->socket);
index e4a9d19..92079c1 100644 (file)
@@ -147,6 +147,9 @@ release_connection (const SoupDataBuffer *data,
 {
        SoupConnection *conn = user_data;
        soup_connection_release (conn);
+
+       if (data->owner == SOUP_BUFFER_SYSTEM_OWNED)
+               g_free (data->body);
 }
 
 static void 
@@ -183,11 +186,6 @@ soup_message_cleanup (SoupMessage *req)
                soup_transfer_read_unref (req->priv->read_tag);
                req->priv->read_tag = NULL;
                req->connection = NULL;
-               /* 
-                * The buffer doesn't belong to us until the message is 
-                * finished.
-                */
-               req->response.owner = SOUP_BUFFER_STATIC;
        }
 
        if (req->priv->read_tag) {
@@ -544,6 +542,9 @@ requeue_read_finished (const SoupDataBuffer *buf,
        SoupMessage *msg = user_data;
        SoupConnection *conn = msg->connection;
 
+       if (buf->owner == SOUP_BUFFER_SYSTEM_OWNED)
+               g_free (buf->body);
+
        soup_connection_set_used (msg->connection);
        if (!soup_connection_is_keep_alive (msg->connection))
                requeue_read_error (FALSE, msg);