On Sun, Jun 6, 2010 at 9:14 AM, Mikhail Gusarov <[email protected]> wrote: > > Twas brillig at 10:03:16 06.06.2010 UTC-03 when [email protected] > did gyre and gimble: > > FC> By the way, the hunk below sounds rather fishy, right? > > >> @@ -109,14 +107,10 @@ RRCreateOutputProperty (Atom property) > >> static void > >> RRDestroyOutputProperty (RRPropertyPtr prop) > >> { > >> - if (prop->valid_values) > >> - free(prop->valid_values); > >> - if (prop->current.data) > >> - free(prop->current.data); > >> - if (prop->pending.data) > >> - free(prop->pending.data); > >> - if (prop->valid_values) > >> - free(prop->valid_values); > >> + free(prop->valid_values); > >> + free(prop->current.data); > >> + free(prop->pending.data); > >> + free(prop->valid_values); > >> free(prop); > >> } > > Hmm, why? Prop is zero-initialized on allocation, so it's okay. > > -- > http://fossarchy.blogspot.com/ > > _______________________________________________ > [email protected]: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel >
I didn't see it at first, but prop->valid_values is in there twice (first call to free and second-to-last). Nothing your patch did, it was like that already. Matt _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
