diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-11-19 16:14:27 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-19 16:14:27 +0100 |
commit | 73ddcda842935c2aed6dd57d141688fe61985b26 (patch) | |
tree | e19b2bd0ff5181716c46dd78c5cc5fc171d9858d | |
parent | cb1fd837d93fbc495eab4aa3efaf8072937ff2df (diff) | |
download | alsa-lib-73ddcda842935c2aed6dd57d141688fe61985b26.tar.gz |
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 <tiwai@suse.de>
-rw-r--r-- | src/pcm/pcm_meter.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |