Weather: fixes memory leak and replace aggressive exit(1) with proper error handling (#2474)

- Add missing ffStrbufDestroy(&options->location) in ffDestroyWeatherOptions
  to prevent memory leak when location is set via config
- Replace exit(1) in ffPrepareWeather with setting status to an error string,
  allowing the error to be properly propagated through the existing error mechanism

Co-authored-by: tru3 <tru3@tru3.com>
This commit is contained in:
h4sht
2026-07-24 02:39:07 +02:00
committed by GitHub
parent 111c1bab75
commit c5a8950ad4
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -87,6 +87,7 @@ void ffInitWeatherOptions(FFWeatherOptions* options) {
void ffDestroyWeatherOptions(FFWeatherOptions* options) {
ffOptionDestroyModuleArg(&options->moduleArgs);
ffStrbufDestroy(&options->location);
ffStrbufDestroy(&options->outputFormat);
}