changeset 35840:bd190ad6b204

Avoid calling FreeLibrary() twice. FreeLibrary() decreases a per-process reference/usage counter. This counter is set to 1 when a library is loaded at startup and increased with each LoadLibrary() call. Calling FreeLibrary() twice could unload the library (that is loaded at startup) and break code that calls its functions directly. In MPlayer this seems to happen with fontconfig package.
author iive
date Sat, 09 Mar 2013 16:58:26 +0000
parents 528e1429bfa2
children ee9664187153
files libdvdcss/libdvdcss.c
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libdvdcss/libdvdcss.c	Tue Mar 05 13:38:39 2013 +0000
+++ b/libdvdcss/libdvdcss.c	Sat Mar 09 16:58:26 2013 +0000
@@ -261,11 +261,7 @@
             {
                 /* Get the "Application Data" folder for the current user */
                 if( p_getpath( NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE,
-                               NULL, SHGFP_TYPE_CURRENT, psz_home ) == S_OK )
-                {
-                    FreeLibrary( p_dll );
-                }
-                else
+                               NULL, SHGFP_TYPE_CURRENT, psz_home ) != S_OK )
                 {
                     *psz_home = '\0';
                 }