Commit f1118479 authored by Sébastien Escudier's avatar Sébastien Escudier

fix handle leaks on RegOpenKeyEx

parent cf70aaa1
...@@ -449,6 +449,7 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access, ...@@ -449,6 +449,7 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
} }
else else
msg_Dbg( p_access, "HTTP proxy disabled (MSIE)" ); msg_Dbg( p_access, "HTTP proxy disabled (MSIE)" );
RegCloseKey( h_key );
} }
} }
#else #else
......
...@@ -588,7 +588,10 @@ static int GetFileFontByName( const char *font_name, char **psz_filename ) ...@@ -588,7 +588,10 @@ static int GetFileFontByName( const char *font_name, char **psz_filename )
LONG i_result = RegEnumValueW( hKey, index, vbuffer, &vbuflen, LONG i_result = RegEnumValueW( hKey, index, vbuffer, &vbuflen,
NULL, NULL, (LPBYTE)dbuffer, &dbuflen); NULL, NULL, (LPBYTE)dbuffer, &dbuflen);
if( i_result != ERROR_SUCCESS ) if( i_result != ERROR_SUCCESS )
{
RegCloseKey( hKey );
return i_result; return i_result;
}
char *psz_value = FromWide( vbuffer ); char *psz_value = FromWide( vbuffer );
...@@ -616,6 +619,7 @@ static int GetFileFontByName( const char *font_name, char **psz_filename ) ...@@ -616,6 +619,7 @@ static int GetFileFontByName( const char *font_name, char **psz_filename )
*psz_filename = FromWide( dbuffer ); *psz_filename = FromWide( dbuffer );
free( font_name_temp ); free( font_name_temp );
RegCloseKey( hKey );
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment