diff options
author | Wim Taymans <wtaymans@redhat.com> | 2019-12-12 16:27:33 +0100 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2019-12-12 16:27:33 +0100 |
commit | 3e1eeb1c0358bb5d3051ce0db8d64ed3a548f0c7 (patch) | |
tree | 53c2900210a64e42650359193fecec408e9f744f | |
parent | 2a142edadb5e08615b29af6a253ea18aecb87f8b (diff) |
filter: handle context allocation failure
-rw-r--r-- | src/pipewire/filter.c | 4 | ||||
-rw-r--r-- | src/pipewire/stream.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/pipewire/filter.c b/src/pipewire/filter.c index 4e3ba5cd..d7f57077 100644 --- a/src/pipewire/filter.c +++ b/src/pipewire/filter.c @@ -999,8 +999,8 @@ pw_filter_new_simple(struct pw_loop *loop, return NULL; context = pw_context_new(loop, NULL, 0); - - pw_fill_connect_properties(context, props); + if (context == NULL) + return NULL; impl = filter_new(context, name, props, props); if (impl == NULL) { diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index acffe814..0c8ea305 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -1120,8 +1120,8 @@ pw_stream_new_simple(struct pw_loop *loop, return NULL; context = pw_context_new(loop, NULL, 0); - - pw_fill_connect_properties(context, props); + if (context == NULL) + return NULL; impl = stream_new(context, name, props, NULL); if (impl == NULL) { |