Fix full_uri memory leak in error path

This commit is contained in:
Julien BLACHE 2010-09-08 19:19:17 +02:00
parent e5ec6c7c4f
commit 535d691a4a
3 changed files with 4 additions and 0 deletions

View File

@ -2971,6 +2971,7 @@ daap_request(struct evhttp_request *req)
uri = strdup(full_uri);
if (!uri)
{
free(full_uri);
evhttp_send_error(req, HTTP_BADREQUEST, "Bad Request");
return;
}

View File

@ -1613,6 +1613,7 @@ dacp_request(struct evhttp_request *req)
uri = strdup(full_uri);
if (!uri)
{
free(full_uri);
evhttp_send_error(req, HTTP_BADREQUEST, "Bad Request");
return;
}

View File

@ -839,6 +839,8 @@ rsp_request(struct evhttp_request *req)
if (!uri)
{
rsp_send_error(req, "Server error");
free(full_uri);
return;
}