8206470: Incorrect use of os::lasterror in ClassListParser
The change is for future-proof the code in case errno gets overwritten inside the allocation logic. Reviewed-by: dholmes
This commit is contained in:
parent
b5f0945a72
commit
2b397c3c13
@ -48,14 +48,13 @@ ClassListParser::ClassListParser(const char* file) {
|
||||
_instance = this;
|
||||
_classlist_file = file;
|
||||
_file = fopen(file, "r");
|
||||
_line_no = 0;
|
||||
_interfaces = new (ResourceObj::C_HEAP, mtClass) GrowableArray<int>(10, true);
|
||||
|
||||
if (_file == NULL) {
|
||||
char errmsg[JVM_MAXPATHLEN];
|
||||
os::lasterror(errmsg, JVM_MAXPATHLEN);
|
||||
vm_exit_during_initialization("Loading classlist failed", errmsg);
|
||||
}
|
||||
_line_no = 0;
|
||||
_interfaces = new (ResourceObj::C_HEAP, mtClass) GrowableArray<int>(10, true);
|
||||
}
|
||||
|
||||
ClassListParser::~ClassListParser() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user