Fix Coverity Scan CID 300414 (Variable lib going out of scope leaks the storage it points to.)
This commit is contained in:
@@ -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");
|
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;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
|||||||
Reference in New Issue
Block a user