From 73a94a359107a4fc1335c7defd1798f219e2e397 Mon Sep 17 00:00:00 2001 From: Marc Olzheim Date: Fri, 25 Mar 2005 23:59:48 +0000 Subject: [PATCH] (turn): Check whether fclose() succeeds. --- src/lib/commands/turn.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/commands/turn.c b/src/lib/commands/turn.c index 4f35f30e..6a365eff 100644 --- a/src/lib/commands/turn.c +++ b/src/lib/commands/turn.c @@ -113,7 +113,13 @@ turn(void) msgfilepath); return RET_SYS; } - fclose(fptr); + if (fclose(fptr)) { + pr("Something went wrong closing the message.\n"); + logerror("Could not properly close message file (%s).\n", + msgfilepath); + return RET_SYS; + } + pr("\n"); return RET_OK;