diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2005-01-13 23:40:00 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2005-01-13 23:40:00 +0000 |
commit | 37d4730677fb1a3733d9eb347f3ecf5464030736 (patch) | |
tree | 24654f4c12926ec7f813817fdcb8f23c0f601964 | |
parent | 5265edda08809159fbf54e92478cfdc096f33289 (diff) | |
download | rockbox-37d4730677fb1a3733d9eb347f3ecf5464030736.tar.gz rockbox-37d4730677fb1a3733d9eb347f3ecf5464030736.zip |
Ondio bugfix: recording file number generator didn't release the directory handle, causing a panic after several calls
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5564 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/recorder/recording.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 7ba59cb0ab..0ffa16f31b 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -185,7 +185,10 @@ char *rec_create_filename(char *buffer) | |||
185 | /* walk through the directory content */ | 185 | /* walk through the directory content */ |
186 | entry = readdir(dir); | 186 | entry = readdir(dir); |
187 | if (!entry) | 187 | if (!entry) |
188 | { | ||
189 | closedir(dir); | ||
188 | break; /* end of dir */ | 190 | break; /* end of dir */ |
191 | } | ||
189 | if (strncasecmp(entry->d_name, "rec_", 4)) | 192 | if (strncasecmp(entry->d_name, "rec_", 4)) |
190 | continue; /* no recording file */ | 193 | continue; /* no recording file */ |
191 | curr_rec_file = atoi(&entry->d_name[4]); | 194 | curr_rec_file = atoi(&entry->d_name[4]); |