From 5851d870a7cc59d350df90eefc729835d646f671 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 10 Feb 2025 09:10:34 -0400 Subject: [PATCH] MT#55283 fix attempt to unlink(NULL) Change-Id: I4b5536692d7076d8bcadd4ffbaf2312ecac5981e (cherry picked from commit 4cdb8eaacaadd25f98aa5c8e8ee368faf507dd67) --- recording-daemon/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recording-daemon/output.c b/recording-daemon/output.c index 47cda87fc..841e538c8 100644 --- a/recording-daemon/output.c +++ b/recording-daemon/output.c @@ -414,7 +414,7 @@ void output_close(metafile_t *mf, output_t *output, tag_t *tag, bool discard) { } else { output_shutdown(output); - if (unlink(output->filename)) + if (output->filename && unlink(output->filename)) ilog(LOG_WARN, "Failed to unlink '%s%s%s': %s", FMT_M(output->filename), strerror(errno)); db_delete_stream(mf, output);