mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
fixed bug found via mem leak: handles now closed at exit regardless of refcount
This was SVN commit r323.
This commit is contained in:
parent
1eaadd38aa
commit
47a4af4c82
1 changed files with 5 additions and 0 deletions
|
|
@ -246,6 +246,11 @@ static void cleanup(void)
|
|||
// somewhat messy, but this only happens on cleanup.
|
||||
// better than an additional h_free(i32 idx) version though.
|
||||
Handle h = handle(i, hd->tag);
|
||||
|
||||
// HACK: must actually free the handles, regardless
|
||||
// of current refcount. so, quick'n dirty solution: set it to 0.
|
||||
hd->refs = 0;
|
||||
|
||||
h_free(h, hd->type);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue