Commit 5faca1b8 authored by Sébastien Escudier's avatar Sébastien Escudier

fix handle leaks on RegOpenKeyEx

(cherry picked from commit f111847917894e8e5e832a5e2b850d229a4ceebc)
Signed-off-by: default avatarSébastien Escudier <sebastien-devel@celeos.eu>
parent 024c0a8f
...@@ -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
......
...@@ -589,7 +589,10 @@ static int GetFileFontByName( const char *font_name, char **psz_filename ) ...@@ -589,7 +589,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 );
...@@ -617,6 +620,7 @@ static int GetFileFontByName( const char *font_name, char **psz_filename ) ...@@ -617,6 +620,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