libsoup r1169 - in trunk: . libsoup tests
- From: danw svn gnome org
- To: svn-commits-list gnome org
- Subject: libsoup r1169 - in trunk: . libsoup tests
- Date: Tue, 30 Sep 2008 17:16:48 +0000 (UTC)
Author: danw
Date: Tue Sep 30 17:16:48 2008
New Revision: 1169
URL: http://svn.gnome.org/viewvc/libsoup?rev=1169&view=rev
Log:
* libsoup/soup-xmlrpc.c (parse_value):
soup_value_hash_insert_value() copies the value, so we have to
g_value_unset() our copy.
* tests/chunk-test.c:
* tests/misc-test.c:
* tests/ntlm-test.c: fix leaks
* tests/libsoup.supp: update
Modified:
trunk/ChangeLog
trunk/libsoup/soup-xmlrpc.c
trunk/tests/chunk-test.c
trunk/tests/libsoup.supp
trunk/tests/misc-test.c
trunk/tests/ntlm-test.c
Modified: trunk/libsoup/soup-xmlrpc.c
==============================================================================
--- trunk/libsoup/soup-xmlrpc.c (original)
+++ trunk/libsoup/soup-xmlrpc.c Tue Sep 30 17:16:48 2008
@@ -506,6 +506,7 @@
content = xmlNodeGetContent (mname);
soup_value_hash_insert_value (hash, (char *)content, &mgval);
xmlFree (content);
+ g_value_unset (&mgval);
}
g_value_init (value, G_TYPE_HASH_TABLE);
g_value_take_boxed (value, hash);
Modified: trunk/tests/chunk-test.c
==============================================================================
--- trunk/tests/chunk-test.c (original)
+++ trunk/tests/chunk-test.c Tue Sep 30 17:16:48 2008
@@ -69,6 +69,7 @@
debug_printf (2, " clearing chunk\n");
if (*buffer_ptr) {
(*buffer_ptr)->length = 0;
+ g_free ((char *)(*buffer_ptr)->data);
*buffer_ptr = NULL;
} else {
debug_printf (2, " chunk is already clear!\n");
@@ -83,7 +84,7 @@
static void
make_put_chunk (SoupBuffer **buffer, const char *text)
{
- *buffer = soup_buffer_new_with_owner (text, strlen (text),
+ *buffer = soup_buffer_new_with_owner (g_strdup (text), strlen (text),
buffer, clear_buffer_ptr);
}
Modified: trunk/tests/libsoup.supp
==============================================================================
--- trunk/tests/libsoup.supp (original)
+++ trunk/tests/libsoup.supp Tue Sep 30 17:16:48 2008
@@ -241,6 +241,52 @@
fun:g_type_register_static
}
{
+ glib/typereg14
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ fun:g_memdup
+ fun:type_node_any_new_W
+ fun:g_type_register_static
+}
+{
+ glib/typereg15
+ Memcheck:Leak
+ fun:realloc
+ fun:g_realloc
+ fun:type_set_qdata_W
+ fun:type_add_interface_Wm
+}
+{
+ glib/typereg16
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ fun:g_memdup
+ fun:type_node_any_new_W
+ fun:type_node_new_W
+ fun:g_type_register_static
+}
+{
+ glib/typereg17
+ Memcheck:Leak
+ fun:malloc
+ fun:realloc
+ fun:g_realloc
+ fun:type_set_qdata_W
+ fun:type_add_flags_W
+ fun:g_type_register_static
+}
+{
+ glib/typereg18
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ fun:type_set_qdata_W
+ fun:type_add_flags_W
+ fun:g_type_register_static
+}
+{
glib/interface1
Memcheck:Leak
fun:calloc
@@ -276,6 +322,15 @@
fun:g_type_add_interface_static
}
{
+ glib/interface5
+ Memcheck:Leak
+ fun:malloc
+ fun:realloc
+ fun:g_realloc
+ fun:type_iface_add_prerequisite_W
+ fun:g_type_interface_add_prerequisite
+}
+{
glib/paramspec1
Memcheck:Leak
fun:malloc
@@ -471,7 +526,6 @@
fun:g_malloc0
fun:type_iface_ensure_dflt_vtable_Wm
fun:type_iface_vtable_base_init_Wm
- fun:g_type_class_ref
}
{
glib/typeref8
@@ -480,7 +534,6 @@
fun:g_malloc
fun:g_memdup
fun:type_iface_vtable_base_init_Wm
- fun:g_type_class_ref
}
{
glib/typeref9
@@ -601,6 +654,37 @@
fun:g_thread_init
}
{
+ glib/langnames8
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ fun:g_slice_alloc
+ fun:g_hash_table_new_full
+ fun:g_hash_table_new
+ fun:read_aliases
+ fun:unalias_lang
+ fun:g_get_language_names
+ fun:_g_utils_thread_init
+ fun:g_thread_init_glib
+ fun:g_thread_init
+}
+{
+ glib/langnames9
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ fun:g_hash_table_resize
+ fun:g_hash_table_maybe_resize
+ fun:g_hash_table_insert_internal
+ fun:g_hash_table_insert
+ fun:read_aliases
+ fun:unalias_lang
+ fun:g_get_language_names
+ fun:_g_utils_thread_init
+ fun:g_thread_init_glib
+ fun:g_thread_init
+}
+{
glib/charsets
Memcheck:Leak
fun:malloc
@@ -796,6 +880,7 @@
fun:calloc
fun:g_malloc0
fun:g_hash_table_new_full
+ fun:g_hash_table_new
fun:g_data_initialize
}
{
@@ -878,7 +963,6 @@
Memcheck:Leak
fun:malloc
fun:xmlNewRMutex
- obj:/usr/lib/libxml2.so.2.6.31
fun:xmlDictCreate
fun:xmlInitParserCtxt
}
@@ -931,14 +1015,12 @@
gnutls/init6
Memcheck:Leak
fun:malloc
+ fun:do_malloc
fun:_gcry_malloc
- fun:gcry_malloc
- fun:gcry_xmalloc
- fun:gcry_xcalloc
+ fun:_gcry_xmalloc
+ fun:_gcry_xcalloc
fun:initialize
- fun:gcry_randomize
- fun:gc_pseudo_random
- fun:gnutls_global_init
+ fun:_gcry_randomize
}
{
gnutls/init7
@@ -954,14 +1036,11 @@
Memcheck:Leak
fun:malloc
fun:_gcry_private_malloc
+ fun:do_malloc
fun:_gcry_malloc
- fun:gcry_malloc
fun:_gcry_module_add
fun:gcry_cipher_register_default
fun:_gcry_cipher_init
- fun:global_init
- fun:gcry_check_version
- fun:gnutls_global_init
}
{
gnutls/init9
@@ -989,8 +1068,6 @@
fun:gcry_pthread_mutex_init
fun:_gcry_ath_init
fun:global_init
- fun:gcry_check_version
- fun:gnutls_global_init
}
{
gnutls/init12
@@ -999,8 +1076,6 @@
fun:gcry_pthread_mutex_init
fun:mutex_init
fun:initialize_basics
- fun:gcry_control
- fun:gnutls_global_init
}
{
gnutls/init13
@@ -1012,6 +1087,30 @@
fun:gcry_control
fun:gnutls_global_init
}
+{
+ gnutls/deflate
+ Memcheck:Cond
+ fun:longest_match
+ fun:deflate_fast
+ fun:deflate
+ fun:_gnutls_compress
+ fun:_gnutls_m_plaintext2compressed
+ fun:_gnutls_encrypt
+ fun:_gnutls_send_int
+ fun:gnutls_record_send
+}
+{
+ gnutls/handshake
+ Memcheck:Leak
+ fun:malloc
+ fun:_gnutls_mpi_dprint_lz
+ fun:_gnutls_dh_set_peer_public
+ fun:_gnutls_proc_dh_common_server_kx
+ fun:proc_dhe_server_kx
+ fun:_gnutls_recv_server_kx_message
+ fun:_gnutls_handshake_client
+ fun:gnutls_handshake
+}
{
libsoup/headers
Modified: trunk/tests/misc-test.c
==============================================================================
--- trunk/tests/misc-test.c (original)
+++ trunk/tests/misc-test.c Tue Sep 30 17:16:48 2008
@@ -151,6 +151,7 @@
g_object_add_weak_pointer (G_OBJECT (one), (gpointer *)&one);
two = soup_message_new ("GET", bad_uri);
g_object_add_weak_pointer (G_OBJECT (two), (gpointer *)&two);
+ g_free (bad_uri);
soup_session_queue_message (session, one, cu_one_completed, loop);
soup_session_queue_message (session, two, cu_two_completed, loop);
Modified: trunk/tests/ntlm-test.c
==============================================================================
--- trunk/tests/ntlm-test.c (original)
+++ trunk/tests/ntlm-test.c Tue Sep 30 17:16:48 2008
@@ -110,6 +110,7 @@
if (!strncmp (decoded, "alice:password", len) ||
!strncmp (decoded, "bob:password", len))
auth_required = FALSE;
+ g_free (decoded);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]