From 73ddcda842935c2aed6dd57d141688fe61985b26 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 19 Nov 2008 16:14:27 +0100 Subject: [PATCH] Fix segfault with invalid meter plugin option snd_pcm_meter_add_scope_conf() may cause a segfault when pcm_scope_type isn't defined. Initialize type_conf properly to avoid it. Signed-off-by: Takashi Iwai --- src/pcm/pcm_meter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pcm/pcm_meter.c b/src/pcm/pcm_meter.c index 0dedb423..83d643a4 100644 --- a/src/pcm/pcm_meter.c +++ b/src/pcm/pcm_meter.c @@ -603,7 +603,7 @@ static int snd_pcm_meter_add_scope_conf(snd_pcm_t *pcm, const char *name, snd_config_iterator_t i, next; const char *id; const char *lib = NULL, *open_name = NULL, *str = NULL; - snd_config_t *c, *type_conf; + snd_config_t *c, *type_conf = NULL; int (*open_func)(snd_pcm_t *, const char *, snd_config_t *, snd_config_t *) = NULL; snd_pcm_meter_t *meter = pcm->private_data; -- 2.47.1