[PATCH 1/2] config: only free odev->attrib_name for string types

Hans de Goede hdegoede at redhat.com
Tue Mar 11 00:08:15 PDT 2014


Hi,

On 03/11/2014 05:30 AM, Peter Hutterer wrote:
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

Good catch: Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans

> ---
>  config/config.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/config/config.c b/config/config.c
> index 7971b87..4ad7330 100644
> --- a/config/config.c
> +++ b/config/config.c
> @@ -246,7 +246,8 @@ config_odev_free_attributes(struct OdevAttributes *attribs)
>          case ODEV_ATTRIB_FD: fd = iter->attrib_value; break;
>          }
>          xorg_list_del(&iter->member);
> -        free(iter->attrib_name);
> +        if (iter->attrib_type == ODEV_ATTRIB_STRING)
> +            free(iter->attrib_name);
>          free(iter);
>      }
>  
> 


More information about the xorg-devel mailing list