[dm-devel] Segfault running multipath -d -v 3 at HOL

Christophe Varoqui christophe.varoqui at free.fr
Thu Apr 13 21:06:09 UTC 2006


Brian Wong a écrit :
> Hi Christophe,
>
> I'm seeing a segfault running `multipath -d -v 3` at HOL.  Here's the
> fix for the issue.  It might be worth applying similar logic fixes to
> the rest of the free_x() calls in free_config(); let me know if you want
> that patch too.
>   
Thanks. I applied this bit.
>  
> diff --git a/libmultipath/parser.c b/libmultipath/parser.c
> index 385e4fb..bb04968 100644
> --- a/libmultipath/parser.c
> +++ b/libmultipath/parser.c
> @@ -18,6 +18,7 @@
>   */
>  
>  #include <syslog.h>
>  
>  #include "parser.h"
>  #include "memory.h"
> @@ -110,6 +111,9 @@ free_keywords(vector keywords)
>  	struct keyword *keyword;
>  	int i;
>  
> +	if (!keywords) return;
> +
>  	for (i = 0; i < VECTOR_SIZE(keywords); i++) {
>  		keyword = VECTOR_SLOT(keywords, i);
>  		if (keyword->sub)
> @@ -483,3 +487,11 @@ init_data(char *conf_file, void (*init_k
>  
>  	return r;
>  }
>
>   
Regards,
cvaroqui




More information about the dm-devel mailing list