[openib-general] [PATCH] libmthca: mthca_free_pd frees pointer to wrong structure

Jack Morgenstein jackm at mellanox.co.il
Wed Jan 11 07:53:19 PST 2006


Freed pd pointer points to incorrect structure (by chance, they coincided).

Signed-off-by: Jack Morgenstein <jackm at mellanox.co.il>

Index: gen2/src/userspace/libmthca/src/verbs.c
===================================================================
--- gen2.orig/src/userspace/libmthca/src/verbs.c	2006-01-11 11:57:11.070034000 +0200
+++ gen2/src/userspace/libmthca/src/verbs.c	2006-01-11 15:26:19.853269000 +0200
@@ -112,7 +112,7 @@ int mthca_free_pd(struct ibv_pd *pd)
 	if (ret)
 		return ret;
 
-	free(pd);
+	free(to_mpd(pd));
 	return 0;
 }
 



More information about the general mailing list