diff --git a/src/command.c b/src/command.c index 7764e4530..3141f8d9a 100644 --- a/src/command.c +++ b/src/command.c @@ -27,6 +27,8 @@ #include #include +#include "mhl/memory.h" + #include "global.h" /* home_dir */ #include "tty.h" #include "widget.h" /* WInput */ @@ -136,6 +138,7 @@ examine_cd (char *path) } g_free (q); g_free (path_tilde); + mhl_mem_free(path); return result; } diff --git a/src/complete.c b/src/complete.c index a11b9c955..d3fbceb46 100644 --- a/src/complete.c +++ b/src/complete.c @@ -31,6 +31,8 @@ #include #include +#include "mhl/memory.h" + #include "global.h" #include "tty.h" #include "win.h" @@ -934,6 +936,7 @@ complete_engine (WInput *in, int what_to_do) free_completions (in); } else beep (); + //mhl_mem_free(complete); } if ((what_to_do & DO_QUERY) && in->completions && in->completions [1]) { int maxlen = 0, i, count = 0; @@ -944,10 +947,9 @@ complete_engine (WInput *in, int what_to_do) WListbox *query_list; for (p=in->completions + 1; *p; count++, p++) { - *p = escape_string(*p); if ((i = strlen (*p)) > maxlen) maxlen = i; - } + } start_x = in->widget.x; start_y = in->widget.y; if (start_y - 2 >= count) { diff --git a/src/file.c b/src/file.c index 8936e6898..bf9c4538c 100644 --- a/src/file.c +++ b/src/file.c @@ -50,6 +50,8 @@ #include #include +#include "mhl/memory.h" + #include "global.h" #include "tty.h" #include "eregex.h" @@ -1872,9 +1874,13 @@ panel_operate (void *source_panel, FileOperation operation, g_free (dest); dest = temp2; temp = NULL; - + + temp2 = source_with_path; source_with_path = unescape_string(source_with_path); + mhl_mem_free(temp2); + temp2 = dest; dest = unescape_string(dest); + mhl_mem_free(temp2); switch (operation) { case OP_COPY: /* @@ -1965,10 +1971,15 @@ panel_operate (void *source_panel, FileOperation operation, value = transform_error; else { char *temp2 = concat_dir_and_file (dest, temp); + char *temp3; + + temp3 = source_with_path; + source_with_path = unescape_string(source_with_path); + mhl_mem_free(temp3); + temp3 = temp2; + temp2 = unescape_string(temp2); + mhl_mem_free(temp3); - source_with_path = unescape_string(source_with_path); - temp2 = unescape_string(temp2); - switch (operation) { case OP_COPY: /* diff --git a/src/util.c b/src/util.c index c5612cf5b..edc759a2e 100644 --- a/src/util.c +++ b/src/util.c @@ -1526,3 +1526,4 @@ Q_ (const char *s) sep = strchr(result, '|'); return (sep != NULL) ? sep + 1 : result; } +