Browse Source

Logger: Clean up the logger when deleting the default config

Julius Pfrommer 6 years ago
parent
commit
4b5dd2f19e
1 changed files with 5 additions and 1 deletions
  1. 5 1
      plugins/ua_config_default.c

+ 5 - 1
plugins/ua_config_default.c

@@ -655,10 +655,14 @@ UA_ServerConfig_delete(UA_ServerConfig *config) {
 
     /* Historical data */
 #ifdef UA_ENABLE_HISTORIZING
-    if (config->historyDatabase.deleteMembers)
+    if(config->historyDatabase.deleteMembers)
         config->historyDatabase.deleteMembers(&config->historyDatabase);
 #endif
 
+    /* Logger */
+    if(config->logger.clear)
+        config->logger.clear(config->logger.context);
+
     UA_free(config);
 }