Browse Source

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 15 years ago
parent
commit
5c333340be
  1. 6
      src/http_auth.c

6
src/http_auth.c

@ -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;
}

Loading…
Cancel
Save