From ad2e0c4df045261c04b00bfa1faf5c21392edc58 Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Wed, 24 Aug 2022 07:05:28 +0000 Subject: [PATCH] 8292778: EncodingSupport_md.c convertUtf8ToPlatformString wrong placing of free Reviewed-by: rriggs, kevinw, amenkov --- .../windows/native/libinstrument/EncodingSupport_md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java.instrument/windows/native/libinstrument/EncodingSupport_md.c b/src/java.instrument/windows/native/libinstrument/EncodingSupport_md.c index 9c5af95f589..fcaa872003f 100644 --- a/src/java.instrument/windows/native/libinstrument/EncodingSupport_md.c +++ b/src/java.instrument/windows/native/libinstrument/EncodingSupport_md.c @@ -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;