Open eupharina opened 2 months ago
Similar issues:
Thank you! Yes, the code was written pretty much in experimental mode, there are a few places I will need to refactor to fix a few bugs and for optimisation. The reason I haven't done much tidying up and optimisation yet is because I am still implementing the basic functionality, and there is a good chance a lot of the existing code will be removed once we figured out how the code should be structured (e.g. I have plans to change the command line options and libraries into pluggable modules, etc.).
But this could be a trivial fix, will definitely address them.
While reviewing static analysis reports on some CheriBSD ports, I came across this code:
I don't have much context of what is going on here, but this looks like a memory leak in a loop to me:
insert_vm_query_values
is overwritten (both ini==0
andelse
branches) without freeing it's previous value. It's probably a good idea to rewrite this bit of code anyway with fewer string copies.