mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-05 06:46:28 -04:00
raop: handle allocation error and avoid crash later
This commit is contained in:
parent
782986baa1
commit
bd8eab3ffb
1 changed files with 4 additions and 0 deletions
|
|
@ -90,6 +90,10 @@ struct pw_rtsp_client *pw_rtsp_client_new(struct pw_loop *main_loop,
|
||||||
spa_list_init(&client->pending);
|
spa_list_init(&client->pending);
|
||||||
spa_hook_list_init(&client->listener_list);
|
spa_hook_list_init(&client->listener_list);
|
||||||
client->headers = pw_properties_new(NULL, NULL);
|
client->headers = pw_properties_new(NULL, NULL);
|
||||||
|
if (client->headers == NULL) {
|
||||||
|
free(client);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
pw_array_init(&client->content, 4096);
|
pw_array_init(&client->content, 4096);
|
||||||
client->recv_state = CLIENT_RECV_NONE;
|
client->recv_state = CLIENT_RECV_NONE;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue