We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7baaa49 commit 8b00914Copy full SHA for 8b00914
drivers/infiniband/core/cm.c
@@ -1876,8 +1876,7 @@ static int cm_req_handler(struct cm_work *work)
1876
listen_cm_id_priv = cm_match_req(work, cm_id_priv);
1877
if (!listen_cm_id_priv) {
1878
ret = -EINVAL;
1879
- kfree(cm_id_priv->timewait_info);
1880
- goto destroy;
+ goto free_timeinfo;
1881
}
1882
1883
cm_id_priv->id.cm_handler = listen_cm_id_priv->id.cm_handler;
@@ -1979,6 +1978,8 @@ static int cm_req_handler(struct cm_work *work)
1979
1978
rejected:
1980
atomic_dec(&cm_id_priv->refcount);
1981
cm_deref_id(listen_cm_id_priv);
+free_timeinfo:
1982
+ kfree(cm_id_priv->timewait_info);
1983
destroy:
1984
ib_destroy_cm_id(cm_id);
1985
return ret;
0 commit comments