aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-29 13:18:40 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-05-11 15:50:49 -0400
commit9732a6fca438f719eb9e7c9f48e9df726743a9ea (patch)
treebb884dc6c3981be35f692655b02f0ba65b347504
parent5f32f35ce9879b46a70b31c8847192d2006ccb4d (diff)
downloadstasis-9732a6fca438f719eb9e7c9f48e9df726743a9ea.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 073bb61..891fe8a 100644
--- a/src/cli/stasis_indexer/junitxml_report.c
+++ b/src/cli/stasis_indexer/junitxml_report.c
@@ -31,6 +31,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;
}