Mercurial > mplayer.hg
changeset 35311:18eebabbc172
Do not call fstat if open failed.
author | reimar |
---|---|
date | Sat, 10 Nov 2012 14:21:16 +0000 |
parents | 7077d1aed027 |
children | 3e6a575bd47b |
files | stream/stream_cue.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/stream_cue.c Sat Nov 10 14:16:33 2012 +0000 +++ b/stream/stream_cue.c Sat Nov 10 14:21:16 2012 +0000 @@ -249,7 +249,7 @@ break; } fd_bin = open(cur_name, O_RDONLY); - if (fstat(fd_bin, &filestat) == -1 || !S_ISREG(filestat.st_mode)) { + if (fd_bin != -1 && (fstat(fd_bin, &filestat) == -1 || !S_ISREG(filestat.st_mode))) { close(fd_bin); fd_bin = -1; }