[PATCH] ole32: fixed 3 handle leaks (Coverity)

Dmitry Timoshkov dmitry at baikal.ru
Mon Jun 10 01:47:50 CDT 2013


Marcus Meissner <marcus at jet.franken.de> wrote:

> > > >  1030106 Resource leak
> > > >  1030105 Resource leak
> > > >  1030104 Resource leak
> > > 
> > > These cases are of the kind 'freeing resources at process exit is not useful'.
> > 
> > Well, it is code that is run within a library.
> > 
> > The usage pattern is unclear and might cover repeated calls.
> 
> ah, that was ole_server.c ... of course this is not a library.
> 
> But please ... good practice? :(

Good practice is to not free resources at process exit since the whole
process address space is going to be destroyed anyway. Moreover, recently
Alexandre has cleaned up all the DLL entry points in Wine to not free
memory on process exit either since it may lead to dead locks.

-- 
Dmitry.



More information about the wine-devel mailing list