Got rid of all the memleaks. We can now merge with master.
authorDale Weiler <killfieldengine@gmail.com>
Fri, 4 Jan 2013 11:53:40 +0000 (11:53 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Fri, 4 Jan 2013 11:53:40 +0000 (11:53 +0000)
correct.c
parser.c

index b2e9c69a708bfba016e777a39b82e07fcaa05e61..e32678e754e3770ebb5d142d06a9fc7c0a283ec4 100644 (file)
--- a/correct.c
+++ b/correct.c
@@ -356,7 +356,6 @@ char *correct_str(ht table, const char *ident) {
     if (correct_find(table, ident))
         return found;
 
-    /*mem_d(found);*/
     if ((e1rows = correct_size(ident))) {
         e1      = correct_edit(ident);
 
index 7c6854b6c14dd8db480ca30c9e0ec0d80eba219b..b7831d4e1d9f65dfc05147f9107bdf38defa9d2b 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1653,7 +1653,7 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma
 
                     if (correct) {
                         parseerror(parser, "unexpected ident: %s (did you mean %s?)", parser_tokval(parser), correct);
-                        /*mem_d(correct);*/
+                        mem_d(correct);
                     } else {
                         parseerror(parser, "unexpected ident: %s", parser_tokval(parser));
                     }
@@ -2013,11 +2013,11 @@ static bool parser_leaveblock(parser_t *parser)
     }
 
     util_htdel(vec_last(parser->variables));
-    util_htdel(vec_last(parser->correct_variables)); /* corrector */
-    vec_free(vec_last(parser->correct_variables_score)); /* corrector */
+    correct_del(vec_last(parser->correct_variables), vec_last(parser->correct_variables_score));
 
     vec_pop(parser->variables);
-    vec_pop(parser->correct_variables); /* corrector */
+    vec_pop(parser->correct_variables);
+    vec_pop(parser->correct_variables_score);
     if (!vec_size(parser->_blocklocals)) {
         parseerror(parser, "internal error: parser_leaveblock with no block (2)");
         return false;