aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sys.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index e10566bee399..81f56445fba9 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -2185,11 +2185,6 @@ SYSCALL_DEFINE3(getcpu, unsigned __user *, cpup, unsigned __user *, nodep,
2185 2185
2186char poweroff_cmd[POWEROFF_CMD_PATH_LEN] = "/sbin/poweroff"; 2186char poweroff_cmd[POWEROFF_CMD_PATH_LEN] = "/sbin/poweroff";
2187 2187
2188static void argv_cleanup(struct subprocess_info *info)
2189{
2190 argv_free(info->argv);
2191}
2192
2193static int __orderly_poweroff(void) 2188static int __orderly_poweroff(void)
2194{ 2189{
2195 int argc; 2190 int argc;
@@ -2209,9 +2204,8 @@ static int __orderly_poweroff(void)
2209 } 2204 }
2210 2205
2211 ret = call_usermodehelper_fns(argv[0], argv, envp, UMH_WAIT_EXEC, 2206 ret = call_usermodehelper_fns(argv[0], argv, envp, UMH_WAIT_EXEC,
2212 NULL, argv_cleanup, NULL); 2207 NULL, NULL, NULL);
2213 if (ret == -ENOMEM) 2208 argv_free(argv);
2214 argv_free(argv);
2215 2209
2216 return ret; 2210 return ret;
2217} 2211}