Commit 1c1d0c78 authored by Georg Chini's avatar Georg Chini
Browse files

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: <!543>
parent f760143c
......@@ -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;
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment