Skip to content

Commit 4a9f5d7

Browse files
committed
coredump: auto cleanup argv
to prepare for a simpler exit path. Link: https://lore.kernel.org/20250612-work-coredump-massage-v1-17-315c0c34ba94@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 3a4db72 commit 4a9f5d7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/coredump.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ void vfs_coredump(const kernel_siginfo_t *siginfo)
10761076
const struct cred *old_cred;
10771077
struct cred *cred;
10781078
int retval = 0;
1079-
size_t *argv = NULL;
1079+
size_t *argv __free(kfree) = NULL;
10801080
int argc = 0;
10811081
struct coredump_params cprm = {
10821082
.siginfo = siginfo,
@@ -1189,7 +1189,6 @@ void vfs_coredump(const kernel_siginfo_t *siginfo)
11891189
atomic_dec(&core_pipe_count);
11901190
}
11911191
fail_unlock:
1192-
kfree(argv);
11931192
kfree(cn.corename);
11941193
coredump_finish(cn.core_dumped);
11951194
revert_creds(old_cred);

0 commit comments

Comments
 (0)