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:
zhenwei pi
2020-02-26 21:51:04 +08:00
parent b4ba92094e
commit e114be4156

View File

@@ -198,6 +198,7 @@ iser_free_iser_conn_res(struct iser_conn *iser_conn, bool destroy)
if (iser_conn->cmthread) {
pthread_cancel(iser_conn->cmthread);
pthread_join(iser_conn->cmthread, NULL);
iser_conn->cmthread = 0;
}