< prev index next >
src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp
Print this page
rev 56251 : 8230900: missing ReleaseStringUTFChars in java.desktop native code
*** 1,7 ****
/*
! * Copyright (c) 2003, 2018, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2003, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 1128,1137 ****
--- 1128,1140 ----
jint cxDesired, jint cyDesired, jboolean useVGAColors)
{
const char *pLibName = env->GetStringUTFChars(libName, NULL);
JNU_CHECK_EXCEPTION_RETURN(env, 0);
HINSTANCE libHandle = (HINSTANCE)JDK_LoadSystemLibrary(pLibName);
+ if (pLibName != NULL) {
+ env->ReleaseStringUTFChars(libName, pLibName);
+ }
if (libHandle != NULL) {
UINT fuLoad = (useVGAColors && !IS_WINXP) ? LR_VGACOLOR : 0;
return ptr_to_jlong(LoadImage(libHandle, MAKEINTRESOURCE(iconID),
IMAGE_ICON, cxDesired, cyDesired,
fuLoad));
< prev index next >