Fix Coverity Scan CID 300414 (Variable lib going out of scope leaks the storage it points to.)

This commit is contained in:
Dong Anyuan
2019-05-28 22:04:20 +09:00
parent 71a7ba5738
commit 1f752815cf
@@ -934,6 +934,13 @@ int load_dl_scheduler_function(mid_t mod_id, const char *function_name) {
LOG_I(FLEXRAN_AGENT, "Scheduler could not be loaded\n");
}
if (flexran_agent_get_mac_xface(mod_id)) {
if (flexran_agent_get_mac_xface(mod_id)->dl_scheduler_loaded_lib != lib) {
dlclose(lib);
}
} else {
dlclose(lib);
}
return 0;
error: