From 98bdd6896e893a5d967682e15306e69b13812d4b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 13 Oct 2013 23:24:49 -0400 Subject: [PATCH] Fix a memory leak in function find_first_cue in retrolaunch/cd_detect.c. --- tools/retrolaunch/cd_detect.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/retrolaunch/cd_detect.c b/tools/retrolaunch/cd_detect.c index 102d1512d4..f6c407a66d 100644 --- a/tools/retrolaunch/cd_detect.c +++ b/tools/retrolaunch/cd_detect.c @@ -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; }