diff --git a/server/core/config.c b/server/core/config.c index 3b5852e1d..988e263fd 100644 --- a/server/core/config.c +++ b/server/core/config.c @@ -641,7 +641,7 @@ int error_count = 0; } } else if (strcmp(type, "server") != 0 - && strcmp(type, "filter") != 0) + && strcmp(type, "filter") != 0) { LOGIF(LE, (skygw_log_write_flush( LOGFILE_ERROR, @@ -1152,7 +1152,8 @@ SERVER *server; } } else if (strcmp(type, "server") != 0 && - strcmp(type, "monitor") != 0) + strcmp(type, "monitor") != 0 && + strcmp(type, "filter") != 0) { LOGIF(LE, (skygw_log_write_flush( LOGFILE_ERROR, diff --git a/server/core/service.c b/server/core/service.c index c1b54c0af..d963987d5 100644 --- a/server/core/service.c +++ b/server/core/service.c @@ -542,10 +542,13 @@ serviceClearRouterOptions(SERVICE *service) int i; spinlock_acquire(&service->spin); - for (i = 0; service->routerOptions[i]; i++) - free(service->routerOptions[i]); - free(service->routerOptions); - service->routerOptions = NULL; + if (service->routerOptions != NULL) + { + for (i = 0; service->routerOptions[i]; i++) + free(service->routerOptions[i]); + free(service->routerOptions); + service->routerOptions = NULL; + } spinlock_release(&service->spin); } /**