From e205c7947424a6148d11b9ec3b3def5d3a0b8004 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 26 Jul 2002 21:38:28 +0000 Subject: Use fs->type in xmlGetProp since we already free'd 'type'. Fixes bug 2002-07-26 Jeffrey Stedfast * filter-int.c (xml_decode): Use fs->type in xmlGetProp since we already free'd 'type'. Fixes bug #28113. svn path=/trunk/; revision=17622 --- filter/filter-int.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'filter/filter-int.c') diff --git a/filter/filter-int.c b/filter/filter-int.c index d7225a9bda..e6b5cb8a55 100644 --- a/filter/filter-int.c +++ b/filter/filter-int.c @@ -38,17 +38,12 @@ static xmlNodePtr xml_encode (FilterElement *fe); static int xml_decode (FilterElement *fe, xmlNodePtr node); static GtkWidget *get_widget (FilterElement *fe); static void build_code (FilterElement *fe, GString *out, struct _FilterPart *ff); -static void format_sexp (FilterElement *, GString *); +static void format_sexp (FilterElement *fe, GString *out); static void filter_int_class_init (FilterIntClass *class); static void filter_int_init (FilterInt *gspaper); static void filter_int_finalise (GtkObject *obj); -#define _PRIVATE(x) (((FilterInt *)(x))->priv) - -struct _FilterIntPrivate { -}; - static FilterElementClass *parent_class; enum { @@ -109,7 +104,6 @@ filter_int_init (FilterInt *o) { o->min = 0; o->max = G_MAXINT; - o->priv = g_malloc0 (sizeof (*o->priv)); } static void @@ -207,8 +201,8 @@ xml_decode (FilterElement *fe, xmlNodePtr node) g_free(fs->type); fs->type = g_strdup(type); xmlFree(type); - - intval = xmlGetProp (node, type?type:"integer"); + + intval = xmlGetProp (node, fs->type ? fs->type : "integer"); if (intval) { d(printf ("Value = %s\n", intval)); fs->val = atoi (intval); -- cgit