# HG changeset patch # User reimar # Date 1352557276 0 # Node ID 18eebabbc17208ee9c775beb33c6630c2d887825 # Parent 7077d1aed027f63cd0f2c4a7d28a843a67d9d267 Do not call fstat if open failed. diff -r 7077d1aed027 -r 18eebabbc172 stream/stream_cue.c --- 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; }