Commit 225b29e4 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Fixed a use-after-free error found by valgrind. This could only

be triggered by a broken aux-item definition file, so it was
mostly harmless.
* src/server/aux-item-def-parse.y (aux_item_def_check_trigger):
Don't free a string before using it.
parent afb8f103
2006-01-03 Per Cederqvist <ceder@lysator.liu.se>
 
Fixed a use-after-free error found by valgrind. This could only
be triggered by a broken aux-item definition file, so it was
mostly harmless.
* src/server/aux-item-def-parse.y (aux_item_def_check_trigger):
Don't free a string before using it.
Fixed various harmless memory and file descriptor leaks found by
valgrind.
* src/server/testsuite/lyskomd.supp: Added aid_lexer_2.
......
......@@ -516,15 +516,16 @@ aux_item_def_check_trigger(int *found,
tmp_string = s_crea_c_str(function_name);
trigger = aux_item_find_trigger(tmp_string);
string_free(tmp_string);
if (trigger == NULL)
{
yyerror("undefined function: %s",
tmp_string);
string_free(tmp_string);
return;
}
string_free(tmp_string);
*counter += 1;
*triggers =
srealloc(*triggers,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment