diff --git a/tmp/soup-auth-digest.c b/libsoup/soup-auth-digest.c
index 90718c6..f675311 100644
--- a/tmp/soup-auth-digest.c
+++ b/libsoup/soup-auth-digest.c
@@ -312,6 +312,11 @@ authenticate (SoupAuth *auth, const char *username, const char *password)
 	SoupAuthDigestPrivate *priv = SOUP_AUTH_DIGEST_GET_PRIVATE (auth);
 	char *bgen;
 
+	if (priv->user)
+                g_free (priv->user);
+        if (priv->cnonce)
+                g_free (priv->cnonce);
+
 	/* Create client nonce */
 	bgen = g_strdup_printf ("%p:%lu:%lu",
 				auth,
