]> git.alsa-project.org Git - alsa-lib.git/commitdiff
conf: Fix a memory access violation resulting from improper error propogation
authorAllan Wirth <allan@allanwirth.com>
Thu, 31 Jan 2013 18:55:33 +0000 (13:55 -0500)
committerTakashi Iwai <tiwai@suse.de>
Fri, 1 Feb 2013 07:00:24 +0000 (08:00 +0100)
Fixes an issue where a variable is used undeclared, which can cause seg
faults on some systems if the configuration file is not formatted
properly.

Signed-off-by: Allan Wirth <allan@allanwirth.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/conf.c

index ecaa33903d5f5ea86d724efab640907136fc9843..4ba586318229ba060feae0f2bbc2329c7808ebd1 100644 (file)
@@ -3530,7 +3530,7 @@ int snd_config_hook_load(snd_config_t *root, snd_config_t *config, snd_config_t
                                if (err < 0)
                                        goto _err;
                        }
-               } else if (config_file_open(root, fi[idx].name) < 0)
+               } else if ((err = config_file_open(root, fi[idx].name)) < 0)
                        goto _err;
        }
        *dst = NULL;