[Mesa-dev] [PATCH 6/7] glsl/cache.c: Dynamically allocate filenames internal to cache

Matt Turner mattst88 at gmail.com
Wed Feb 4 16:14:52 PST 2015

On Wed, Feb 4, 2015 at 1:53 PM, Carl Worth <cworth at cworth.org> wrote:
> The user can put the cache directory anywhere, so it's not safe to use
> fixed-size arrays to store filenames. Instead, allocate the cache
> pointer itself as a ralloc context and use that to dynamically
> allocate all filenames.
> While making this change, simplify the error handling in cache_get
> with a new "goto FAIL" block so the cleanup code exists in a single
> place, rather than being spread throughout the function over and over.

Is there some reason we should do this as a separate patch instead of
just squashing it?

More information about the mesa-dev mailing list