diff --git a/terminal.c b/terminal.c index 56cf8d69..2a9ee5bf 100644 --- a/terminal.c +++ b/terminal.c @@ -797,8 +797,12 @@ term_destroy(struct terminal *term) } free(term); + +#if defined(__GLIBC__) if (!malloc_trim(0)) LOG_WARN("failed to trim memory"); +#endif + return ret; }