File 0042-simple_abst-null-check-for-lib.patch of Package alsa

From f3f568e3db5fccdf5cfb7053c04fde6272974faa Mon Sep 17 00:00:00 2001
From: Renu Tyagi <renu.tyagi@samsung.com>
Date: Tue, 23 Sep 2014 09:06:28 +0200
Subject: [PATCH] simple_abst: null check for lib

Signed-off-by: renu tyagi <renu.tyagi@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 src/mixer/simple_abst.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mixer/simple_abst.c b/src/mixer/simple_abst.c
index 9e9aaf55c535..5297472a6d26 100644
--- a/src/mixer/simple_abst.c
+++ b/src/mixer/simple_abst.c
@@ -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;
-- 
2.1.2

openSUSE Build Service is sponsored by