mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-08-28 04:56:50 +00:00
do not cleanup exec in cleanup pod
Let pts loop or signal loop do the cleanup job. fix the possible double free of exec. Signed-off-by: Gao feng <omarapazanadi@gmail.com>
This commit is contained in:
@@ -631,6 +631,13 @@ void hyper_cleanup_container(struct hyper_pod *pod)
|
||||
}
|
||||
free(c->maps);
|
||||
close(c->ns);
|
||||
|
||||
free(c->exec.id);
|
||||
for (i = 0; i < c->exec.argc; i++) {
|
||||
//fprintf(stdout, "argv %d %s\n", i, exec->argv[i]);
|
||||
free(c->exec.argv[i]);
|
||||
}
|
||||
free(c->exec.argv);
|
||||
}
|
||||
|
||||
free(pod->c);
|
||||
|
||||
+2
-1
@@ -637,7 +637,7 @@ int hyper_send_exec_eof(int to, struct hyper_pod *pod,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
void hyper_cleanup_exec(struct hyper_pod *pod)
|
||||
{
|
||||
struct hyper_exec *exec, *next;
|
||||
@@ -647,3 +647,4 @@ void hyper_cleanup_exec(struct hyper_pod *pod)
|
||||
hyper_release_exec(exec, pod);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -938,7 +938,6 @@ static void hyper_cleanup_shared(struct hyper_pod *pod)
|
||||
|
||||
void hyper_cleanup_pod(struct hyper_pod *pod)
|
||||
{
|
||||
hyper_cleanup_exec(pod);
|
||||
hyper_cleanup_container(pod);
|
||||
hyper_cleanup_network(pod);
|
||||
hyper_cleanup_shared(pod);
|
||||
|
||||
Reference in New Issue
Block a user