projects
/
qemu-gpiodev
/
libfuse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6bec40
)
Check the negative return value after an open syscall
author
Laszlo Papp
<ext-laszlo.papp@nokia.com>
Wed, 9 Mar 2011 15:22:07 +0000
(17:22 +0200)
committer
Miklos Szeredi
<mszeredi@suse.cz>
Wed, 30 Mar 2011 17:34:58 +0000
(19:34 +0200)
lib/mount.c
patch
|
blob
|
history
diff --git
a/lib/mount.c
b/lib/mount.c
index 224ae9d5f299e3e497475d24400587f031e41d78..8065087d4a1deeffe06ae1dae4c5114b944785ad 100644
(file)
--- a/
lib/mount.c
+++ b/
lib/mount.c
@@
-366,8
+366,10
@@
static int fuse_mount_fusermount(const char *mountpoint, const char *opts,
if (quiet) {
int fd = open("/dev/null", O_RDONLY);
- dup2(fd, 1);
- dup2(fd, 2);
+ if (fd != -1) {
+ dup2(fd, 1);
+ dup2(fd, 2);
+ }
}
argv[a++] = FUSERMOUNT_PROG;