8292778: EncodingSupport_md.c convertUtf8ToPlatformString wrong placing of free

Reviewed-by: rriggs, kevinw, amenkov
This commit is contained in:
Matthias Baesken 2022-08-24 07:05:28 +00:00
parent 13c0369646
commit ad2e0c4df0

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -76,8 +76,8 @@ convertUtf8ToPlatformString(char* utf8_str, int utf8_len, char* platform_str, in
if (plen >= 0) {
platform_str[plen] = '\0';
}
free(wstr);
}
free(wstr);
}
}
return plen;