xserver: Branch 'master'

Daniel Stone daniel at fooishbar.org
Sun Aug 16 10:01:49 PDT 2009


Hi,
I know this isn't your fault, but thought I might point it out anyway
...

On Thu, Aug 13, 2009 at 06:02:13PM -0700, Peter Hutterer wrote:
>  out_ctx:
>      dbus_error_free(&error);
       ^^^^^^^^^^^^^^^^^^^^^^^^
>  
> -    if (info->hal_ctx) {
> -        if (!libhal_ctx_shutdown(info->hal_ctx, &error)) {
> -            LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n",
> -		       error.name ? error.name : "unknown error",
> -		       error.message ? error.message : "null");
> -            dbus_error_free(&error);
> -        }
> -        libhal_ctx_free(info->hal_ctx);
> +    if (!libhal_ctx_shutdown(info->hal_ctx, &error)) {
> +        LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n",
> +                error.name ? error.name : "unknown error",
> +                error.message ? error.message : "null");
> +        dbus_error_free(&error);
>      }
>  
>  out_err:
>      dbus_error_free(&error);
       ^^^^^^^^^^^^^^^^^^^^^^^^
>  
> +    if (info->hal_ctx) {
> +        libhal_ctx_free(info->hal_ctx);
> +    }
> +
>      info->hal_ctx = NULL;
>      info->system_bus = NULL;

That's going to end in tears.  There's no need to free it at the top of
out_ctx, and indeed it means, if anything, that you really don't want to
be passing it into libhal_ctx_shutdown.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20090816/aa5b6302/attachment.pgp 


More information about the xorg-devel mailing list