From: John Johansen Date: Wed, 6 May 2026 08:17:38 +0000 (-0700) Subject: apparmor: remove unnecessary goto and associated label X-Git-Tag: v7.2-rc1~43^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e27bfb2ae9ad8522aea82d435fd6d73cccee7e17;p=thirdparty%2Flinux.git apparmor: remove unnecessary goto and associated label There is no need for a goto a label immediately following the conditional block when the jump is the last statement in the block. Fixes: 7306c41672487 ("apparmor: release exe file resources on path failure") Signed-off-by: John Johansen --- diff --git a/security/apparmor/task.c b/security/apparmor/task.c index 6445cb5f85266..b9fb3738124e0 100644 --- a/security/apparmor/task.c +++ b/security/apparmor/task.c @@ -313,12 +313,9 @@ static const char *get_current_exe_path(char *buffer, int buffer_size) p = exe_file->f_path; path_get(&p); - if (aa_path_name(&p, FLAG_VIEW_SUBNS, buffer, &path_str, NULL, NULL)) { + if (aa_path_name(&p, FLAG_VIEW_SUBNS, buffer, &path_str, NULL, NULL)) path_str = ERR_PTR(-ENOMEM); - goto out; - } -out: fput(exe_file); path_put(&p);