[Mesa-dev] [PATCH mesa] gallium/util: fix resource leak

Eric Engestrom eric.engestrom at imgtec.com
Mon Aug 1 12:24:43 UTC 2016


On Sat, Jul 30, 2016 at 07:44:02PM +0200, Marek Olšák wrote:
> On Sat, Jul 30, 2016 at 6:16 PM, Roland Scheidegger <sroland at vmware.com> wrote:
> > This looks very bogus to me.
> > How is this supposed to work if you immediately close the library again?
> > The functions are still going to get used.
> > This just segfaults right, left and center.
> >
> > If you want to fix this for real, some util_format_s3tc_exit() is
> > probably needed, albeit I'm not entirely sure it can be made to work
> > reliably (not just drivers, but the dri state tracker calls this too.
> >
> > In any case, I'm going to revert it.
> 
> Thanks, I was too hasty.
> 
> It's actually not a resource leak, because this lib must be loaded for
> the lifetime of the process and then the OS unloads it.
> 
> Marek

You're right, I got mislead by Coverity again :(
Sorry for the bogus fix, I'll try and be more careful :]

Cheers,
  Eric


More information about the mesa-dev mailing list