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