Fix a memory leak in function find_first_cue in retrolaunch/cd_detect.c.
This commit is contained in:
parent
51d7ec925e
commit
98bdd6896e
|
@ -254,6 +254,7 @@ int find_first_cue(const char* m3u_path, char* cue_path, size_t max_len) {
|
||||||
skip = 0;
|
skip = 0;
|
||||||
} else if(midstream) {
|
} else if(midstream) {
|
||||||
cue_path[0] = '\0';
|
cue_path[0] = '\0';
|
||||||
|
close(fd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -270,6 +271,7 @@ int find_first_cue(const char* m3u_path, char* cue_path, size_t max_len) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close(fd);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue