diff a/src/hotspot/share/runtime/thread.cpp b/src/hotspot/share/runtime/thread.cpp --- a/src/hotspot/share/runtime/thread.cpp +++ b/src/hotspot/share/runtime/thread.cpp @@ -1326,14 +1326,11 @@ _processed_thread(NULL), _gc_id(GCId::undefined()) {} NamedThread::~NamedThread() { - if (_name != NULL) { - FREE_C_HEAP_ARRAY(char, _name); - _name = NULL; - } + FREE_C_HEAP_ARRAY(char, _name); } void NamedThread::set_name(const char* format, ...) { guarantee(_name == NULL, "Only get to set name once."); _name = NEW_C_HEAP_ARRAY(char, max_name_len, mtThread); @@ -3233,11 +3230,11 @@ return in_WordSize(sz / wordSize); } void JavaThread::popframe_free_preserved_args() { assert(_popframe_preserved_args != NULL, "should not free PopFrame preserved arguments twice"); - FREE_C_HEAP_ARRAY(char, (char*) _popframe_preserved_args); + FREE_C_HEAP_ARRAY(char, (char*)_popframe_preserved_args); _popframe_preserved_args = NULL; _popframe_preserved_args_size = 0; } #ifndef PRODUCT