[libsoup] valgrind run...



commit 55d172084943a64ca5683b8023a5f5f6e501d7ac
Author: Dan Winship <danw gnome org>
Date:   Sun Feb 12 09:21:09 2012 -0500

    valgrind run...

 libsoup/soup-connection.c |    3 +-
 libsoup/soup-session.c    |    5 ++-
 tests/auth-test.c         |    2 +
 tests/libsoup.supp        |   81 +++++++++++++++++++++++++++++++++++++++++---
 4 files changed, 83 insertions(+), 8 deletions(-)
---
diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c
index 3b8ae1b..b299e2b 100644
--- a/libsoup/soup-connection.c
+++ b/libsoup/soup-connection.c
@@ -108,7 +108,8 @@ finalize (GObject *object)
 		g_object_unref (priv->tunnel_addr);
 	if (priv->proxy_uri)
 		soup_uri_free (priv->proxy_uri);
-
+	if (priv->tlsdb)
+		g_object_unref (priv->tlsdb);
 	if (priv->async_context)
 		g_main_context_unref (priv->async_context);
 
diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c
index 67d4ba0..f5f7f72 100644
--- a/libsoup/soup-session.c
+++ b/libsoup/soup-session.c
@@ -1633,9 +1633,12 @@ soup_session_redirect_message (SoupSession *session, SoupMessage *msg)
 		return FALSE;
 
 	item = soup_message_queue_lookup (soup_session_get_queue (session), msg);
-	if (!item)
+	if (!item) {
+		soup_uri_free (new_uri);
 		return FALSE;
+	}
 	if (item->redirection_count >= SOUP_SESSION_MAX_REDIRECTION_COUNT) {
+		soup_uri_free (new_uri);
 		soup_session_cancel_message (session, msg, SOUP_STATUS_TOO_MANY_REDIRECTS);
 		soup_message_queue_item_unref (item);
 		return FALSE;
diff --git a/tests/auth-test.c b/tests/auth-test.c
index 8f3b193..3bbee87 100644
--- a/tests/auth-test.c
+++ b/tests/auth-test.c
@@ -1056,6 +1056,7 @@ do_auth_close_test (void)
 		SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, server_basic_auth_callback,
 		NULL);
 	soup_server_add_auth_domain (server, basic_auth_domain);
+	g_object_unref (basic_auth_domain);
 
 	g_signal_connect (server, "request-started",
 			  G_CALLBACK (auth_close_request_started), NULL);
@@ -1065,6 +1066,7 @@ do_auth_close_test (void)
 			  G_CALLBACK (auth_close_authenticate), &acd);
 
 	acd.msg = soup_message_new_from_uri ("GET", uri);
+	soup_uri_free (uri);
 	soup_session_send_message (acd.session, acd.msg);
 
 	if (acd.msg->status_code != SOUP_STATUS_OK) {
diff --git a/tests/libsoup.supp b/tests/libsoup.supp
index c72f499..24c6516 100644
--- a/tests/libsoup.supp
+++ b/tests/libsoup.supp
@@ -41,6 +41,13 @@
    fun:g_thread_init_glib
 }
 {
+   glib/g_thread_self
+   Memcheck:Leak
+   ...
+   fun:g_slice_alloc0
+   fun:g_thread_self
+}
+{
    glib/g_type_register_static
    Memcheck:Leak
    ...
@@ -173,6 +180,12 @@
    fun:_g_io_modules_ensure_loaded
 }
 {
+   glib/giomodules2
+   Memcheck:Leak
+   ...
+   fun:_g_io_module_get_default
+}
+{
    glib/proxydefault
    Memcheck:Leak
    ...
@@ -198,12 +211,6 @@
    fun:g_tls_backend_get_default_database
 }
 {
-   glib/tlscrypto
-   Memcheck:Leak
-   ...
-   fun:gcry_pthread_mutex_init
-}
-{
    glib/tlscache
    Memcheck:Leak
    ...
@@ -316,6 +323,31 @@
    ...
    fun:g_thread_create_posix_impl
 }
+{
+   glib/filenamecharsets
+   Memcheck:Leak
+   ...
+   fun:g_get_filename_charsets
+}
+{
+   glib/charset
+   Memcheck:Leak
+   ...
+   fun:g_get_charset
+}
+{
+   glib/gtlssessioncache
+   Memcheck:Leak
+   ...
+   fun:g_tls_backend_gnutls_store_session
+}
+{
+   glib/cached_poll_array
+   Memcheck:Leak
+   ...
+   fun:g_malloc_n
+   fun:g_main_context_iterate
+}
 
 # probably inlines the aggressive memcpy/memcmp
 {
@@ -331,6 +363,19 @@
    ...
    fun:gnutls_handshake
 }
+{
+   gnutls/init
+   Memcheck:Leak
+   ...
+   fun:gnutls_global_init
+}
+# known leak in gnutls 2.12, fixed in 3.0
+{
+   gnutls/server_key_leak
+   Memcheck:Leak
+   ...
+   fun:call_get_cert_callback
+}
 
 {
    libxml2/xmlInitParser
@@ -376,3 +421,27 @@
    ...
    fun:intern_header_name
 }
+
+
+# fixme?
+{
+   glib/gmuteximpl
+   Memcheck:Leak
+   ...
+   fun:g_mutex_impl_new
+   fun:g_mutex_get_impl
+}
+{
+   glib/gcondimpl
+   Memcheck:Leak
+   ...
+   fun:g_cond_impl_new
+   fun:g_cond_get_impl
+}
+{
+   glib/gprivateimpl
+   Memcheck:Leak
+   ...
+   fun:g_private_impl_new
+   fun:g_private_get_impl
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]