File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
macosx/native/libawt_lwawt/awt
windows/native/libawt/windows Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2011, 2025 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2011, 2026 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
120120 if (appURI == nil
121121 || [[urlToOpen absoluteString ] containsString: [appURI absoluteString ]]
122122 || [[defaultTerminalApp absoluteString ] containsString: [appURI absoluteString ]]) {
123+ [urlToOpen release ];
123124 return -1 ;
124125 }
125126 // Additionally set forPrinting=TRUE for print
129130 } else if (action == sun_lwawt_macosx_CDesktopPeer_EDIT) {
130131 if (appURI == nil
131132 || [[urlToOpen absoluteString ] containsString: [appURI absoluteString ]]) {
133+ [urlToOpen release ];
132134 return -1 ;
133135 }
134136 // for EDIT: if (defaultApp = TerminalApp) then set appURI = DefaultTextEditor
156158
157159 dispatch_semaphore_wait (semaphore, timeout);
158160
161+ [urlToOpen release ];
159162JNI_COCOA_EXIT (env);
160163 return status;
161164}
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2005, 2025 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2005, 2026 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -92,6 +92,8 @@ JNIEXPORT jstring JNICALL Java_sun_awt_windows_WDesktopPeer_ShellExecute
9292 if (wcscmp (verb_c, L" open" ) == 0 ) {
9393 BOOL isExecutable = SaferiIsExecutableFileType (fileOrUri_c, FALSE );
9494 if (isExecutable) {
95+ JNU_ReleaseStringPlatformChars (env, fileOrUri_j, fileOrUri_c);
96+ JNU_ReleaseStringPlatformChars (env, verb_j, verb_c);
9597 return env->NewStringUTF (" Unsupported URI content" );
9698 }
9799 }
You can’t perform that action at this time.
0 commit comments