summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io.c b/io.c
index 2de9a7d..c57e6ee 100644
--- a/io.c
+++ b/io.c
@@ -62,6 +62,7 @@ struct more_file more_open(const char *path)
fstat(fileno(mf.f), &st);
mf.nbytes = st.st_size;
}
+ mf.path = strdup(path);
return mf;
}
@@ -78,4 +79,5 @@ void more_close(struct more_file *mf)
free(mf->tlines);
free(mf->buf);
+ free(mf->path);
}