mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 16:25:03 -05:00
Fix full_uri memory leak in error path
This commit is contained in:
parent
e5ec6c7c4f
commit
535d691a4a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user