diff --git a/src/detection/weather/weather.c b/src/detection/weather/weather.c index 69df64290..5a775fdae 100644 --- a/src/detection/weather/weather.c +++ b/src/detection/weather/weather.c @@ -7,8 +7,8 @@ static const char* status = FF_UNITIALIZED; void ffPrepareWeather(FFWeatherOptions* options) { if (status != FF_UNITIALIZED) { - fputs("Error: Weather module can only be used once due to internal limitations\n", stderr); - exit(1); + status = "Weather module can only be used once due to internal limitations"; + return; } state.timeout = options->timeout; diff --git a/src/modules/weather/weather.c b/src/modules/weather/weather.c index 6c156929d..414a18e7e 100644 --- a/src/modules/weather/weather.c +++ b/src/modules/weather/weather.c @@ -87,6 +87,7 @@ void ffInitWeatherOptions(FFWeatherOptions* options) { void ffDestroyWeatherOptions(FFWeatherOptions* options) { ffOptionDestroyModuleArg(&options->moduleArgs); + ffStrbufDestroy(&options->location); ffStrbufDestroy(&options->outputFormat); }