From aa0e8fd5ac4a5b1af7d4a35f97ce6a58555836d2 Mon Sep 17 00:00:00 2001 From: Jef Poskanzer Date: Sat, 25 May 2013 07:22:11 -0700 Subject: [PATCH] Remove temp file. --- src/iperf_api.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/iperf_api.c b/src/iperf_api.c index 12bdd73..085af4c 100644 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -1741,6 +1741,10 @@ iperf_new_stream(struct iperf_test *test, int s) i_errno = IECREATESTREAM; return NULL; } + if (unlink(template) < 0) { + i_errno = IECREATESTREAM; + return NULL; + } if (ftruncate(sp->buffer_fd, test->settings->blksize) < 0) { i_errno = IECREATESTREAM; return NULL;