Fixed some memory leaks.
Added DOXYGEN-like description to new functions.
Этот коммит содержится в:
родитель
416f7d69fc
Коммит
26c9d6d107
@ -27,6 +27,8 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#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) {
|
||||
|
19
src/file.c
19
src/file.c
@ -50,6 +50,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#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:
|
||||
/*
|
||||
|
@ -1526,3 +1526,4 @@ Q_ (const char *s)
|
||||
sep = strchr(result, '|');
|
||||
return (sep != NULL) ? sep + 1 : result;
|
||||
}
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user