summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEwald Snel <esnel@users.sourceforge.net>2002-04-11 07:17:43 +0000
committerEwald Snel <esnel@users.sourceforge.net>2002-04-11 07:17:43 +0000
commit0dc3450758983d68e14acfffc0edc1139ae248e9 (patch)
treeafe25d6305a09fe67bfb0dcd9adc49a3f5621a12
parentf9687feb7baf54282b06c27ef088f80586b6eefc (diff)
downloadxine-lib-0dc3450758983d68e14acfffc0edc1139ae248e9.tar.gz
xine-lib-0dc3450758983d68e14acfffc0edc1139ae248e9.tar.bz2
Fix configfile corruption reported by Chris Rankin
CVS patchset: 1708 CVS date: 2002/04/11 07:17:43
-rw-r--r--src/xine-engine/configfile.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
index 1700befe4..e5e754387 100644
--- a/src/xine-engine/configfile.c
+++ b/src/xine-engine/configfile.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: configfile.c,v 1.19 2002/03/16 13:33:47 esnel Exp $
+ * $Id: configfile.c,v 1.20 2002/04/11 07:17:43 esnel Exp $
*
* config file management - implementation
*
@@ -459,9 +459,11 @@ static void config_file_update_string (config_values_t *this,
return;
}
- free (entry->str_default);
+ if (value != entry->str_value) {
+ free (entry->str_value);
- entry->str_value = copy_string (value);
+ entry->str_value = copy_string (value);
+ }
if (entry->callback)
entry->callback (entry->callback_data, entry);
@@ -647,6 +649,9 @@ config_values_t *xine_config_file_init (char *filename) {
/*
* $Log: configfile.c,v $
+ * Revision 1.20 2002/04/11 07:17:43 esnel
+ * Fix configfile corruption reported by Chris Rankin
+ *
* Revision 1.19 2002/03/16 13:33:47 esnel
* fix memory leak, add dispose() function to config_values_s
*