Got rid of all the memleaks. We can now merge with master.

This commit is contained in:
Dale Weiler 2013-01-04 11:53:40 +00:00
parent 18b9473cf8
commit 36d02d010e
2 changed files with 4 additions and 5 deletions

View file

@ -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);

View file

@ -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;