linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 rdma-core] cxgb4: free appropriate pointer in error case
@ 2019-11-04 12:25 Potnuri Bharat Teja
  2019-11-05 14:46 ` Leon Romanovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Potnuri Bharat Teja @ 2019-11-04 12:25 UTC (permalink / raw)
  To: jgg, dledford; +Cc: linux-rdma, bharat, nirranjan

error unmap case wrongly frees only the cqid2ptr for qp/mmid2ptr.
This patch frees the appropriate pointer.

Fixes: 9b2d3af5735e ("Query device to get the max supported stags, qps, and cqs")
Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
---
v0 -> v1:
- add missing description
---
 providers/cxgb4/dev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/providers/cxgb4/dev.c b/providers/cxgb4/dev.c
index 7f5955449ca1..4d02c7a91892 100644
--- a/providers/cxgb4/dev.c
+++ b/providers/cxgb4/dev.c
@@ -203,9 +203,9 @@ err_free:
 	if (rhp->cqid2ptr)
 		free(rhp->cqid2ptr);
 	if (rhp->qpid2ptr)
-		free(rhp->cqid2ptr);
+		free(rhp->qpid2ptr);
 	if (rhp->mmid2ptr)
-		free(rhp->cqid2ptr);
+		free(rhp->mmid2ptr);
 	verbs_uninit_context(&context->ibv_ctx);
 	free(context);
 	return NULL;
-- 
2.3.9


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-05 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-04 12:25 [PATCH v2 rdma-core] cxgb4: free appropriate pointer in error case Potnuri Bharat Teja
2019-11-05 14:46 ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).