1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-11-03 04:17:18 -05:00

Fix crash in error path

This commit is contained in:
Moritz Grimm 2015-05-28 16:12:38 +02:00
parent 2720521c71
commit cf141edd52

View File

@ -132,13 +132,13 @@ _playlist_run_program(struct playlist *pl)
if (fgets(buf, (int)sizeof(buf), filep) == NULL) {
int errnum = errno;
pclose(filep);
if (ferror(filep)) {
log_alert("%s: output read error: %s", pl->filename,
strerror(errnum));
pclose(filep);
exit(1);
}
pclose(filep);
/* No output (end of playlist.) */
return (NULL);