[PATCH] xserver: Fix double free's in config file parser
Benjamin Herrenschmidt
benh at kernel.crashing.org
Fri Jul 15 02:02:16 PDT 2011
On Thu, 2011-07-14 at 23:39 -0700, Keith Packard wrote:
> On Fri, 15 Jul 2011 10:43:04 +1000, Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:
>
> > Something, like freeing it when we try to replace it (or some other
> > "common" place like at the end of the loops) rather than having each
> > case that can potentially consume a string have to have the right 2
> > statements in the right place, that sort of thing...
>
> Meh. A function which freed the value would make that fairly clean at
> least. And using a global variable would be fine if the name weren't so
> generic. I wouldn't get too excited about making it perfect; just
> something that wasn't so error prone and was reasonably compatible with
> current usage would be a good step forward.
>
> Clearly, fixing the double (or missing) frees would be more than
> acceptable; if you've got that patch now, I'll take it and hope that
> someday someone gets excited enough to clean it up further.
I'll put something together on monday or tuesday, got distracted today.
Cheers,
Ben.
More information about the xorg-devel
mailing list