[Commits] [SCM] claws branch, master, updated. 3.18.0-203-gb29415ca6

wwp at claws-mail.org wwp at claws-mail.org
Wed Sep 29 13:00:52 CEST 2021


The branch, master has been updated
       via  b29415ca69ac2e3036bb0b20c0155309107d9b1e (commit)
      from  286e63ec8361b7f195925ab1854c2227416d3a56 (commit)

Summary of changes:
 src/plugins/notification/notification_popup.c    | 12 ++++++------
 src/plugins/notification/notification_trayicon.c |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)


- Log -----------------------------------------------------------------
commit b29415ca69ac2e3036bb0b20c0155309107d9b1e
Author: wwp <subscript at free.fr>
Date:   Wed Sep 29 12:59:53 2021 +0200

    Fix CID 1491296, 1491368, 1491288 and 1491322: dereference before null check.

diff --git a/src/plugins/notification/notification_popup.c b/src/plugins/notification/notification_popup.c
index baa082642..d8abfbd8f 100644
--- a/src/plugins/notification/notification_popup.c
+++ b/src/plugins/notification/notification_popup.c
@@ -286,9 +286,9 @@ static gboolean notification_libnotify_create(MsgInfo *msginfo,
   NotificationPopup *ppopup;
   gchar *summary = NULL;
   gchar *text = NULL;
-  gchar *utf8_str = NULL;
-  gchar *subj = NULL;
-  gchar *from = NULL;
+  gchar *utf8_str;
+  gchar *subj;
+  gchar *from;
   gchar *foldname = NULL;
   GList *caps = NULL;
   gboolean support_actions = FALSE;
@@ -322,10 +322,10 @@ static gboolean notification_libnotify_create(MsgInfo *msginfo,
 
     /* Make sure text is valid UTF8 */
     utf8_str = notification_validate_utf8_str(text);
-    g_free(text);
 
-    if(from) g_free(from);
-    if(subj) g_free(subj);
+    g_free(text);
+    g_free(from);
+    g_free(subj);
     if(foldname) g_free(foldname);
     break;
   case F_TYPE_NEWS:
diff --git a/src/plugins/notification/notification_trayicon.c b/src/plugins/notification/notification_trayicon.c
index f67d81d47..c35781f77 100644
--- a/src/plugins/notification/notification_trayicon.c
+++ b/src/plugins/notification/notification_trayicon.c
@@ -897,10 +897,10 @@ static gchar* notification_trayicon_popup_assemble_body(MsgInfo *msginfo)
 
       /* Make sure text is valid UTF8 */
       utf8_str = notification_validate_utf8_str(text);
-      g_free(text);
 
-      if(from) g_free(from);
-      if(subj) g_free(subj);
+      g_free(text);
+      g_free(from);
+      g_free(subj);
 	  if(foldname) g_free(foldname);
     }
     else if(popup.num_calendar) {

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list