diff options
| -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 7ba59cb..0ffa16f 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]); |