[Commits] [SCM] claws branch, master, updated. 3.18.0-263-g263eb8133
wwp at claws-mail.org
wwp at claws-mail.org
Thu Oct 7 09:11:03 CEST 2021
The branch, master has been updated
via 263eb81335dd2052f10d7d6fd94f4810e085605a (commit)
from dc1cd36b379c5aea1959f0b31c7f322bc59f432e (commit)
Summary of changes:
src/folder.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit 263eb81335dd2052f10d7d6fd94f4810e085605a
Author: wwp <subscript at free.fr>
Date: Thu Oct 7 09:10:21 2021 +0200
Fix CID 1491229: dereference after null check.
diff --git a/src/folder.c b/src/folder.c
index c763eaf38..97c71390e 100644
--- a/src/folder.c
+++ b/src/folder.c
@@ -414,7 +414,7 @@ void folder_item_remove(FolderItem *item)
{
GNode *node, *start_node;
FolderUpdateData hookdata;
- gchar *tags_file = NULL, *tags_dir = NULL;
+ gchar *tags_file = NULL;
cm_return_if_fail(item != NULL);
cm_return_if_fail(item->folder != NULL);
@@ -441,15 +441,19 @@ void folder_item_remove(FolderItem *item)
msgcache_destroy(item->cache);
item->cache = NULL;
}
+
tags_file = folder_item_get_tags_file(item);
- if (tags_file)
+ if (tags_file) {
+ gchar *tags_dir;
+
claws_unlink(tags_file);
- tags_dir = g_path_get_dirname(tags_file);
- if (tags_dir)
- rmdir(tags_dir);
+ tags_dir = g_path_get_dirname(tags_file);
+ if (tags_dir)
+ rmdir(tags_dir);
+ g_free(tags_dir);
+ }
g_free(tags_file);
- g_free(tags_dir);
hookdata.folder = item->folder;
hookdata.update_flags = FOLDER_TREE_CHANGED | FOLDER_REMOVE_FOLDERITEM;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list