[Commits] [SCM] claws branch, master, updated. 3.15.0-119-gfb5fce4
mones at claws-mail.org
mones at claws-mail.org
Sun Jul 23 12:43:03 CEST 2017
The branch, master has been updated
via fb5fce43ffcf73d9bd08734b7a84acf0ea8f12a9 (commit)
from a93dbd4a83b53c01b8485d10634f40cc1642a9c1 (commit)
Summary of changes:
src/prefs_themes.c | 9 +++++----
src/stock_pixmap.c | 2 ++
2 files changed, 7 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit fb5fce43ffcf73d9bd08734b7a84acf0ea8f12a9
Author: Ricardo Mones <ricardo at mones.org>
Date: Sun Jul 23 12:38:06 2017 +0200
Check for NULLs params within the functions
As assumed in the prefs_themes_done() calls. May fix some strange crash
when exiting Claws Mail in Debian's version 3.14.1-3+b1:
*** Error in `/usr/bin/claws-mail': munmap_chunk(): invalid pointer:
0x00000000026a6f80 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x70bcb)[0x7fa85407cbcb]
/lib/x86_64-linux-gnu/libc.so.6(+0x76f96)[0x7fa854082f96]
/usr/bin/claws-mail(stock_pixmap_themes_list_free+0x28)[0x55a7a8]
/usr/bin/claws-mail(prefs_themes_done+0x3a)[0x5389ba]
/usr/bin/claws-mail[0x449329]
/usr/bin/claws-mail(main+0x2326)[0x44b986]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7fa85402c2b1]
/usr/bin/claws-mail(_start+0x2a)[0x44bfda]
diff --git a/src/prefs_themes.c b/src/prefs_themes.c
index 10f6baf..7472c53 100644
--- a/src/prefs_themes.c
+++ b/src/prefs_themes.c
@@ -352,10 +352,8 @@ static void prefs_themes_get_themes_and_names(ThemesData *tdata)
cm_return_if_fail(tdata != NULL);
- if (tdata->themes != NULL)
- stock_pixmap_themes_list_free(tdata->themes);
- if (tdata->names != NULL)
- prefs_themes_free_names(tdata);
+ stock_pixmap_themes_list_free(tdata->themes);
+ prefs_themes_free_names(tdata);
tdata->themes = stock_pixmap_themes_list_new();
@@ -421,6 +419,9 @@ static void prefs_themes_free_names(ThemesData *tdata)
{
GList *names;
+ cm_return_if_fail(tdata != NULL);
+ cm_return_if_fail(tdata->names != NULL);
+
names = tdata->names;
while (names != NULL) {
ThemeName *tn = (ThemeName *)(names->data);
diff --git a/src/stock_pixmap.c b/src/stock_pixmap.c
index 5a95706..807d862 100644
--- a/src/stock_pixmap.c
+++ b/src/stock_pixmap.c
@@ -840,6 +840,8 @@ void stock_pixmap_themes_list_free(GList *list)
{
GList *ptr;
+ cm_return_if_fail(list != NULL);
+
for (ptr = g_list_first(list); ptr != NULL; ptr = g_list_next(ptr))
g_free(ptr->data);
g_list_free(list);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list