summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Davidsaver <mdavidsaver@gmail.com>2015-07-26 09:27:10 -0400
committerJoel Sherrill <joel.sherrill@oarcorp.com>2015-07-29 11:04:18 -0500
commita4e052b53fb10f0cf2e3c1f4681710ab9912fbcd (patch)
treee7b22c3927cfc8b4d7c7fbe57a9ab84bf48303bc
parentrpc: misaligned pointer dereference in clnt_udp.c line 363 (diff)
downloadrtems-a4e052b53fb10f0cf2e3c1f4681710ab9912fbcd.tar.bz2
tftpDriver: close() false error
closes #2376.
-rw-r--r--cpukit/libnetworking/lib/tftpDriver.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpukit/libnetworking/lib/tftpDriver.c b/cpukit/libnetworking/lib/tftpDriver.c
index bbaf493fd3..880223f47a 100644
--- a/cpukit/libnetworking/lib/tftpDriver.c
+++ b/cpukit/libnetworking/lib/tftpDriver.c
@@ -995,7 +995,9 @@ static int rtems_tftp_close(
rtems_task_wake_after (1 + ticksPerSecond / 10);
}
releaseStream (fs, iop->data0);
- rtems_set_errno_and_return_minus_one (e);
+ if (e)
+ rtems_set_errno_and_return_minus_one (e);
+ return 0;
}
static ssize_t rtems_tftp_write(