correct a memory leak
authorMazet Laurent <mazet@softndesign.org>
Wed, 1 Feb 2023 22:35:42 +0000 (23:35 +0100)
committerMazet Laurent <mazet@softndesign.org>
Wed, 1 Feb 2023 22:35:42 +0000 (23:35 +0100)
parser.c

index ed39dd78e72e2ca55fcd642b56a9e4cfae943307..2e83a4f451f74a766e1b70e2b3c2f3567eafdf50 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1210,7 +1210,7 @@ void free_completion_list (char **list)
     int i;
 
     if (list) {
-        for (i = 0; i < NB_FUNCTIONS + NB_CONSTANTS; i++) {
+        for (i = 0; i < NB_OPERATORS + NB_FUNCTIONS + NB_CONSTANTS + NB_SYMBOLS + 1; i++) {
             if (list[i] != NULL) {
                 free (list[i]);
             }