Skip to content

Commit

Permalink
fix(server): clear logger after usage
Browse files Browse the repository at this point in the history
  • Loading branch information
keba-estr authored and jpfr committed Mar 3, 2024
1 parent 5227515 commit 0c2ddca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/server/ua_server_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ UA_ServerConfig_clean(UA_ServerConfig *config) {
config->historyDatabase.clear(&config->historyDatabase);
#endif

/* Logger */
if(config->logging != NULL && config->logging->clear != NULL)
config->logging->clear(config->logging);
config->logging = NULL;

#ifdef UA_ENABLE_PUBSUB
#ifdef UA_ENABLE_PUBSUB_ENCRYPTION
if(config->pubSubConfig.securityPolicies != NULL) {
Expand All @@ -104,6 +99,11 @@ UA_ServerConfig_clean(UA_ServerConfig *config) {
#endif
#endif /* UA_ENABLE_PUBSUB */

/* Logger */
if(config->logging != NULL && config->logging->clear != NULL)
config->logging->clear(config->logging);
config->logging = NULL;

/* Custom Data Types */
UA_cleanupDataTypeWithCustom(config->customDataTypes);
config->customDataTypes = NULL;
Expand Down

0 comments on commit 0c2ddca

Please sign in to comment.