aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--filter/ChangeLog6
-rw-r--r--filter/filter-xml.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog
index c76176857f..437146336e 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,5 +1,11 @@
2000-06-27 Ettore Perazzoli <ettore@helixcode.com>
+ * filter-xml.c (load_desc): Strdup content before assigning the
+ value. Also, no need to check for NULL when g_strdup()ing as
+ g_strdup() returns NULL for a NULL arg.
+
+2000-06-27 Ettore Perazzoli <ettore@helixcode.com>
+
* Makefile.am (INCLUDES): `-I$(top_builddir)/shell' so that it
works with builddir != srcdir. [We need to #include
"Evolution.h".]
diff --git a/filter/filter-xml.c b/filter/filter-xml.c
index 1979ab76f7..dc8271ae7e 100644
--- a/filter/filter-xml.c
+++ b/filter/filter-xml.c
@@ -125,10 +125,10 @@ load_desc(xmlNodePtr node, int type, int vartype, char *varname)
while (node) {
if (node->content) {
desc = g_malloc0(sizeof(*desc));
- desc->data = node->content;
+ desc->data = g_strdup (node->content);
desc->type = type;
desc->vartype = vartype;
- desc->varname = varname?g_strdup(varname):0;
+ desc->varname = g_strdup(varname);
d(printf(" **** node name = %s var name = %s var type = %s\n", node->name, varname, detokenise(vartype)));
list = g_list_append(list, desc);
d(printf("appending '%s'\n", node->content));