aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/benchmarks/latency.c4
-rw-r--r--tests/torture.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/benchmarks/latency.c b/tests/benchmarks/latency.c
index 9d68fd3f..849c39cd 100644
--- a/tests/benchmarks/latency.c
+++ b/tests/benchmarks/latency.c
@@ -75,12 +75,12 @@ int benchmarks_ping_latency (const char *host, float *average){
}
if(!found)
goto parseerror;
- fclose(fd);
+ pclose(fd);
return 0;
parseerror:
fprintf(stderr,"Parse error : couldn't locate average in %s",line);
- fclose(fd);
+ pclose(fd);
return -1;
}
diff --git a/tests/torture.c b/tests/torture.c
index 1d45e421..ff57c64a 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -132,6 +132,7 @@ int torture_rmdirs(const char *path) {
rewinddir(d);
}
} else {
+ closedir(d);
return -1;
}
@@ -257,6 +258,7 @@ failed:
}
ssh_disconnect(t->ssh);
ssh_free(t->ssh);
+ free(t);
return NULL;
}