diff --git a/core/dap_config.c b/core/dap_config.c
index 49663be1414c72fd457545288d354c2ec1324ab9..9154ec6499a39ef1a0b4e32e618329c7bdcd9ae6 100644
--- a/core/dap_config.c
+++ b/core/dap_config.c
@@ -205,7 +205,7 @@ dap_config_t * dap_config_open(const char * a_name)
         }else{
             log_it(L_ERROR,"Can't open config file '%s' (%s)",l_config_path,strerror(errno));
         }
-
+        DAP_DELETE(l_config_path);
     }else{
         log_it(L_ERROR,"Config name is NULL");
     }