Don't unreference pdd with borrowed memory buf
This can lead to memory being deleted twice.
This commit is contained in:
@@ -307,7 +307,6 @@ void gdd::test()
|
|||||||
pdd->convertAddressToOffsets();
|
pdd->convertAddressToOffsets();
|
||||||
pdd->convertOffsetsToAddress();
|
pdd->convertOffsetsToAddress();
|
||||||
pdd->dump();
|
pdd->dump();
|
||||||
pdd->unreference();
|
|
||||||
delete [] buf;
|
delete [] buf;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -509,7 +508,6 @@ void gddContainer::test(void)
|
|||||||
cdd1->dump();
|
cdd1->dump();
|
||||||
fprintf(stderr,"=====RE-DUMP OF ORIGINAL CONTAINER:\n");
|
fprintf(stderr,"=====RE-DUMP OF ORIGINAL CONTAINER:\n");
|
||||||
dump();
|
dump();
|
||||||
cdd1->unreference();
|
|
||||||
delete [] buf;
|
delete [] buf;
|
||||||
|
|
||||||
// test copy(), Dup(), copyInfo()
|
// test copy(), Dup(), copyInfo()
|
||||||
|
|||||||
Reference in New Issue
Block a user