[MPlayer-cvslog] r35405 - trunk/stream/stream_cue.c

reimar subversion at mplayerhq.hu
Sat Nov 10 15:21:16 CET 2012


Author: reimar
Date: Sat Nov 10 15:21:16 2012
New Revision: 35405

Log:
Do not call fstat if open failed.

Modified:
   trunk/stream/stream_cue.c

Modified: trunk/stream/stream_cue.c
==============================================================================
--- trunk/stream/stream_cue.c	Sat Nov 10 15:16:33 2012	(r35404)
+++ trunk/stream/stream_cue.c	Sat Nov 10 15:21:16 2012	(r35405)
@@ -249,7 +249,7 @@ static int cue_find_bin (const char *fir
       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;
     }


More information about the MPlayer-cvslog mailing list