apparmor: Return directly after a failed kzalloc() in two functions
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 29 Mar 2023 09:50:44 +0000 (11:50 +0200)
committerJohn Johansen <john.johansen@canonical.com>
Thu, 6 Jul 2023 17:58:49 +0000 (10:58 -0700)
commit6d7467957ecdc9018fb860bb60738e997abeaecb
tree09260d1f708c22274448d827ed0471f8abfd1588
parent755a22c74345a7b4c18dbb86f553eeb7895a97c9
apparmor: Return directly after a failed kzalloc() in two functions

1. Return directly after a call of the function “kzalloc” failed
   at the beginning in these function implementations.

2. Omit extra initialisations (for a few local variables)
   which became unnecessary with this refactoring.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/crypto.c