mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-03 11:38:44 +00:00
8036134: Check src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c for JNI pending exceptions
Check malloc return value and added JUN_ThrowOutOfMemoryException Reviewed-by: alanb
This commit is contained in:
parent
6202e3a60d
commit
226c059658
@ -1123,11 +1123,13 @@ Java_sun_nio_fs_WindowsNativeDispatcher_GetFullPathName0(JNIEnv *env,
|
||||
JNU_ThrowInternalError(env, "GetFullPathNameW failed");
|
||||
}
|
||||
free(lpBuf);
|
||||
} else {
|
||||
JNU_ThrowOutOfMemoryError(env, "native memory allocation failure");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (len == 0)
|
||||
} else {
|
||||
throwWindowsException(env, GetLastError());
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
@ -1162,13 +1164,13 @@ Java_sun_nio_fs_WindowsNativeDispatcher_GetFinalPathNameByHandle(JNIEnv* env,
|
||||
JNU_ThrowInternalError(env, "GetFinalPathNameByHandleW failed");
|
||||
}
|
||||
free(lpBuf);
|
||||
} else {
|
||||
JNU_ThrowOutOfMemoryError(env, "native memory allocation failure");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (len == 0)
|
||||
} else {
|
||||
throwWindowsException(env, GetLastError());
|
||||
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user