Fix a memory leak in function find_first_cue in retrolaunch/cd_detect.c.

This commit is contained in:
Lioncash 2013-10-13 23:24:49 -04:00
parent 51d7ec925e
commit 98bdd6896e

View File

@ -254,6 +254,7 @@ int find_first_cue(const char* m3u_path, char* cue_path, size_t max_len) {
skip = 0;
} else if(midstream) {
cue_path[0] = '\0';
close(fd);
return 0;
}
break;
@ -270,6 +271,7 @@ int find_first_cue(const char* m3u_path, char* cue_path, size_t max_len) {
}
}
close(fd);
return -EINVAL;
}