]> www.infradead.org Git - users/jedix/linux-maple.git/commit
apparmor: Remove unnecessary NULL check before kvfree()
authorThorsten Blum <thorsten.blum@linux.dev>
Thu, 7 Nov 2024 11:25:27 +0000 (12:25 +0100)
committerJohn Johansen <john.johansen@canonical.com>
Wed, 27 Nov 2024 03:21:05 +0000 (19:21 -0800)
commit648e45d724ed8d84064fa214028835dc02b0336e
treedd85b0cf4dabdf18e20460f4304175c9f5f0f5da
parentab6875fbb9d318f56ed0c393c455e9f48293b00f
apparmor: Remove unnecessary NULL check before kvfree()

Since kvfree() already checks if its argument is NULL, an additional
check before calling kvfree() is unnecessary and can be removed.

Remove it and the following Coccinelle/coccicheck warning reported by
ifnullfree.cocci:

  WARNING: NULL check before some freeing functions is not needed

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/policy.c