iser: fix memory leak for cm thread
If a thread is created without any attr, it works in attached mode. It means that we need run pthread_join to relaim stack of thread. Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
This commit is contained in:
@@ -198,6 +198,7 @@ iser_free_iser_conn_res(struct iser_conn *iser_conn, bool destroy)
|
|||||||
|
|
||||||
if (iser_conn->cmthread) {
|
if (iser_conn->cmthread) {
|
||||||
pthread_cancel(iser_conn->cmthread);
|
pthread_cancel(iser_conn->cmthread);
|
||||||
|
pthread_join(iser_conn->cmthread, NULL);
|
||||||
iser_conn->cmthread = 0;
|
iser_conn->cmthread = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user