From 6f00b318211388fcc346023dd37c80e8ea7e1703 Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Mon, 31 Oct 2016 18:36:19 +0000 Subject: [PATCH] ali: Fix a memory leak spotted by valgrind. --- uip/ali.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/uip/ali.c b/uip/ali.c index 4d73afa7..1f725da7 100644 --- a/uip/ali.c +++ b/uip/ali.c @@ -143,9 +143,13 @@ main (int argc, char **argv) } else { /* print them all */ for (ak = akahead; ak; ak = ak->ak_next) { + char *res; + printf ("%s: ", ak->ak_name); pos += strlen (ak->ak_name) + 1; - print_aka (akresult (ak), list, pos); + res = akresult(ak); + print_aka(res, list, pos); + free(res); } } } -- 2.56.0