mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
Revert second bunch of mhl patches (see 9b9cab5874
)
This reintroduce GString again and drop the use of mhl_mem_free in some files Signed-off-by: Patrick Winnertz <winnie@debian.org>
This commit is contained in:
parent
5920d13810
commit
155fd328a4
20
edit/edit.c
20
edit/edit.c
@ -274,20 +274,22 @@ edit_insert_file (WEdit *edit, const char *filename)
|
||||
edit_insert_stream (edit, f);
|
||||
edit_cursor_move (edit, current - edit->curs1);
|
||||
if (pclose (f) > 0) {
|
||||
char errmsg[8192];
|
||||
snprintf(errmsg, sizeof(errmsg), _(" Error reading from pipe: %s "), p);
|
||||
edit_error_dialog (_("Error"), errmsg);
|
||||
mhl_mem_free (p);
|
||||
GString *errmsg = g_string_new (NULL);
|
||||
g_string_sprintf (errmsg, _(" Error reading from pipe: %s "), p);
|
||||
edit_error_dialog (_("Error"), errmsg->str);
|
||||
g_string_free (errmsg, TRUE);
|
||||
g_free (p);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
char errmsg[8192];
|
||||
snprintf(errmsg, sizeof(errmsg), _(" Cannot open pipe for reading: %s "), p);
|
||||
edit_error_dialog (_("Error"), errmsg);
|
||||
mhl_mem_free (p);
|
||||
GString *errmsg = g_string_new (NULL);
|
||||
g_string_sprintf (errmsg, _(" Cannot open pipe for reading: %s "), p);
|
||||
edit_error_dialog (_("Error"), errmsg->str);
|
||||
g_string_free (errmsg, TRUE);
|
||||
g_free (p);
|
||||
return 0;
|
||||
}
|
||||
mhl_mem_free (p);
|
||||
g_free (p);
|
||||
} else {
|
||||
int i, file, blocklen;
|
||||
long current = edit->curs1;
|
||||
|
@ -590,7 +590,7 @@ putenv (char *string)
|
||||
size * sizeof (char *));
|
||||
new_environ[size] = (char *) string;
|
||||
new_environ[size + 1] = NULL;
|
||||
mhl_mem_free ((void *) last_environ);
|
||||
g_free ((void *) last_environ);
|
||||
last_environ = new_environ;
|
||||
__environ = new_environ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user