[gimp/merge-requests/470: 2/5] gimptagcache: free error to avoid leak
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/merge-requests/470: 2/5] gimptagcache: free error to avoid leak
- Date: Tue, 12 Oct 2021 17:07:34 +0000 (UTC)
commit c4271e2063232f5688ef47cda9ded71bb785896f
Author: Andrzej Hunt <andrzej ahunt org>
Date: Fri Aug 27 17:12:27 2021 +0200
gimptagcache: free error to avoid leak
If gimp_xml_parser_parse_gfile returns FALSE, we know that error might
be set. Therefore we add a g_error_free to avoid leaking the error.
app/core/gimptagcache.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/app/core/gimptagcache.c b/app/core/gimptagcache.c
index e4ef0da287..f7b840e722 100644
--- a/app/core/gimptagcache.c
+++ b/app/core/gimptagcache.c
@@ -511,6 +511,10 @@ gimp_tag_cache_load (GimpTagCache *cache)
{
g_printerr ("Failed to parse tag cache: %s\n",
error ? error->message : "WTF unknown error");
+ if (error)
+ {
+ g_error_free (error);
+ }
}
g_object_unref (file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]