summaryrefslogtreecommitdiff
path: root/tests/chunk-test.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2008-09-30 17:16:48 +0000
committerDan Winship <danw@src.gnome.org>2008-09-30 17:16:48 +0000
commit22383843409a9db96eeacccd93d1aaa028930e47 (patch)
tree2ae391deff582b5be63b51f79963191bc199907e /tests/chunk-test.c
parentdd40c1515f1687c614f2dc670aca49fad8ad2088 (diff)
downloadlibsoup-22383843409a9db96eeacccd93d1aaa028930e47.tar.gz
libsoup-22383843409a9db96eeacccd93d1aaa028930e47.tar.bz2
libsoup-22383843409a9db96eeacccd93d1aaa028930e47.zip
soup_value_hash_insert_value() copies the value, so we have to
* 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 svn path=/trunk/; revision=1169
Diffstat (limited to 'tests/chunk-test.c')
-rw-r--r--tests/chunk-test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/chunk-test.c b/tests/chunk-test.c
index 13238cf2..65db5dc3 100644
--- a/tests/chunk-test.c
+++ b/tests/chunk-test.c
@@ -69,6 +69,7 @@ clear_buffer_ptr (gpointer data)
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 @@ clear_buffer_ptr (gpointer data)
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);
}