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

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