[openib-general] [PATCH] libmthca: fix error handling in mthca_store_qp

Michael S. Tsirkin mst at mellanox.co.il
Tue Dec 13 02:22:55 PST 2005


fix error handling in mthca_store_qp

Signed-off-by: Jack Morgenstein <jackm at mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

Index: latest/src/userspace/libmthca/src/qp.c
===================================================================
--- latest.orig/src/userspace/libmthca/src/qp.c
+++ latest/src/userspace/libmthca/src/qp.c
@@ -879,6 +879,7 @@ int mthca_store_qp(struct mthca_context 
 		ctx->qp_table[tind].table = calloc(ctx->qp_table_mask + 1,
 						   sizeof (struct mthca_qp *));
 		if (!ctx->qp_table[tind].table) {
+			--ctx->qp_table[tind].refcnt;
 			ret = -1;
 			goto out;
 		}



More information about the general mailing list