Skip to contentSkip to conversation

simple_abst : null check for lib

PATCH New Renu Tyagi 1 participant 1 message Sep 19, 2014

lore
Share & tools
lore

Renu Tyagi

author
#0 lore raw

PATCH 6/11 simple_abst : null check for lib

---
 src/mixer/simple_abst.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
src/mixer/simple_abst.c +2 -0
index 9e9aaf5..5297472 100644
@@ -70,6 +70,8 @@ static int try_open(snd_mixer_class_t *class, const char *lib)
        void *h;
        int err = 0;
 
+       if (!lib)
+               return -ENXIO;
        path = getenv("ALSA_MIXER_SIMPLE_MODULES");
        if (!path)
                path = SO_PATH;

--
1.7.1

---
 src/mixer/simple_abst.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
src/mixer/simple_abst.c +2 -0
index 9e9aaf5..5297472 100644
@@ -70,6 +70,8 @@ static int try_open(snd_mixer_class_t *class, const char *lib)
 	void *h;
 	int err = 0;
 
+	if (!lib)
+		return -ENXIO;
 	path = getenv("ALSA_MIXER_SIMPLE_MODULES");
 	if (!path)
 		path = SO_PATH;
Signature · 1 line
1.7.1