<div dir="ltr">Out of curiosity. Not freeing these memory allocations shouldn't disturb Valgrind to report false memory leaks?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/21 Alexandre Julliard <span dir="ltr"><<a href="mailto:julliard@winehq.org" target="_blank">julliard@winehq.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Dmitry Timoshkov <<a href="mailto:dmitry@baikal.ru">dmitry@baikal.ru</a>> writes:<br>

<br>
> Alexandre Julliard <<a href="mailto:julliard@winehq.org">julliard@winehq.org</a>> wrote:<br>
><br>
>> >> � �case DLL_PROCESS_DETACH:<br>
>> >> - � �msvcrt_free_popen_data();<br>
>> >> � � �msvcrt_free_io();<br>
>> >> + � �if (lpvReserved) break;<br>
>> >> + � �msvcrt_free_popen_data();<br>
>> >> � � �msvcrt_free_mt_locks();<br>
>> >> � � �msvcrt_free_console();<br>
>> >> � � �msvcrt_free_args();<br>
>> ><br>
>> > Shouldn't msvcrt_free_io() be also protected by this guard?<br>
>><br>
>> I think we still want to try to flush the file buffers.<br>
><br>
> My point was that msvcrt_free_io() does much more than just flushing<br>
> file buffers, it also frees memory and deletes critical sections.<br>
<br>
</div></div>It should probably call fflush or flushall instead, but that doesn't<br>
flush stdio. I'm not quite convinced that this is correct, it would need<br>
test cases.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Alexandre Julliard<br>
<a href="mailto:julliard@winehq.org">julliard@winehq.org</a><br>
<br>
<br>
</font></span></blockquote></div><br></div>