[gegl] gegl:load: Fix possible double free.
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl:load: Fix possible double free.
- Date: Fri, 1 Apr 2022 14:20:05 +0000 (UTC)
commit 498434156e593da0b6601e71b1111c9623af3d30
Author: Axel Viala <axel viala darnuria eu>
Date: Thu Mar 31 16:49:52 2022 +0200
gegl:load: Fix possible double free.
operations/core/load.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/operations/core/load.c b/operations/core/load.c
index 89e3f6eed..564857bd4 100644
--- a/operations/core/load.c
+++ b/operations/core/load.c
@@ -213,15 +213,13 @@ do_setup (GeglOperation *operation, const gchar *path, const gchar *uri)
if ((!g_str_has_prefix (content_type, "image/") &&
!g_str_has_prefix (content_type, ".")) || uncertain)
{
- g_free (content_type);
-
if (!read_from_stream (stream, &buffer, &size, &error))
{
g_warning ("%s", error->message);
g_clear_error (&error);
goto cleanup;
}
-
+ g_free (content_type);
content_type = g_content_type_guess (filename, buffer, size, NULL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]