diff options
author | Michaël Bouchaud (yoz) <yoz@efl.so> | 2016-11-07 10:32:04 +0100 |
---|---|---|
committer | Michaël Bouchaud (yoz) <yoz@efl.so> | 2016-11-07 10:32:04 +0100 |
commit | be154b60c8f970a58fe6e82ff164660273193a93 (patch) | |
tree | 89f8bbaa39bdddcfea294031172e59f55fb9e73f | |
parent | 568a67607367c6faedc37695da3f0c115fd93028 (diff) | |
download | enlightenment-be154b60c8f970a58fe6e82ff164660273193a93.tar.gz |
mixer: close the file descriptor on error.
CID: 1365407
-rw-r--r-- | src/modules/mixer/e_mod_main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c index cc24b40a5f..137ab6948b 100644 --- a/src/modules/mixer/e_mod_main.c +++ b/src/modules/mixer/e_mod_main.c @@ -890,7 +890,11 @@ _get_ppid(pid_t pid) ERR("Can't open %s, maybee the process exited.", buf); return -1; } - if ((read(fd, buf, sizeof(buf))) < 4) return -1; + if ((read(fd, buf, sizeof(buf))) < 4) + { + close(fd); + return -1; + } buf[sizeof(buf) - 1] = 0; s = strrchr(buf, ')'); s += 3; |