aboutsummaryrefslogtreecommitdiff
path: root/src/cli/stasis_indexer
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/stasis_indexer')
-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;
}