diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 02:55:20 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 02:55:20 -0500 |
| commit | 35858adbfca13678af99fb31618ef4428d6dedb0 (patch) | |
| tree | 3336feaa61324486945816cb52c347733e7c0821 /kernel/kmod.c | |
| parent | 197d4db752e67160d79fed09968c2140376a80a3 (diff) | |
| parent | 4b70858ba8d4537daf782defebe5f2ff80ccef2b (diff) | |
Merge branch 'next' into for-linus
Diffstat (limited to 'kernel/kmod.c')
| -rw-r--r-- | kernel/kmod.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c index 25b103190364..bf0e231d9702 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
| @@ -520,13 +520,15 @@ int call_usermodehelper_pipe(char *path, char **argv, char **envp, | |||
| 520 | return -ENOMEM; | 520 | return -ENOMEM; |
| 521 | 521 | ||
| 522 | ret = call_usermodehelper_stdinpipe(sub_info, filp); | 522 | ret = call_usermodehelper_stdinpipe(sub_info, filp); |
| 523 | if (ret < 0) | 523 | if (ret < 0) { |
| 524 | goto out; | 524 | call_usermodehelper_freeinfo(sub_info); |
| 525 | return ret; | ||
| 526 | } | ||
| 525 | 527 | ||
| 526 | return call_usermodehelper_exec(sub_info, UMH_WAIT_EXEC); | 528 | ret = call_usermodehelper_exec(sub_info, UMH_WAIT_EXEC); |
| 529 | if (ret < 0) /* Failed to execute helper, close pipe */ | ||
| 530 | filp_close(*filp, NULL); | ||
| 527 | 531 | ||
| 528 | out: | ||
| 529 | call_usermodehelper_freeinfo(sub_info); | ||
| 530 | return ret; | 532 | return ret; |
| 531 | } | 533 | } |
| 532 | EXPORT_SYMBOL(call_usermodehelper_pipe); | 534 | EXPORT_SYMBOL(call_usermodehelper_pipe); |
