< prev index next >

src/hotspot/share/adlc/forms.cpp

Print this page

        

*** 46,56 **** // The following free is a double-free, and crashes the program: //free(_names); // not owner of strings } void NameList::addName(const char *name) { ! if (_cur == _max) _names =(const char**)realloc(_names,(_max *=2)*sizeof(char*)); _names[_cur++] = name; } void NameList::add_signal() { addName( _signal ); --- 46,58 ---- // The following free is a double-free, and crashes the program: //free(_names); // not owner of strings } void NameList::addName(const char *name) { ! if (_cur == _max) { ! _names = (const char**) ReAllocateHeap(_names, (_max *=2)*sizeof(char*)); ! } _names[_cur++] = name; } void NameList::add_signal() { addName( _signal );
< prev index next >