[alsa-devel] [PATCH 1/1] alsa-lib: fixed coverity reported issues under "REVERSE_INULL" checker.

sudarshan.bisht at nokia.com sudarshan.bisht at nokia.com
Thu Mar 17 10:28:07 CET 2011


From: Sudarshan <sudarshan.bisht at nokia.com>

---
 src/control/setup.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/control/setup.c b/src/control/setup.c
index eecda45..79f2b76 100644
--- a/src/control/setup.c
+++ b/src/control/setup.c
@@ -398,7 +398,7 @@ static int snd_config_get_ctl_elem_value(snd_config_t *conf,
 
 static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_data)
 {
-	snd_config_t *conf;
+	snd_config_t *conf = NULL ;
 	snd_config_iterator_t i, next;
 	char *tmp;
 	int iface = SND_CTL_ELEM_IFACE_MIXER;
@@ -415,6 +415,7 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da
 	err = snd_config_expand(_conf, _conf, NULL, private_data, &conf);
 	if (err < 0)
 		return err;
+	assert(conf);
 	snd_config_for_each(i, next, conf) {
 		snd_config_t *n = snd_config_iterator_entry(i);
 		const char *id;
-- 
1.7.0.4



More information about the Alsa-devel mailing list