[gimp] libgimpbase: fix crash caused by the previous commit
- From: Jacob Boerema <jboerema src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpbase: fix crash caused by the previous commit
- Date: Thu, 2 Jun 2022 21:45:32 +0000 (UTC)
commit 5cf1ec62b47189607bae03a989dafbaea96cb4f7
Author: Jacob Boerema <jgboerema gmail com>
Date: Thu Jun 2 17:45:13 2022 -0400
libgimpbase: fix crash caused by the previous commit
In other cases we need to free value, but in this case it was used and
trying to free it caused a GIMP to crash.
Let's duplicate value, so we don't need to special case our g_free.
libgimpbase/gimpmetadata.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libgimpbase/gimpmetadata.c b/libgimpbase/gimpmetadata.c
index 7f63d0223d..6771a435f9 100644
--- a/libgimpbase/gimpmetadata.c
+++ b/libgimpbase/gimpmetadata.c
@@ -730,7 +730,7 @@ gimp_metadata_deserialize_text (GMarkupParseContext *context,
else
{
values = g_renew (gchar *, values, length + 2);
- values[length] = value;
+ values[length] = g_strdup (value);
values[length + 1] = NULL;
gexiv2_metadata_try_set_tag_multiple (g2_metadata,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]