alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH - my module 1/1] Fix a memory access violation resulting from improper error propogation.
@ 2013-01-31 18:55 allan
  2013-02-01  7:16 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: allan @ 2013-01-31 18:55 UTC (permalink / raw)
  To: patch; +Cc: alsa-devel, Allan Wirth

From: Allan Wirth <allan@allanwirth.com>

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>

diff --git a/src/conf.c b/src/conf.c
index ecaa339..4ba5863 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -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;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH - my module 1/1] Fix a memory access violation resulting from improper error propogation.
  2013-01-31 18:55 [PATCH - my module 1/1] Fix a memory access violation resulting from improper error propogation allan
@ 2013-02-01  7:16 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2013-02-01  7:16 UTC (permalink / raw)
  To: allan; +Cc: alsa-devel

At Thu, 31 Jan 2013 13:55:33 -0500,
allan@allanwirth.com wrote:
> 
> From: Allan Wirth <allan@allanwirth.com>
> 
> 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>

Thanks, applied now.


Takashi

> 
> diff --git a/src/conf.c b/src/conf.c
> index ecaa339..4ba5863 100644
> --- a/src/conf.c
> +++ b/src/conf.c
> @@ -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;
> -- 
> 1.7.10.4
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-01  7:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-31 18:55 [PATCH - my module 1/1] Fix a memory access violation resulting from improper error propogation allan
2013-02-01  7:16 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).