Fix shlib loaded: free memory, handle lib reload
- introduce loader_reset() that frees all memory - resolve memory leak in loader_format_shlibpath() - correctly handle library reload: check if a function has been retrieved already. Don't leak memory (strdup()), and handle multiple reloads of different functions from the same SO
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
#include "T.h"
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/defs_nr_common.h"
|
||||
@@ -671,6 +672,8 @@ int main(int argc, char **argv)
|
||||
if (ouput_vcd)
|
||||
vcd_signal_dumper_close();
|
||||
|
||||
loader_reset();
|
||||
|
||||
return (n_errors);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user