Skip to content
Snippets Groups Projects
Commit 3cce4856 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds
Browse files

[PATCH] fix create_write_pipe() error check


The return value of create_write_pipe()/create_read_pipe() should be
checked by IS_ERR().

Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 967bf623
No related merge requests found
......@@ -307,14 +307,14 @@ int call_usermodehelper_pipe(char *path, char **argv, char **envp,
return 0;
f = create_write_pipe();
if (!f)
return -ENOMEM;
if (IS_ERR(f))
return PTR_ERR(f);
*filp = f;
f = create_read_pipe(f);
if (!f) {
if (IS_ERR(f)) {
free_write_pipe(*filp);
return -ENOMEM;
return PTR_ERR(f);
}
sub_info.stdin = f;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment