caught host memory leak
authorLawrence Cayton <lcayton@tuebingen.mpg.de>
Tue, 5 Apr 2011 17:00:34 +0000 (19:00 +0200)
committerLawrence Cayton <lcayton@tuebingen.mpg.de>
Tue, 5 Apr 2011 17:00:34 +0000 (19:00 +0200)
rbc.cu

diff --git a/rbc.cu b/rbc.cu
index c8b8f79..a0af447 100644 (file)
--- a/rbc.cu
+++ b/rbc.cu
@@ -421,6 +421,11 @@ void initCompPlan(compPlan *dcP, charMatrix cM, unint *groupCountQ, unint *group
   checkErr( cudaMalloc( (void**)&dcP->qGroupToXGroup, sQGroupToXGroup*sizeof(*dcP->qGroupToXGroup) ) );
   cudaMemcpy( dcP->qGroupToXGroup, cP.qGroupToXGroup, sQGroupToXGroup*sizeof(*dcP->qGroupToXGroup), cudaMemcpyHostToDevice );
   dcP->ld = cP.ld;
+
+  free(cP.numGroups);
+  free(cP.groupCountX);
+  free(cP.qToQGroup);
+  free(cP.qGroupToXGroup);
 }