diff --git a/tmva/tmva/src/DNN/Architectures/Cuda/Propagation.cu b/tmva/tmva/src/DNN/Architectures/Cuda/Propagation.cu
index 1674476ab6b8cfcd9d0e45cdd416b2de6540d971..9624016683bffb23b0bdd85cd5e952c1a497c72e 100644
--- a/tmva/tmva/src/DNN/Architectures/Cuda/Propagation.cu
+++ b/tmva/tmva/src/DNN/Architectures/Cuda/Propagation.cu
@@ -385,6 +385,9 @@ void TCuda<AFloat>::CalculateConvWeightGradients(TCudaMatrix<AFloat> & weightGra
     // Launch the kernel using our device pointers.
     ::TMVA::DNN::Cuda::UpdateWeights<<<gridDims, blockDims>>>(weightGradients.GetDataPointer(), dB, batchSize,
                                                               depth, nLocalViewPixels);
+
+    delete [] hB;
+    cudaFree(dB); 
 }
 
 //____________________________________________________________________________