free the buffers after the printed them in the error-msg

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1989 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.18
Jan Kneschke 2007-09-06 21:36:38 +00:00
parent a3dcc8b505
commit 5c333340be
1 changed files with 2 additions and 4 deletions

View File

@ -831,19 +831,17 @@ int http_auth_basic_check(server *srv, connection *con, mod_auth_plugin_data *p,
username = buffer_init();
if (!base64_decode(username, realm_str)) {
buffer_free(username);
log_error_write(srv, __FILE__, __LINE__, "sb", "decodeing base64-string failed", username);
buffer_free(username);
return 0;
}
/* r2 == user:password */
if (NULL == (pw = strchr(username->ptr, ':'))) {
buffer_free(username);
log_error_write(srv, __FILE__, __LINE__, "sb", ": is missing in", username);
buffer_free(username);
return 0;
}