[hackers] [libgrapheme] Free generated mirror-LUT data structures to avoid memory leak || Laslo Hunhold

From: <git_AT_suckless.org>
Date: Mon, 29 May 2023 22:22:55 +0200 (CEST)

commit af792ebe99c6301fb5b5436f856b9589ad0fd5ea
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Mon May 29 22:21:57 2023 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Mon May 29 22:21:57 2023 +0200

    Free generated mirror-LUT data structures to avoid memory leak
    
    This is a technicality, but this satisfies the clang dynamic memory
    analyzer.
    
    Signed-off-by: Laslo Hunhold <dev_AT_frign.de>

diff --git a/gen/bidirectional.c b/gen/bidirectional.c
index 3dd034e..b4a4fb7 100644
--- a/gen/bidirectional.c
+++ b/gen/bidirectional.c
_AT_@ -499,5 +499,10 @@ main(int argc, char *argv[])
                                               mm_mirror.minorlen, get_value,
                                               comp_mirror.data);
 
+ free(comp_mirror.data);
+ free(comp_mirror.offset);
+ free(mm_mirror.major);
+ free(mm_mirror.minor);
+
         return 0;
 }
Received on Mon May 29 2023 - 22:22:55 CEST

This archive was generated by hypermail 2.3.0 : Mon May 29 2023 - 22:24:39 CEST