mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
stream-restore: Fix use of uninitialized variable
The variable card_name in sink_input_preferred_sink_changed_cb and source_output_preferred_source_changed_cb could be used uninitialized, which leads to invalid database entries. This patch fixes the problem. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/543>
This commit is contained in:
parent
f760143c22
commit
1c1d0c7827
1 changed files with 2 additions and 2 deletions
|
|
@ -1594,7 +1594,7 @@ static void update_preferred_device(struct userdata *u, const char *name, const
|
|||
static pa_hook_result_t sink_input_preferred_sink_changed_cb(pa_core *c, pa_sink_input *sink_input, struct userdata *u) {
|
||||
char *name;
|
||||
pa_sink *sink;
|
||||
const char *card_name;
|
||||
const char *card_name = NULL;
|
||||
|
||||
pa_assert(c);
|
||||
pa_assert(sink_input);
|
||||
|
|
@ -1723,7 +1723,7 @@ static pa_hook_result_t source_output_fixate_hook_callback(pa_core *c, pa_source
|
|||
static pa_hook_result_t source_output_preferred_source_changed_cb(pa_core *c, pa_source_output *source_output, struct userdata *u) {
|
||||
char *name;
|
||||
pa_source *source;
|
||||
const char *card_name;
|
||||
const char *card_name = NULL;
|
||||
|
||||
pa_assert(c);
|
||||
pa_assert(source_output);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue