Commit 7738bd9b55c3bc88e0dc4d422aef02570de33b93

Philipp Wiesemann 2015-06-04T17:52:51

AIX: Fixed nearly impossible file descriptor leak.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/audio/paudio/SDL_paudio.c b/src/audio/paudio/SDL_paudio.c
index 5edd21a..79c7164 100644
--- a/src/audio/paudio/SDL_paudio.c
+++ b/src/audio/paudio/SDL_paudio.c
@@ -111,7 +111,7 @@ OpenAudioPath(char *path, int maxlen, int flags, int classic)
 
         if (stat(audiopath, &sb) == 0) {
             fd = open(audiopath, flags, 0);
-            if (fd > 0) {
+            if (fd >= 0) {
                 if (path != NULL) {
                     SDL_strlcpy(path, audiopath, maxlen);
                 }