Mercurial > hg > batmud > maputils
changeset 1842:ac74a0ab50d9
Use th_free_r() instead of th_free() + assign NULL pattern.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 31 Oct 2017 23:10:06 +0200 |
parents | f8a154acd29c |
children | e36e473a1b7d |
files | liblocfile.c libmaputils.c |
diffstat | 2 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/liblocfile.c Tue Oct 31 22:38:09 2017 +0200 +++ b/liblocfile.c Tue Oct 31 23:10:06 2017 +0200 @@ -154,14 +154,11 @@ { for (int i = 0; i < LOC_MAX_NAMES; i++) { - th_free(marker->names[i].name); - th_free(marker->coders[i].name); - marker->names[i].name = NULL; - marker->coders[i].name = NULL; + th_free_r(&marker->names[i].name); + th_free_r(&marker->coders[i].name); } - th_free(marker->uri); - marker->uri = NULL; + th_free_r(&marker->uri); }