You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the func __policy_init() In the libselinux/src/audit2why.c
It maybe cause memory leak when the function returns 1 after invokes function calloc() and sepol_policy_file_create() successfully.
avc = calloc(sizeof(struct avc_t), 1);
if (!avc) {
...
return 1;
}
if (sepol_policy_file_create(&pf) ||
sepol_policydb_create(&avc->policydb)) {
snprintf(errormsg, sizeof(errormsg),
"policydb_init failed: %m\n");
PyErr_SetString( PyExc_RuntimeError, errormsg);
fclose(fp);
############maybe case a memory leak for avc #######
return 1;
}
sepol_policy_file_set_fp(pf, fp);
if (sepol_policydb_read(avc->policydb, pf)) {
snprintf(errormsg, sizeof(errormsg),
"invalid binary policy %s\n", curpolicy);
PyErr_SetString( PyExc_ValueError, errormsg);
fclose(fp);
############maybe case a memory leak for avc and pf #######
return 1;
}
...
The text was updated successfully, but these errors were encountered:
the func __policy_init() In the libselinux/src/audit2why.c
It maybe cause memory leak when the function returns 1 after invokes function calloc() and sepol_policy_file_create() successfully.
The text was updated successfully, but these errors were encountered: