which will allow us to simplify the exit path in further patches. Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> --- fs/coredump.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/coredump.c b/fs/coredump.c index ba771729f878..0ad0f29a350d 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -1074,7 +1074,7 @@ void vfs_coredump(const kernel_siginfo_t *siginfo) struct mm_struct *mm = current->mm; struct linux_binfmt * binfmt; const struct cred *old_cred; - struct cred *cred; + struct cred *cred __free(put_cred) = NULL; int retval = 0; size_t *argv __free(kfree) = NULL; int argc = 0; @@ -1113,7 +1113,7 @@ void vfs_coredump(const kernel_siginfo_t *siginfo) retval = coredump_wait(siginfo->si_signo, &core_state); if (retval < 0) - goto fail_creds; + return; old_cred = override_creds(cred); @@ -1192,8 +1192,6 @@ void vfs_coredump(const kernel_siginfo_t *siginfo) kfree(cn.corename); coredump_finish(cn.core_dumped); revert_creds(old_cred); -fail_creds: - put_cred(cred); return; } -- 2.47.2