< prev index next >

src/hotspot/share/adlc/forms.cpp

Print this page

        

*** 38,48 **** const char *NameList::_signal2 = "$$SIGNAL2$$"; const char *NameList::_signal3 = "$$SIGNAL3$$"; // Constructor and Destructor NameList::NameList() : _cur(0), _max(4), _iter(0), _justReset(true) { ! _names = (const char**)malloc(_max*sizeof(char*)); } NameList::~NameList() { // The following free is a double-free, and crashes the program: //free(_names); // not owner of strings } --- 38,48 ---- const char *NameList::_signal2 = "$$SIGNAL2$$"; const char *NameList::_signal3 = "$$SIGNAL3$$"; // Constructor and Destructor NameList::NameList() : _cur(0), _max(4), _iter(0), _justReset(true) { ! _names = (const char**) AllocateHeap(_max*sizeof(char*)); } NameList::~NameList() { // The following free is a double-free, and crashes the program: //free(_names); // not owner of strings }
< prev index next >