mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-29 20:27:12 +01:00
AIX: Fixed nearly impossible file descriptor leak.
This commit is contained in:
parent
eab076a7ee
commit
7738bd9b55
@ -111,7 +111,7 @@ OpenAudioPath(char *path, int maxlen, int flags, int classic)
|
|||||||
|
|
||||||
if (stat(audiopath, &sb) == 0) {
|
if (stat(audiopath, &sb) == 0) {
|
||||||
fd = open(audiopath, flags, 0);
|
fd = open(audiopath, flags, 0);
|
||||||
if (fd > 0) {
|
if (fd >= 0) {
|
||||||
if (path != NULL) {
|
if (path != NULL) {
|
||||||
SDL_strlcpy(path, audiopath, maxlen);
|
SDL_strlcpy(path, audiopath, maxlen);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user