On 11/07/2011 01:39 PM, Peter Hutterer wrote:
> Does what it says on the box, compliments MakeInputMask.
> 
> Signed-off-by: Peter Hutterer <[email protected]>
> ---
>  Xi/exevents.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/Xi/exevents.c b/Xi/exevents.c
> index 7f8e6db..6c19ab3 100644
> --- a/Xi/exevents.c
> +++ b/Xi/exevents.c
> @@ -1678,6 +1678,12 @@ MakeInputMasks(WindowPtr pWin)
>      return TRUE;
>  }
>  
> +static void
> +FreeInputMask(OtherInputMasks *imask)
> +{
> +    free(imask);
> +}
> +

FreeInputClient (from patch 05/12) takes a double pointer the object to
be freed, and sets the first pointer to NULL. If that's the paradigm we
want to use internally, shouldn't we do the same here?

>  void
>  RecalculateDeviceDeliverableEvents(WindowPtr pWin)
>  {
> @@ -1738,7 +1744,7 @@ InputClientGone(WindowPtr pWin, XID id)
>           } else if (!(other->next)) {
>               if (ShouldFreeInputMasks(pWin, TRUE)) {
>                   wOtherInputMasks(pWin)->inputClients = other->next;
> -                 free(wOtherInputMasks(pWin));
> +                 FreeInputMask(wOtherInputMasks(pWin));
>                   pWin->optional->inputMasks = (OtherInputMasks *) NULL;
>                   CheckWindowOptionalNeed(pWin);
>                   FreeInputClient(&other);

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to