diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2018-07-18 10:21:00 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2018-07-18 10:21:00 +0200 |
commit | 909433dde936ba5cc084c0fa2e6239c7011bd49d (patch) | |
tree | f68a7cfde62ef97f1f92fb09706aebe7a33bd15a /src | |
parent | 4026d12737906700ab801f6fc6bb6482ae442edd (diff) |
Coverity CID 301779: fixed fd leak
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c index 418ac4c..4c65900 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1070,6 +1070,8 @@ int selftest_minimal_requirements(void) if (s < 0 && errno != EEXIST) { E_STRERR("RO-file '%s' check", getopt_str(OPT_ROFILE)); goto error; + } else if (s >= 0) { + close(s); } if (mkdir(getopt_str(OPT_RODIR), S_IRWXU) && errno != EEXIST) { E_STRERR("RO-directory '%s' check", getopt_str(OPT_RODIR)); |