[pulseaudio-commits] 3 commits - src/daemon src/modules src/pulsecore
Peter Meerwald
pmeerw at kemper.freedesktop.org
Tue Sep 15 23:14:10 PDT 2015
src/daemon/cmdline.c | 2 +-
src/modules/module-card-restore.c | 5 ++++-
src/pulsecore/protocol-native.c | 4 +++-
3 files changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 3193f6a2c459948a997a0de57778a8a2bf599436
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date: Mon Sep 14 17:23:29 2015 +0200
modules: Fix entry leak in module-card-restore
CID 1323585
entry_read() allocates an entry which must be freed
diff --git a/src/modules/module-card-restore.c b/src/modules/module-card-restore.c
index 5c55cec..3725d30 100644
--- a/src/modules/module-card-restore.c
+++ b/src/modules/module-card-restore.c
@@ -438,12 +438,15 @@ static pa_hook_result_t profile_available_changed_callback(void *hook_data, void
if (!entry)
return PA_HOOK_OK;
- if (!pa_streq(profile->name, entry->profile))
+ if (!pa_streq(profile->name, entry->profile)) {
+ entry_free(entry);
return PA_HOOK_OK;
+ }
pa_log_info("Card %s profile %s became available, activating.", card->name, profile->name);
pa_card_set_profile(profile->card, profile, true);
+ entry_free(entry);
return PA_HOOK_OK;
}
commit d36baaf81ef3512ab01a7d9cb6042e277663229f
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date: Mon Sep 14 17:50:36 2015 +0200
core: Add missing return on protocol error
CID 1323582
when a protocol error occors, better bail out :)
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index ec223be..145db04 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -2639,8 +2639,10 @@ static void setup_srbchannel(pa_native_connection *c) {
static void command_enable_srbchannel(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
- if (tag != (uint32_t) (size_t) c->srbpending)
+ if (tag != (uint32_t) (size_t) c->srbpending) {
protocol_error(c);
+ return;
+ }
pa_log_debug("Client enabled srbchannel.");
pa_pstream_set_srbchannel(c->pstream, c->srbpending);
commit cadbb2b3150e51356d4ae3edf6d07108d9e0dfbd
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date: Mon Sep 14 16:54:59 2015 +0200
daemon: No need to check optarg, -p requires argument
CID 1323589
getopt() makes sure that we have an argument for -p
remove the broken check for optarg being set
diff --git a/src/daemon/cmdline.c b/src/daemon/cmdline.c
index a2fb6d5..68a02e3 100644
--- a/src/daemon/cmdline.c
+++ b/src/daemon/cmdline.c
@@ -312,7 +312,7 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
case 'p':
case ARG_DL_SEARCH_PATH:
pa_xfree(conf->dl_search_path);
- conf->dl_search_path = *optarg ? pa_xstrdup(optarg) : NULL;
+ conf->dl_search_path = pa_xstrdup(optarg);
break;
case 'n':
More information about the pulseaudio-commits
mailing list