[PATCH] xkb: when copying the keymap, make sure the structs default to 0/NULL.

Bill Crawford billcrawford1970 at gmail.com
Thu Feb 7 05:30:43 PST 2008


On 07/02/2008, Peter Hutterer <mailinglists at who-t.net> wrote:
> Daniel Stone wrote:
...
> >     /* picnics ensue, bunnies and koalas live in happy unison */
...
> > xfree(foo->bar); /* OH GOD IT BURNS WHY DO YOU HURT ME SO */
> > foo->sz_bar = 0; /* i'm so glad we have sz_bar around, not superfluous
> >                     at all */

:-D

> so I take it the following patch may be a good idea too?
...
> -                dsection->sz_doodads = ssection->num_doodads;
> +                dsection->sz_doodads = ssection->sz_doodads;

<weakly>No ...</weakly>.

Look at where it's allocated ...



More information about the xorg mailing list