aboutsummaryrefslogtreecommitdiffstats
path: root/help.c
diff options
context:
space:
mode:
Diffstat (limited to 'help.c')
-rw-r--r--help.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/help.c b/help.c
index 07ba2102..280d4862 100644
--- a/help.c
+++ b/help.c
@@ -104,7 +104,9 @@ void help_free(help_t **help)
h = *help;
while (h) {
- if (h->fd != last_fd) {
+ if (h->fd == -1) {
+ g_free(h->offset.mem_offset);
+ } else if (h->fd != last_fd) {
close(h->fd);
last_fd = h->fd;
}