[Commits] [SCM] claws branch, master, updated. 4.3.1-41-g775969a22

wwp at claws-mail.org wwp at claws-mail.org
Sun Mar 9 23:34:05 UTC 2025


The branch, master has been updated
       via  775969a2280ad57011b67d69fea4ce9c4204871a (commit)
      from  fd46516b6b76cea257b986a0d91360786e55ce08 (commit)

Summary of changes:
 src/msgcache.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit 775969a2280ad57011b67d69fea4ce9c4204871a
Author: wwp <subscript at free.fr>
Date:   Mon Mar 10 00:30:49 2025 +0100

    Attempt to fix CID 1491271 Resource leak.

diff --git a/src/msgcache.c b/src/msgcache.c
index f331e67d0..c3cb5fac4 100644
--- a/src/msgcache.c
+++ b/src/msgcache.c
@@ -697,9 +697,15 @@ MsgCache *msgcache_read_cache(FolderItem *item, const gchar *cache_file)
 
 				GET_CACHE_DATA(ref, memusage);
 
-				if (ref && *ref)
-					msginfo->references =
-						g_slist_prepend(msginfo->references, ref);
+				if (ref) {
+					if (*ref) {
+						msginfo->references =
+							g_slist_prepend(msginfo->references, ref);
+                    } else {
+						g_free(ref);
+						ref = NULL;
+					}
+                }
 			}
 			if (msginfo->references)
 				msginfo->references =
@@ -747,9 +753,15 @@ MsgCache *msgcache_read_cache(FolderItem *item, const gchar *cache_file)
 
 				READ_CACHE_DATA(ref, fp, memusage);
 
-				if (ref && *ref)
-					msginfo->references =
-						g_slist_prepend(msginfo->references, ref);
+				if (ref) {
+					if (*ref) {
+						msginfo->references =
+							g_slist_prepend(msginfo->references, ref);
+                    } else {
+						g_free(ref);
+						ref = NULL;
+					}
+                }
 			}
 			if (msginfo->references)
 				msginfo->references =

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list