MT#55283 fix attempt to unlink(NULL)

Change-Id: I4b5536692d7076d8bcadd4ffbaf2312ecac5981e
(cherry picked from commit 4cdb8eaaca)
mr13.2
Richard Fuchs 10 months ago
parent d2245c2899
commit 5851d870a7

@ -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);

Loading…
Cancel
Save