mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
module-raop: fix memory leak
Don't leak the pending messages.
This commit is contained in:
parent
af9d8072a3
commit
deda8a10d1
1 changed files with 7 additions and 0 deletions
|
|
@ -530,6 +530,8 @@ int pw_rtsp_client_connect(struct pw_rtsp_client *client,
|
|||
|
||||
int pw_rtsp_client_disconnect(struct pw_rtsp_client *client)
|
||||
{
|
||||
struct message *msg;
|
||||
|
||||
if (client->source == NULL)
|
||||
return 0;
|
||||
|
||||
|
|
@ -539,6 +541,11 @@ int pw_rtsp_client_disconnect(struct pw_rtsp_client *client)
|
|||
client->url = NULL;
|
||||
free(client->session_id);
|
||||
client->session_id = NULL;
|
||||
|
||||
spa_list_consume(msg, &client->messages, link) {
|
||||
spa_list_remove(&msg->link);
|
||||
free(msg);
|
||||
}
|
||||
pw_rtsp_client_emit_disconnected(client);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue