lib/nbt: Fix a memory leak
parent
7be73f86d4
commit
3b56a52085
|
@ -1011,6 +1011,7 @@ namespace NBT {
|
|||
|
||||
ErrorOrVoid Compound::appendPointer(Generic* pointer) {
|
||||
if (pointer->getTagType() == TagType::END) {
|
||||
delete pointer;
|
||||
return ErrorOrVoid(true, ErrorCodes::NOT_ALLOWED);
|
||||
}
|
||||
this->tags.push_back(pointer);
|
||||
|
|
Loading…
Reference in New Issue