[PATCH] xkb: check for NULL pointer before dereferences it in XkbAddClientResource
Jeremy Huddleston
jeremyhu at freedesktop.org
Wed Apr 21 12:17:42 PDT 2010
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
On Apr 19, 2010, at 10:58, Tiago Vignatti wrote:
> ---
> xkb/xkbEvents.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c
> index 33741e9..9755f98 100644
> --- a/xkb/xkbEvents.c
> +++ b/xkb/xkbEvents.c
> @@ -1041,8 +1041,7 @@ XkbInterestPtr interest;
> return ((interest->resource==id)?interest:NULL);
> interest = interest->next;
> }
> - interest = xalloc(sizeof(XkbInterestRec));
> - bzero(interest,sizeof(XkbInterestRec));
> + interest = xcalloc(1, sizeof(XkbInterestRec));
> if (interest) {
> interest->dev = dev;
> interest->client = client;
> --
> 1.6.0.4
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list