From 697f50aea8638fc9f5d1a250de6c1b9f4697500e Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Mon, 22 Jun 2009 12:24:14 +0100 Subject: [PATCH] Check return value from close() call. --- daemon/file.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/daemon/file.c b/daemon/file.c index 0eef0c0..3f07ffc 100644 --- a/daemon/file.c +++ b/daemon/file.c @@ -58,7 +58,11 @@ do_touch (char *path) return -1; } - close (fd); + if (close (fd) == -1) { + reply_with_perror ("close: %s", path); + return -1; + } + return 0; } -- 1.8.3.1