summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgldrk <me@rarity.fan>2023-09-26 23:21:54 +0300
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-09-30 09:21:13 -0700
commitb8ee816d8045b4a0c216825ed96a5e0515c6d94e (patch)
tree89e42829de0b8177d0fd7f12124f02d302df014a
parent4208a0947f08562a727a855ddcd4605d201c99bd (diff)
Free buffered file contents when closing man page
-rw-r--r--ScrollByL.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ScrollByL.c b/ScrollByL.c
index b2dc4f8..18eba96 100644
--- a/ScrollByL.c
+++ b/ScrollByL.c
@@ -701,8 +701,11 @@ Destroy(Widget w)
if (sblw->scroll.bar != NULL)
XtDestroyWidget(sblw->scroll.bar); /* Destroy scrollbar. */
- if (sblw->scroll.file != NULL)
+ if (sblw->scroll.file != NULL) {
fclose(sblw->scroll.file);
+ sblw->scroll.file = NULL;
+ }
+ LoadFile(w);
DestroyGCs(w);
}