[pulseaudio-commits] 3 commits - src/pulsecore
Arun Raghavan
arun at kemper.freedesktop.org
Wed Aug 10 16:54:35 UTC 2016
src/pulsecore/shm.c | 8 +++++---
src/pulsecore/sink-input.c | 4 +++-
src/pulsecore/source-output.c | 6 ++++--
3 files changed, 12 insertions(+), 6 deletions(-)
New commits:
commit fd2c630e33c8757c3fe269bc9df63a53acdca40a
Author: Arun Raghavan <arun at arunraghavan.net>
Date: Wed Aug 10 21:43:32 2016 +0530
shm: Wrap memfd-specific code in relevant ifdef
Doesn't really affect logic, but Coverity reports this as dead-code, and
I figure it makes sense to be consistent about our use of HAVE_MEMFD.
CID: 1352045
diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c
index 9dea0a5..8bd7ed7 100644
--- a/src/pulsecore/shm.c
+++ b/src/pulsecore/shm.c
@@ -201,12 +201,14 @@ static int sharedmem_create(pa_shm *m, pa_mem_type_t type, size_t size, mode_t m
/* For memfds, we keep the fd open until we pass it
* to the other PA endpoint over unix domain socket. */
- if (type == PA_MEM_TYPE_SHARED_MEMFD)
- m->fd = fd;
- else {
+ if (type != PA_MEM_TYPE_SHARED_MEMFD) {
pa_assert_se(pa_close(fd) == 0);
m->fd = -1;
}
+#if HAVE_MEMFD
+ else
+ m->fd = fd;
+#endif
return 0;
commit d0428f47f4265bf71f1288b2e93399f1072101b7
Author: Arun Raghavan <arun at arunraghavan.net>
Date: Wed Aug 10 21:37:12 2016 +0530
source-output: Fix copy-pasto
CID: 1352047
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 6c48bbc..c70af7a 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -1108,7 +1108,7 @@ void pa_source_output_set_property(pa_source_output *o, const char *key, const c
new_value = "(unset)";
}
- if (PA_SINK_INPUT_IS_LINKED(o->state)) {
+ if (PA_SOURCE_OUTPUT_IS_LINKED(o->state)) {
pa_log_debug("Source output %u: proplist[%s]: %s -> %s", o->index, key, old_value, new_value);
pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_PROPLIST_CHANGED], o);
pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT | PA_SUBSCRIPTION_EVENT_CHANGE, o->index);
commit 2599a35721b4307ad722fc4d43a711d5f33d24bf
Author: Arun Raghavan <arun at arunraghavan.net>
Date: Wed Aug 10 21:29:56 2016 +0530
sink-input,source-output: Fix a leak during property change logging
CID: 1352052
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index a7f6d55..1ed5dda 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -1436,8 +1436,10 @@ void pa_sink_input_set_property(pa_sink_input *i, const char *key, const char *v
if (value && old_value) {
if (pa_streq(value, old_value))
goto finish;
- } else
+ } else {
+ pa_xfree(old_value);
old_value = pa_xstrdup("(data)");
+ }
} else {
if (!value)
goto finish;
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 9e951ff..6c48bbc 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -1089,8 +1089,10 @@ void pa_source_output_set_property(pa_source_output *o, const char *key, const c
if (value && old_value) {
if (pa_streq(value, old_value))
goto finish;
- } else
+ } else {
+ pa_xfree(old_value);
old_value = pa_xstrdup("(data)");
+ }
} else {
if (!value)
goto finish;
More information about the pulseaudio-commits
mailing list