mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2025-10-28 05:40:23 -04:00
envy24control: fix crash when using system profiles file
envy24control crashed if you tried to start it with -f /etc/envy24control/profiles.conf. Closes: https://github.com/alsa-project/alsa-tools/pull/32 Signed-off-by: Andreas Persson <andreasp56@outlook.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
dcf1b94682
commit
037ae73ab3
1 changed files with 3 additions and 1 deletions
|
|
@ -78,7 +78,9 @@ int which_cfgfile(char ** const cfgfile)
|
|||
(inputFile = fopen(SYS_PROFILERC, "r")) == NULL) {
|
||||
res = -ENOENT;
|
||||
} else {
|
||||
fclose(inputFile);
|
||||
if (inputFile != NULL) {
|
||||
fclose(inputFile);
|
||||
}
|
||||
*cfgfile = SYS_PROFILERC;
|
||||
res = EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue