From: Andre Noll Date: Thu, 26 Aug 2021 17:31:25 +0000 (+0200) Subject: afh: Avoid memory leak at exit. X-Git-Tag: v0.6.4~15 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=4793e8dd226b49ea0b931504c84f21449ab8f704;ds=sidebyside afh: Avoid memory leak at exit. We missed to free the lopsub parse result. This is not a real leak because it's a one-off allocation and we are about to exit anyway. It's worth to fix nevertheless, though, because with the patch applied, valgrind says "no leaks are possible". Hence any other output means we have introduced a new memory leak. --- diff --git a/afh.c b/afh.c index 567b560a..c896a7d1 100644 --- a/afh.c +++ b/afh.c @@ -258,5 +258,6 @@ out: PARA_ERROR_LOG("%s\n", errctx); if (ret < 0) PARA_EMERG_LOG("%s\n", para_strerror(-ret)); + lls_free_parse_result(lpr, CMD_PTR); return ret < 0? EXIT_FAILURE : EXIT_SUCCESS; }