Blame SOURCES/0008-cxgb4-free-appropriate-pointer-in-error-case.patch

bbe12a
From 37079bbdb4c6b14f475a8910393e013e40247815 Mon Sep 17 00:00:00 2001
bbe12a
From: Potnuri Bharat Teja <bharat@chelsio.com>
bbe12a
Date: Thu, 31 Oct 2019 16:05:59 +0530
bbe12a
Subject: [PATCH rdma-core 08/13] cxgb4: free appropriate pointer in error case
bbe12a
bbe12a
[ Upstream commit 151068ef86cc28d75b4cd73906b79c52fe55ee9c ]
bbe12a
bbe12a
error unmap case wrongly frees only the cqid2ptr for qp/mmid2ptr.
bbe12a
This patch frees the appropriate pointer.
bbe12a
bbe12a
Fixes: 9b2d3af5735e ("Query device to get the max supported stags, qps, and cqs")
bbe12a
Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
bbe12a
---
bbe12a
v0 -> v1:
bbe12a
- add missing description
bbe12a
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
bbe12a
---
bbe12a
 providers/cxgb4/dev.c | 4 ++--
bbe12a
 1 file changed, 2 insertions(+), 2 deletions(-)
bbe12a
bbe12a
diff --git a/providers/cxgb4/dev.c b/providers/cxgb4/dev.c
bbe12a
index 7f595544..4d02c7a9 100644
bbe12a
--- a/providers/cxgb4/dev.c
bbe12a
+++ b/providers/cxgb4/dev.c
bbe12a
@@ -203,9 +203,9 @@ err_free:
bbe12a
 	if (rhp->cqid2ptr)
bbe12a
 		free(rhp->cqid2ptr);
bbe12a
 	if (rhp->qpid2ptr)
bbe12a
-		free(rhp->cqid2ptr);
bbe12a
+		free(rhp->qpid2ptr);
bbe12a
 	if (rhp->mmid2ptr)
bbe12a
-		free(rhp->cqid2ptr);
bbe12a
+		free(rhp->mmid2ptr);
bbe12a
 	verbs_uninit_context(&context->ibv_ctx);
bbe12a
 	free(context);
bbe12a
 	return NULL;
bbe12a
-- 
bbe12a
2.20.1
bbe12a