From 37d4730677fb1a3733d9eb347f3ecf5464030736 Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Thu, 13 Jan 2005 23:40:00 +0000 Subject: 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 --- apps/recorder/recording.c | 3 +++ 1 file changed, 3 insertions(+) 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) /* walk through the directory content */ entry = readdir(dir); if (!entry) + { + closedir(dir); break; /* end of dir */ + } if (strncasecmp(entry->d_name, "rec_", 4)) continue; /* no recording file */ curr_rec_file = atoi(&entry->d_name[4]); -- cgit v1.2.3