Ivan Kalvachev
2013-03-09 16:34:59 UTC
Quite obvious bug in the Windows code path.
FreeLibrary() decreases a per-process reference/usage counter. That
counter is set to 1 when a library is loaded at startup and increased
with each LoadLibrary() call.
Calling FreeLibrary() more times than LoadLibrary() could unload the
library that is loaded at startup and break code that uses that
library functions directly.
This seems to happen with fontconfig package in MPlayer.
The original bug reporter confirmed that crashes go away when the
additional FreeLibrary() is gone. The patch contains a trivial clean
up.
Best Regards.
Ivan Kalvachev
iive
FreeLibrary() decreases a per-process reference/usage counter. That
counter is set to 1 when a library is loaded at startup and increased
with each LoadLibrary() call.
Calling FreeLibrary() more times than LoadLibrary() could unload the
library that is loaded at startup and break code that uses that
library functions directly.
This seems to happen with fontconfig package in MPlayer.
The original bug reporter confirmed that crashes go away when the
additional FreeLibrary() is gone. The patch contains a trivial clean
up.
Best Regards.
Ivan Kalvachev
iive