From 7b0a0ab132654eb064e4aa561e69ff1521482e96 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 7 Jul 2010 17:34:47 +0000 Subject: [PATCH] code cleanup --- doc/examples/basicauthentication.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/examples/basicauthentication.c b/doc/examples/basicauthentication.c index 389d8bb7..c96a8da9 100644 --- a/doc/examples/basicauthentication.c +++ b/doc/examples/basicauthentication.c @@ -72,15 +72,14 @@ is_authenticated (struct MHD_Connection *connection, strcat (expected, password); expected_b64 = string_to_base64 (expected); + free (expected); if (NULL == expected_b64) - return 0; + return 0; - strcpy (expected, strbase); authenticated = (strcmp (headervalue + strlen (strbase), expected_b64) == 0); free (expected_b64); - return authenticated; }