mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
make private copy of libraryName in BuiltinElement
This commit is contained in:
parent
1c49b3bc1b
commit
b12226e878
@ -443,7 +443,7 @@ class BuiltinElement: public JarElement {
|
||||
BuiltinElement(System* s, const char* name, unsigned nameLength,
|
||||
const char* libraryName):
|
||||
JarElement(s, name, nameLength),
|
||||
libraryName(libraryName)
|
||||
libraryName(libraryName ? copy(s, &libraryNameLength, libraryName) : 0)
|
||||
{ }
|
||||
|
||||
virtual void init() {
|
||||
@ -469,10 +469,12 @@ class BuiltinElement: public JarElement {
|
||||
virtual void dispose() {
|
||||
JarElement::dispose();
|
||||
library->disposeAll();
|
||||
free(s, libraryName, libraryNameLength + 1);
|
||||
}
|
||||
|
||||
System::Library* library;
|
||||
const char* libraryName;
|
||||
unsigned libraryNameLength;
|
||||
};
|
||||
|
||||
Element*
|
||||
|
Loading…
Reference in New Issue
Block a user