Skip to content

Fixes timezone cache free#687

Merged
estebanzimanyi merged 1 commit intoMobilityDB:masterfrom
Diviloper:fix-timezone-cache
Jul 31, 2025
Merged

Fixes timezone cache free#687
estebanzimanyi merged 1 commit intoMobilityDB:masterfrom
Diviloper:fix-timezone-cache

Conversation

@Diviloper
Copy link
Copy Markdown
Member

In meos_initialize_timezone, if a timezone is already loaded (session_timezone is not NULL), it is freed. However, the entry that is freed is also the entry that is stored in the cache, so if the new timezone happens to be the same, the new stored timezone is just freed space, that crashes when calling meos_finalize or if changing the timezone again with meos_initialize_timezone.

This PR makes the pg_tzset function to always return a copy of the cached timezone, so it doesn't matter if the returned copy is freed.

@estebanzimanyi estebanzimanyi merged commit 8199481 into MobilityDB:master Jul 31, 2025
16 checks passed
@Diviloper Diviloper deleted the fix-timezone-cache branch July 31, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants