Do not free results from http_request_header().

This commit is contained in:
Joris Vink 2016-02-21 18:29:06 +01:00
parent 318647945f
commit 0294212a3c
1 changed files with 1 additions and 5 deletions

View File

@ -146,16 +146,12 @@ kore_auth_cookie(struct http_request *req, struct kore_auth *auth)
static int
kore_auth_header(struct http_request *req, struct kore_auth *auth)
{
int r;
char *header;
if (!http_request_header(req, auth->value, &header))
return (KORE_RESULT_ERROR);
r = kore_validator_check(req, auth->validator, header);
kore_mem_free(header);
return (r);
return (kore_validator_check(req, auth->validator, header));
}
static int