Mercurial > hg > batmud > maputils
changeset 2080:11bb8dc0a146
Fix potential free() bugs, we were using th_free() instead of mapBlockFree() in two cases.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 21 Aug 2019 15:00:43 +0300 |
parents | f244c38b9d47 |
children | 695aa9334444 |
files | libmaputils.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmaputils.c Wed Aug 21 15:00:15 2019 +0300 +++ b/libmaputils.c Wed Aug 21 15:00:43 2019 +0300 @@ -747,13 +747,13 @@ // Copy data if (mapBlockPutDo(tmp, *pmap, mx, my) < 0) { - th_free(tmp); + mapBlockFree(tmp); return -2; } if (mapBlockPutDo(tmp, src, ox, oy) < 0) { - th_free(tmp); + mapBlockFree(tmp); return -3; }