Issue #8832: fix metadata string corrupted on Linux

On Linux the string for GPS coordinates was broken when the
string it was strtok:d from was freed. Move the free until we
have finished using the resulting string.
This commit is contained in:
Anders Jonsson 2024-09-21 15:39:31 +02:00 committed by Alx Sa
parent 0f8b586582
commit c812da7e23

View file

@ -4883,8 +4883,6 @@ set_gps_longitude_latitude (GimpMetadata *metadata,
g_log (ME_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "String split into: %s - %s - %s", str1, str2, str3);
}
g_free (s);
if (str1 && str2 && str3)
{
/* Assuming degrees, minutes, seconds */
@ -4913,6 +4911,8 @@ set_gps_longitude_latitude (GimpMetadata *metadata,
else
remove_val = TRUE;
g_free (s);
if (!remove_val)
{
g_log (ME_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Converted values: %d - %d - %f", degrees, minutes, seconds);