mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 05:59:45 -05:00
Fix full_uri memory leak in error path
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -839,6 +839,8 @@ rsp_request(struct evhttp_request *req)
|
||||
if (!uri)
|
||||
{
|
||||
rsp_send_error(req, "Server error");
|
||||
|
||||
free(full_uri);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user