talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit d898db5d4d6a6b247f651bc37dd591afff707871
parent e91e839c83577298842681868080c4d1b142a4aa
Author: Colin Leroy <colin@colino.net>
Date:   Thu, 27 Mar 2008 20:12:38 +0000

2008-03-27 [colin]	3.3.1cvs44

	* src/common/prefs.c
	* src/common/xmlprops.c
		Fix RedHat bug 431735, 'segfault if /home is full'
		(when starting): Fix double fclose() in prefs.c
		and potentially xmlprops.c

Diffstat:
MChangeLog | 8++++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/common/prefs.c | 4----
Msrc/common/xmlprops.c | 3++-
5 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,11 @@ +2008-03-27 [colin] 3.3.1cvs44 + + * src/common/prefs.c + * src/common/xmlprops.c + Fix RedHat bug 431735, 'segfault if /home is full' + (when starting): Fix double fclose() in prefs.c + and potentially xmlprops.c + 2008-03-27 [colin] 3.3.1cvs43 * src/addressbook.c diff --git a/PATCHSETS b/PATCHSETS @@ -3278,3 +3278,4 @@ ( cvs diff -u -r 1.60.2.111 -r 1.60.2.112 src/addressbook.c; ) > 3.3.1cvs41.patchset ( cvs diff -u -r 1.60.2.112 -r 1.60.2.113 src/addressbook.c; ) > 3.3.1cvs42.patchset ( cvs diff -u -r 1.60.2.113 -r 1.60.2.114 src/addressbook.c; ) > 3.3.1cvs43.patchset +( cvs diff -u -r 1.5.2.10 -r 1.5.2.11 src/common/prefs.c; cvs diff -u -r 1.1.4.8 -r 1.1.4.9 src/common/xmlprops.c; ) > 3.3.1cvs44.patchset diff --git a/configure.ac b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=3 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=43 +EXTRA_VERSION=44 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/common/prefs.c b/src/common/prefs.c @@ -143,7 +143,6 @@ gint prefs_file_close(PrefFile *pfile) if (buf[0] == '[') { if (fputs(buf, fp) == EOF) { g_warning("failed to write configuration to file\n"); - fclose(orig_fp); prefs_file_close_revert(pfile); return -1; @@ -155,7 +154,6 @@ gint prefs_file_close(PrefFile *pfile) while (fgets(buf, sizeof(buf), orig_fp) != NULL) if (fputs(buf, fp) == EOF) { g_warning("failed to write configuration to file\n"); - fclose(orig_fp); prefs_file_close_revert(pfile); return -1; @@ -301,7 +299,6 @@ gint prefs_set_block_label(PrefFile *pfile, const gchar *label) } else { if (fputs(buf, pfile->fp) == EOF) { g_warning("failed to write configuration to file\n"); - fclose(pfile->orig_fp); prefs_file_close_revert(pfile); g_free(block_label); @@ -318,7 +315,6 @@ gint prefs_set_block_label(PrefFile *pfile, const gchar *label) if (fputs(block_label, pfile->fp) == EOF || fputc('\n', pfile->fp) == EOF) { g_warning("failed to write configuration to file\n"); - fclose(pfile->orig_fp); prefs_file_close_revert(pfile); g_free(block_label); diff --git a/src/common/xmlprops.c b/src/common/xmlprops.c @@ -215,7 +215,8 @@ static gint xmlprops_write_to( XmlProperty *props, const gchar *fileSpec ) { props->retVal = MGU_SUCCESS; if( prefs_file_close( pfile ) < 0 ) { - goto revert; + props->retVal = MGU_ERROR_WRITE; + goto out; } goto out; revert: