diff --git a/mex/sources/k_order_perturbation/k_ord_dynare.cpp b/mex/sources/k_order_perturbation/k_ord_dynare.cpp
index 10e34651cd2d90c9f5632621539d049aff98decb..e8bdb3c580cd3644403300dab1b003021f2b6d7e 100644
--- a/mex/sources/k_order_perturbation/k_ord_dynare.cpp
+++ b/mex/sources/k_order_perturbation/k_ord_dynare.cpp
@@ -94,7 +94,13 @@ KordpDynare::~KordpDynare()
   if (denl)
     delete denl;
   if (JacobianIndices)
-      delete JacobianIndices;
+    delete JacobianIndices;
+  if (varOrder)
+    delete varOrder;
+  if (ll_Incidence)
+    delete ll_Incidence;
+  if (NNZD)
+      delete NNZD;
 }
 
 /** This clears the container of model derivatives and initializes it