summaryrefslogtreecommitdiff
path: root/runner
diff options
context:
space:
mode:
Diffstat (limited to 'runner')
-rw-r--r--runner/resultgen.c4
-rw-r--r--runner/runner_tests.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/runner/resultgen.c b/runner/resultgen.c
index 11eff9d3..9fc54cdc 100644
--- a/runner/resultgen.c
+++ b/runner/resultgen.c
@@ -809,6 +809,7 @@ static void fill_from_journal(int fd,
}
free(line);
+ fclose(f);
}
static void override_result_single(struct json_object *obj)
@@ -1073,13 +1074,16 @@ bool generate_results(int dirfd)
}
if (!parse_test_directory(testdirfd, &job_list.entries[i], &settings, &results)) {
+ close(testdirfd);
close(resultsfd);
return false;
}
+ close(testdirfd);
}
json_string = json_object_to_json_string_ext(obj, JSON_C_TO_STRING_PRETTY);
write(resultsfd, json_string, strlen(json_string));
+ close(resultsfd);
return true;
}
diff --git a/runner/runner_tests.c b/runner/runner_tests.c
index b03f2acf..3705d711 100644
--- a/runner/runner_tests.c
+++ b/runner/runner_tests.c
@@ -50,6 +50,8 @@ static char *dump_file(int dirfd, char *name)
}
s = read(fd, buf, 255);
+ close(fd);
+
if (s < 0) {
free(buf);
return NULL;