widgets/weather: Fix memory allocation issues