[PATCH] xserver: Fix double free's in config file parser

Keith Packard keithp at keithp.com
Thu Jul 14 23:39:41 PDT 2011


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.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110714/ac0246ac/attachment.pgp>


More information about the xorg-devel mailing list