mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +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>
|
2000-08-31 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
* directory-ok.xpm gpopup.c i-device.png image.metadata.in
|
* directory-ok.xpm gpopup.c i-device.png image.metadata.in
|
||||||
|
@ -294,15 +294,19 @@ save_panel_types (void)
|
|||||||
panel_save_setup (pc->panel, pc->panel->panel_name);
|
panel_save_setup (pc->panel, pc->panel->panel_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
run_cmd (void)
|
run_cmd (void)
|
||||||
{
|
{
|
||||||
char *cmd;
|
char *cmd = _("Enter command to run");
|
||||||
|
|
||||||
cmd = input_dialog (_("Enter command to run"), _("Enter command to run"), "");
|
cmd = input_dialog (cmd, cmd, "");
|
||||||
if (cmd && *cmd){
|
if (cmd){
|
||||||
|
if (*cmd){
|
||||||
my_system (EXECUTE_AS_SHELL, shell, cmd);
|
my_system (EXECUTE_AS_SHELL, shell, cmd);
|
||||||
}
|
}
|
||||||
|
g_free (cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -539,15 +543,14 @@ create_new_menu_from (char *file, GtkWidget *shell, gint pos)
|
|||||||
|
|
||||||
g_return_val_if_fail (shell != NULL, pos);
|
g_return_val_if_fail (shell != NULL, pos);
|
||||||
|
|
||||||
|
if (shell == NULL){
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
dir = opendir (file);
|
dir = opendir (file);
|
||||||
if (dir == NULL)
|
if (dir == NULL)
|
||||||
return pos;
|
return pos;
|
||||||
|
|
||||||
if (shell == NULL){
|
|
||||||
closedir (dir);
|
|
||||||
return pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
while ((dirstruc = readdir (dir)) != NULL){
|
while ((dirstruc = readdir (dir)) != NULL){
|
||||||
if (dirstruc->d_name[0] == '.')
|
if (dirstruc->d_name[0] == '.')
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user