diff options
author | Thomas Haller <thaller@redhat.com> | 2013-10-31 17:53:17 +0100 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-10-31 12:55:23 -0400 |
commit | 374fb6906fe866ca28f7c4702db1d1eec7dedd08 (patch) | |
tree | 6e0d3dab749020342889c2c1b1ae84d3e8ff82bd | |
parent | b40878bf364fab284755a488aa2704079efac307 (diff) | |
download | libgsystem-374fb6906fe866ca28f7c4702db1d1eec7dedd08.tar.gz |
file-utils: Don't leaking fd on error path in gs_file_create()
This error was found by running Coverity.
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | gsystem-file-utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gsystem-file-utils.c b/gsystem-file-utils.c index 41cd769..ff97e19 100644 --- a/gsystem-file-utils.c +++ b/gsystem-file-utils.c @@ -345,6 +345,7 @@ gs_file_create (GFile *file, if (fchmod (fd, mode) < 0) { + close (fd); _set_error_from_errno (error); goto out; } |