Signed-off-by: Serge Gautherie winehq-git_serge_180711@gautherie.fr --- programs/wineboot/wineboot.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index 21be0f5..1d8253e 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -1327,7 +1327,12 @@ static void update_user_profile(void) return;
size = sizeof(token_buf); - GetTokenInformation(token, TokenUser, token_buf, size, &size); + if (!GetTokenInformation(token, TokenUser, token_buf, size, &size)) + { + CloseHandle(token); + return; + } + CloseHandle(token);
ConvertSidToStringSidW(((TOKEN_USER *)token_buf)->User.Sid, &sid);