summaryrefslogtreecommitdiff
path: root/replay.c
diff options
context:
space:
mode:
Diffstat (limited to 'replay.c')
-rw-r--r--replay.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/replay.c b/replay.c
index 36817fb..0ab3238 100644
--- a/replay.c
+++ b/replay.c
@@ -166,6 +166,7 @@ int relaylines(int seconds) {
int timestamp = gettimestamp(str);
if (timestamp < 1) {
printf("Error reading timestamp from replay log file.\n");
+ fclose(fp);
return -1;
}
@@ -221,6 +222,7 @@ int readrelayline(int seconds, int linenum, char *str) {
strncpy(str, line, strlen(line));
str[strlen(line)] = '\0';
+ fclose(fp);
return 1;
}
count++;
@@ -228,6 +230,7 @@ int readrelayline(int seconds, int linenum, char *str) {
}
// If we got here something went wrong
+ fclose(fp);
return 0;
}