[Bro-Commits] [git/bro] fastpath: Fixed a couple of init-time mem leaks. (750e1dd)

diff --git a/src/scan.l b/src/scan.l
index 645ce65..d90501d 100644
--- a/src/scan.l
+++ b/src/scan.l
@@ -776,7 +776,7 @@ void add_input_file(const char* file)
  if ( ! filename )
    (void) load_files(file);
- input_files.append(copy_string(file));
+ input_files.append((char*) file);

Not sure that's going to work right: one call in scan.l gives as input the c_str() from an automatic std::string that goes out of scope soon afterwards, so it's relying on that copy to happen.

Maybe a better thing would be to change input_files to use standard container types (e.g. vector of string or something).


Also, we actually have a lot of init-time leaks, and I'm not sure it's
worth fixing them individually. The chance of breaking something
subtlety is quite large.


True, feel free to get rid of that commit instead of merging. I was just trying to remove a couple of known memory leaks to try and find if we are in fact leaking memory somewhere.


I am not a hundred percent sure - but quite sure that that commit breaks