mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
Ticket #3420: code cleanup before 4.8.15 release.
Ticket #3457: (my_systemv_flags): fix memory leak. (my_system_make_arg_array): ret rid of string duplications." Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
2641b2cc11
commit
a382b1558b
@ -215,8 +215,8 @@ my_system_make_arg_array (int flags, const char *shell, char **execute_name)
|
||||
|
||||
if ((flags & EXECUTE_AS_SHELL) != 0)
|
||||
{
|
||||
g_ptr_array_add (args_array, g_strdup (shell));
|
||||
g_ptr_array_add (args_array, g_strdup ("-c"));
|
||||
g_ptr_array_add (args_array, (gpointer) shell);
|
||||
g_ptr_array_add (args_array, (gpointer) "-c");
|
||||
*execute_name = g_strdup (shell);
|
||||
}
|
||||
else
|
||||
@ -229,7 +229,7 @@ my_system_make_arg_array (int flags, const char *shell, char **execute_name)
|
||||
else
|
||||
*execute_name = g_strndup (shell, (gsize) (shell_token - shell));
|
||||
|
||||
g_ptr_array_add (args_array, g_strdup (shell));
|
||||
g_ptr_array_add (args_array, (gpointer) shell);
|
||||
}
|
||||
return args_array;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user