MT#55283 fix attempt to unlink(NULL)

Change-Id: I4b5536692d7076d8bcadd4ffbaf2312ecac5981e
(cherry picked from commit 4cdb8eaaca)
mr11.5
Richard Fuchs 10 months ago
parent 656a9bb654
commit 930548faa2

@ -376,7 +376,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);

Loading…
Cancel
Save