[openib-general] [PATCH] mad doesn't get freed up after send_mad is called

Krishna Kumar krkumar at us.ibm.com
Fri Nov 5 13:48:56 PST 2004


Applies on top of my previous patch...

diff -ruNp trunk/src/linux-kernel/infiniband/core/sa_query.c.org trunk/src/linux-kernel/infiniband/core/sa_query.c
--- trunk/src/linux-kernel/infiniband/core/sa_query.c.org	2004-11-05 13:13:12.000000000 -0800
+++ trunk/src/linux-kernel/infiniband/core/sa_query.c	2004-11-05 13:43:10.000000000 -0800
@@ -550,6 +550,7 @@ int ib_sa_path_rec_get(struct ib_device
 		ret = query->sa_query.id;
 		*sa_query = &query->sa_query;
 	}
+	kfree(query->sa_query.mad);
 	kfree(query);
 	return ret;
 }
@@ -624,6 +625,7 @@ int ib_sa_mcmember_rec_query(struct ib_d
 		ret = query->sa_query.id;
 		*sa_query = &query->sa_query;
 	}
+	kfree(query->sa_query.mad);
 	kfree(query);
 	return ret;






More information about the general mailing list