mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 06:57:30 -04:00
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: 7306c41672 ("apparmor: release exe file resources on path failure")
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user