summaryrefslogtreecommitdiff
path: root/runner/resultgen.c
diff options
context:
space:
mode:
authorPetri Latvala <petri.latvala@intel.com>2018-10-02 10:45:41 +0300
committerPetri Latvala <petri.latvala@intel.com>2018-10-03 13:28:47 +0300
commitb82c9c97efa66668de172ad04deb83c9675f6a97 (patch)
tree78d18105a4d3ba54b7942835d1ee96654b2e7ac4 /runner/resultgen.c
parent5caab92d0b9c8516b7ea02809608fcd835af19d4 (diff)
runner: Plug more fd leaks
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'runner/resultgen.c')
-rw-r--r--runner/resultgen.c4
1 files changed, 4 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;
}