Hi Pekka,

On Thu, Jul 08, 2010 at 08:21:07PM +0300, [email protected] wrote:
> From: Pekka Pessi <[email protected]>
> 
> ---
>  plugins/dhclient.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/plugins/dhclient.c b/plugins/dhclient.c
> index fd86773..b137a88 100644
> --- a/plugins/dhclient.c
> +++ b/plugins/dhclient.c
> @@ -118,6 +118,7 @@ static void dhclient_died(struct connman_task *task, void 
> *user_data)
>  {
>       struct dhclient_data *dhclient = user_data;
>  
> +     connman_dhcp_set_data(dhclient->dhcp, NULL);
>       connman_dhcp_unref(dhclient->dhcp);
>  
>       connman_task_destroy(dhclient->task);
> @@ -212,10 +213,10 @@ static int dhclient_release(struct connman_dhcp *dhcp)
>  
>       DBG("dhcp %p", dhcp);
>  
I'd rather do:
        if (dhclient == NULL)
                return -ESRCH;

and leave the rest of the code as it is.

Cheers,
Samuel.

> -     if (dhclient->task != NULL)
> +     if (dhclient != NULL) {
>               connman_task_stop(dhclient->task);
> -
> -     dhclient_unlink(dhclient->ifname);
> +             dhclient_unlink(dhclient->ifname);
> +     }
>  
>       return 0;
>  }
> -- 
> 1.7.0.4
> 
> _______________________________________________
> connman mailing list
> [email protected]
> http://lists.connman.net/listinfo/connman

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to