Message ID | 20210714215126.GA818@raspberrypi (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] LSM: add NULL check for kcalloc() | expand |
diff --git a/security/security.c b/security/security.c index 09533cbb7221..f885c9e9bc35 100644 --- a/security/security.c +++ b/security/security.c @@ -321,6 +321,8 @@ static void __init ordered_lsm_init(void) ordered_lsms = kcalloc(LSM_COUNT + 1, sizeof(*ordered_lsms), GFP_KERNEL); + if (!ordered_lsms) + return; if (chosen_lsm_order) { if (chosen_major_lsm) {