aboutsummaryrefslogtreecommitdiffstats
path: root/help.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-11-25 22:58:20 -0300
committerdequis <dx@dxzone.com.ar>2015-11-25 22:59:00 -0300
commit42a418e60fb5d3dfbcd9bdc5251bf4a6047bc3c5 (patch)
tree24d003f74bcc4a6239292efbe69686d5f09a8a9a /help.c
parent755470287207c4b580b722536889a8bb9d9427bf (diff)
help: free strings added by help_add_mem()
Not really a leak, but I want valgrind to be happy because valgrind is nice to me. I love you valgrind <3
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;
}