Discussion:
[libdvdcss-devel] [PATCH] Avoid calling FreeLibrary() twice.
Ivan Kalvachev
2013-03-09 16:34:59 UTC
Permalink
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
Jean-Baptiste Kempf
2013-03-09 16:37:21 UTC
Permalink
Post by Ivan Kalvachev
The original bug reporter confirmed that crashes go away when the
additional FreeLibrary() is gone. The patch contains a trivial clean
up.
This is a probably correct fix, but I plan to delete this code anyway :)
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
Ivan Kalvachev
2013-03-09 17:04:59 UTC
Permalink
Post by Jean-Baptiste Kempf
Post by Ivan Kalvachev
The original bug reporter confirmed that crashes go away when the
additional FreeLibrary() is gone. The patch contains a trivial clean
up.
This is a probably correct fix, but I plan to delete this code anyway :)
Just don't keep broken code around.

Loading...