Hi Samuel,

> We should check for service not being NULL before dereferencing it.
> 
> ---
>  src/connection.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/src/connection.c b/src/connection.c
> index b20a5a1..61aded6 100644
> --- a/src/connection.c
> +++ b/src/connection.c
> @@ -641,7 +641,8 @@ static void update_order(void)
>  
>               service = __connman_element_get_service(data->element);
>  
> -             data->order = __connman_service_get_order(service);
> +             if (service != NULL)
> +                     data->order = __connman_service_get_order(service);
>       }
>  }

since we do the checks inside the function for all other ones, I added
the NULL pointer check there.

Regards

Marcel


_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to