mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-09 23:50:15 -04:00
modules: handle some property allocation errors
This commit is contained in:
parent
b66614063d
commit
cc2c7cc591
2 changed files with 14 additions and 6 deletions
|
|
@ -981,6 +981,8 @@ static int rule_matched(void *data, const char *location, const char *action,
|
|||
|
||||
if (spa_streq(action, "create-stream")) {
|
||||
i->stream_props = pw_properties_copy(impl->stream_props);
|
||||
if (i->stream_props == NULL)
|
||||
return -errno;
|
||||
|
||||
pw_properties_update_string(i->stream_props, str, len);
|
||||
|
||||
|
|
@ -1026,6 +1028,8 @@ static int metadata_property(void *data, uint32_t id,
|
|||
info.id = SPA_ID_INVALID;
|
||||
info.on_demand_id = on_demand_id;
|
||||
info.stream_props = pw_properties_copy(impl->stream_props);
|
||||
if (info.stream_props == NULL)
|
||||
return -errno;
|
||||
|
||||
pw_properties_update_string(info.stream_props, value, strlen(value));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue