diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c
index 607b911..ba66e8d 100644
--- a/libsoup/soup-headers.c
+++ b/libsoup/soup-headers.c
@@ -740,6 +740,8 @@ parse_param_list (const char *header, char delim)
 
 		if (override || !g_hash_table_lookup (params, item))
 			g_hash_table_replace (params, item, value);
+		else
+			g_free (item);
 	}
 
 	g_slist_free (list);
diff --git a/libsoup/soup-session-sync.c b/libsoup/soup-session-sync.c
index 8cc7ab5..3719dc2 100644
--- a/libsoup/soup-session-sync.c
+++ b/libsoup/soup-session-sync.c
@@ -444,4 +444,6 @@ flush_queue (SoupSession *session)
 			g_cond_wait (priv->cond, priv->lock);
 	} while (!done);
 	g_mutex_unlock (priv->lock);
+
+	g_hash_table_destroy (current);
 }
diff --git a/tests/dns.c b/tests/dns.c
index d0101ee..6c44800 100644
--- a/tests/dns.c
+++ b/tests/dns.c
@@ -20,6 +20,8 @@ resolve_callback (SoupAddress *addr, guint status, gpointer data)
 	}
 	printf ("\n");
 
+	g_object_unref (addr);
+
 	nlookups--;
 	if (nlookups == 0)
 		g_main_loop_quit (loop);
