Fixed meta-leak.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4674 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
642d47f395
commit
404b92eb46
1 changed files with 6 additions and 6 deletions
|
|
@ -136,17 +136,17 @@ DohObjMalloc(DohObjInfo *type, void *data) {
|
||||||
|
|
||||||
void
|
void
|
||||||
DohObjFree(DOH *ptr) {
|
DohObjFree(DOH *ptr) {
|
||||||
DohBase *b;
|
DohBase *b, *meta;
|
||||||
b = (DohBase *) ptr;
|
b = (DohBase *) ptr;
|
||||||
if (b->flag_intern) return;
|
if (b->flag_intern) return;
|
||||||
|
meta = b->meta;
|
||||||
b->data = (void *) FreeList;
|
b->data = (void *) FreeList;
|
||||||
b->refcount = 0;
|
|
||||||
if (b->meta) {
|
|
||||||
Delete(b->meta);
|
|
||||||
b->meta = 0;
|
b->meta = 0;
|
||||||
}
|
|
||||||
b->type = 0;
|
b->type = 0;
|
||||||
FreeList = b;
|
FreeList = b;
|
||||||
|
if (meta) {
|
||||||
|
Delete(meta);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue