Mike Stroyan wrote: > While reading through Kristian's EGLImage patches I came across some > questionable old code in the _mesa_HashLookup and _mesa_HashInsert > functions. The _mesa_HashLookup does a linked list chase down a > collision chain without holding a mutex. The _mesa_HashInsert does > a MALLOC_STRUCT without checking the result. Here are patches for > both of those. The _mesa_HashInsert fix is only half-hearted. > It checks for a malloc failure and returns without segment faulting. > But it has no return value. So it doesn't indicate to the caller > that the data was not inserted into the hash.
Thanks, Mike. I've committed your patches, with one little change. The LOCK/UNLOCK calls generated warnings about const-correctness of the table parameter. I simply removed the const qualifiers in this case. -Brian ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev