runtime: fix memory leaks
This commit is contained in:
@@ -31,6 +31,11 @@ static void cmdcall_fini(fx_object *obj, void *priv)
|
||||
{
|
||||
struct bshell_cmdcall_p *cmdcall = priv;
|
||||
|
||||
if (cmdcall->cmd_target) {
|
||||
bshell_command_end_processing(cmdcall->cmd_target);
|
||||
bshell_command_unref(cmdcall->cmd_target);
|
||||
}
|
||||
|
||||
if (cmdcall->cmd_native_path) {
|
||||
free(cmdcall->cmd_native_path);
|
||||
}
|
||||
@@ -44,11 +49,6 @@ static void cmdcall_fini(fx_object *obj, void *priv)
|
||||
}
|
||||
|
||||
fx_vector_destroy(cmdcall->cmd_args, NULL);
|
||||
|
||||
if (cmdcall->cmd_target) {
|
||||
bshell_command_end_processing(cmdcall->cmd_target);
|
||||
bshell_command_unref(cmdcall->cmd_target);
|
||||
}
|
||||
}
|
||||
|
||||
static enum bshell_status cmdcall_push_arg(
|
||||
|
||||
Reference in New Issue
Block a user