MT#55283 fix attempt to unlink(NULL)

Change-Id: I4b5536692d7076d8bcadd4ffbaf2312ecac5981e
(cherry picked from commit 4cdb8eaaca)
(cherry picked from commit 930548faa2)
mr11.5.1
Richard Fuchs 10 months ago
parent 1ab955ca5b
commit 11e3d35d10

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