aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-29 13:18:40 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-29 13:18:40 -0400
commitb2d119008dc22778bddcaadfabc59b31d408216e (patch)
treeab218aa7770384474db249580dedd1c966031850
parent0a8288f6d831b123274f6f33888d438f10afc2e3 (diff)
downloadstasis-b2d119008dc22778bddcaadfabc59b31d408216e.tar.gz
write_report_output: fail on allocation errors
-rw-r--r--src/cli/stasis_indexer/junitxml_report.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cli/stasis_indexer/junitxml_report.c b/src/cli/stasis_indexer/junitxml_report.c
index c6cf4b0..488e2f0 100644
--- a/src/cli/stasis_indexer/junitxml_report.c
+++ b/src/cli/stasis_indexer/junitxml_report.c
@@ -29,6 +29,10 @@ static int write_report_output(struct Delivery *ctx, FILE *destfp, const char *x
char *bname_tmp = strdup(xmlfilename);
char *bname = strdup(path_basename(bname_tmp));
+ if (!bname) {
+ SYSERROR("%s", "unable to allocate bytes for basename");
+ return -1;
+ }
if (endswith(bname, ".xml")) {
bname[strlen(bname) - 4] = 0;
}