mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
Merge branch 'master-merge-helper'
* master-merge-helper: possible use after free forbidden Suppression of unused code Fix of some memory leaks removing dead code A destructor must free the memory allocated by the constructor Good overridance with the good qualifier Better use of operators priorities protection from bad frees on unallocated strings
This commit is contained in:
commit
ada5f38d04
22 changed files with 67 additions and 30 deletions
|
@ -73,6 +73,9 @@ RuleHdrTest::RuleHdrTest(RuleHdrTest& h)
|
|||
copied_set->ids = orig_set->ids;
|
||||
loop_over_list(orig_set->patterns, l)
|
||||
copied_set->patterns.append(copy_string(orig_set->patterns[l]));
|
||||
delete copied_set;
|
||||
// TODO: Why do we create copied_set only to then
|
||||
// never use it?
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1116,7 +1119,12 @@ void id_to_maskedvallist(const char* id, maskedvalue_list* append_to)
|
|||
val_list* vals = v->AsTableVal()->ConvertToPureList()->Vals();
|
||||
loop_over_list(*vals, i )
|
||||
if ( ! val_to_maskedval((*vals)[i], append_to) )
|
||||
{
|
||||
delete_vals(vals);
|
||||
return;
|
||||
}
|
||||
|
||||
delete_vals(vals);
|
||||
}
|
||||
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue