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

2013-06-09 Thread Dmitry Timoshkov
Marcus Meissner  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.




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

2013-06-09 Thread Dmitry Timoshkov
Marcus Meissner  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.

What do you mean by "library" in this context?

-- 
Dmitry.




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

2013-06-09 Thread Marcus Meissner
On Mon, Jun 10, 2013 at 08:25:42AM +0200, Marcus Meissner wrote:
> On Mon, Jun 10, 2013 at 10:43:58AM +0900, Dmitry Timoshkov wrote:
> > Marcus Meissner  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? :(

Ciao, Marcus




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

2013-06-09 Thread Marcus Meissner
On Mon, Jun 10, 2013 at 10:43:58AM +0900, Dmitry Timoshkov wrote:
> Marcus Meissner  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.

Ciao, Marcus




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

2013-06-09 Thread Dmitry Timoshkov
Marcus Meissner  wrote:

>  1030106 Resource leak
>  1030105 Resource leak
>  1030104 Resource leak

These cases are of the kind 'freeing resources at process exit is not useful'.

-- 
Dmitry.