1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2025-02-02 15:07:36 -05:00

Fix: Fixed a memory leak caused by assigning the client's role twice in some cases

This commit is contained in:
Philipp Schafft 2018-09-20 08:07:29 +00:00
parent 9ffd16cb60
commit 1b5572f700

View File

@ -365,7 +365,7 @@ static void __handle_auth_client (auth_t *auth, auth_client *auth_user) {
if (auth_user->client->acl)
acl_release(auth_user->client->acl);
acl_addref(auth_user->client->acl = auth->acl);
if (auth->role) /* TODO: Handle errors here */
if (auth->role && !auth_user->client->role) /* TODO: Handle errors here */
auth_user->client->role = strdup(auth->role);
}