From 7c2c520911e03fb6f78b569a0bfc9b07b80ce901 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 13 Oct 2015 22:09:41 +0200 Subject: [PATCH] memory leak: at_travelunit contains a quicklist, needs custom cleanup code. --- src/travelthru.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/travelthru.c b/src/travelthru.c index 754a93530..32607ae5c 100644 --- a/src/travelthru.c +++ b/src/travelthru.c @@ -38,13 +38,18 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include +static void travel_done(attrib *a) { + quicklist *ql = (quicklist *)a->data.v; + ql_free(ql); +} + /*********************/ /* at_travelunit */ /*********************/ attrib_type at_travelunit = { "travelunit", DEFAULT_INIT, - DEFAULT_FINALIZE, + travel_done, DEFAULT_AGE, NO_WRITE, NO_READ