mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 17:41:41 +01:00
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:
@@ -87,6 +87,7 @@ void ffInitWeatherOptions(FFWeatherOptions* options) {
|
||||
void ffDestroyWeatherOptions(FFWeatherOptions* options) {
|
||||
ffOptionDestroyModuleArg(&options->moduleArgs);
|
||||
|
||||
ffStrbufDestroy(&options->location);
|
||||
ffStrbufDestroy(&options->outputFormat);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user