mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-07-01 13:14:10 -04:00
modules: handle allocation errors gracefully
This commit is contained in:
parent
24f9b9a335
commit
dd695ee5a7
6 changed files with 35 additions and 4 deletions
|
|
@ -622,6 +622,12 @@ static struct session *make_session(struct impl *impl, struct service_info *info
|
|||
str = pw_properties_get(props, "sess.name");
|
||||
sess->name = str ? strdup(str) : strdup("RTP Session");
|
||||
|
||||
if (sess->info.name == NULL || sess->info.type == NULL ||
|
||||
sess->info.domain == NULL || sess->name == NULL) {
|
||||
free_session(sess);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (impl->ts_refclk != NULL)
|
||||
pw_properties_setf(props, "rtp.sender-ts-offset", "%u", impl->ts_offset);
|
||||
pw_properties_setf(props, "rtp.sender-ssrc", "%u", sess->ssrc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue