mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 04:22:34 +03:00
2000-09-12 Andrew V. Samoilov <sav@bcs.zp.ua>
* glayout.c (run_cmd): Memory leak fix: cmd released after use
This commit is contained in:
parent
4ed04204d7
commit
e3ad216756
@ -1,3 +1,7 @@
|
||||
2000-09-12 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* glayout.c (run_cmd): Memory leak fix: cmd released after use
|
||||
|
||||
2000-08-31 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* directory-ok.xpm gpopup.c i-device.png image.metadata.in
|
||||
|
@ -294,14 +294,18 @@ save_panel_types (void)
|
||||
panel_save_setup (pc->panel, pc->panel->panel_name);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
run_cmd (void)
|
||||
{
|
||||
char *cmd;
|
||||
char *cmd = _("Enter command to run");
|
||||
|
||||
cmd = input_dialog (_("Enter command to run"), _("Enter command to run"), "");
|
||||
if (cmd && *cmd){
|
||||
my_system (EXECUTE_AS_SHELL, shell, cmd);
|
||||
cmd = input_dialog (cmd, cmd, "");
|
||||
if (cmd){
|
||||
if (*cmd){
|
||||
my_system (EXECUTE_AS_SHELL, shell, cmd);
|
||||
}
|
||||
g_free (cmd);
|
||||
}
|
||||
}
|
||||
|
||||
@ -539,15 +543,14 @@ create_new_menu_from (char *file, GtkWidget *shell, gint pos)
|
||||
|
||||
g_return_val_if_fail (shell != NULL, pos);
|
||||
|
||||
if (shell == NULL){
|
||||
return pos;
|
||||
}
|
||||
|
||||
dir = opendir (file);
|
||||
if (dir == NULL)
|
||||
return pos;
|
||||
|
||||
if (shell == NULL){
|
||||
closedir (dir);
|
||||
return pos;
|
||||
}
|
||||
|
||||
while ((dirstruc = readdir (dir)) != NULL){
|
||||
if (dirstruc->d_name[0] == '.')
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user