Commit 21ab8580 authored by Micah Morton's avatar Micah Morton
Browse files

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: default avatarJann Horn <jannh@google.com>
Signed-off-by: default avatarMicah Morton <mortonm@chromium.org>
parent 609488bc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -187,6 +187,7 @@ out_free_rule:
out_free_buf:
	kfree(buf);
out_free_pol:
	if (pol)
                release_ruleset(pol);
	return err;
}