diff --git a/src/ChangeLog b/src/ChangeLog index c5d35c238..dd7a59197 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-06-06 Pavel Roskin + + * command.c (command_new): Fix memory leak. + * subshell.c (exit_subshell): Free pty_buffer. + 2003-06-05 Pavel Roskin * dir.c (do_load_dir): Add new argument "path" to avoid the need diff --git a/src/command.c b/src/command.c index 6024adf01..aeff6f8b8 100644 --- a/src/command.c +++ b/src/command.c @@ -268,7 +268,7 @@ command_callback (WInput *cmd, int msg, int par) WInput * command_new (int y, int x, int cols) { - WInput *cmd = g_new (WInput, 1); + WInput *cmd; cmd = input_new (y, x, DEFAULT_COLOR, cols, "", "cmdline"); diff --git a/src/subshell.c b/src/subshell.c index 07b5c8562..0a7fe42ce 100644 --- a/src/subshell.c +++ b/src/subshell.c @@ -660,6 +660,7 @@ int exit_subshell (void) } g_free (subshell_prompt); + g_free (pty_buffer); subshell_prompt = NULL; return quit;