LSM: SafeSetID: Stop releasing uninitialized ruleset
The first time a rule set is configured for SafeSetID, we shouldn't be trying to release the previously configured ruleset, since there isn't one. Currently, the pointer that would point to a previously configured ruleset is uninitialized on first rule set configuration, leading to a crash when we try to call release_ruleset with that pointer. Acked-by: Jann Horn <jannh@google.com> Signed-off-by: Micah Morton <mortonm@chromium.org>alistair/sunxi64-5.4-dsi
parent
609488bc97
commit
21ab8580b3
|
@ -187,7 +187,8 @@ out_free_rule:
|
||||||
out_free_buf:
|
out_free_buf:
|
||||||
kfree(buf);
|
kfree(buf);
|
||||||
out_free_pol:
|
out_free_pol:
|
||||||
release_ruleset(pol);
|
if (pol)
|
||||||
|
release_ruleset(pol);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue