+2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * lwlib-Xaw.c (openFont, xaw_destroy_instance): Replace free with
+ xfree to avoid crash when xmalloc overrun checking is enabled.
+ * lwlib-Xm.c (free_destroyed_instance, xm_update_one_value): Ditto.
+ * lwlib-utils.c (XtApplyToWidgets): Ditto.
+ * lwlib.c (safe_free_str, free_widget_value, free_widget_value_tree)
+ (free_widget_info, free_widget_instance, name_to_widget): Ditto.
+ * xlwmenu.c (openXftFont): Ditto.
+
2011-06-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* Makefile.in (ALL_CFLAGS): Add -I../lib for generated header files
}
fn = XftFontOpenName (XtDisplay (widget), screen, fname);
- if (fname != name) free (fname);
+ if (fname != name) xfree (fname);
return fn;
}
if (instance->xft_data[0].xft_font)
XftFontClose (XtDisplay (instance->widget),
instance->xft_data[0].xft_font);
- free (instance->xft_data);
+ xfree (instance->xft_data);
}
#endif
if (XtIsSubclass (instance->widget, dialogWidgetClass))
static void
free_destroyed_instance (destroyed_instance* instance)
{
- free (instance->name);
- free (instance->type);
- free (instance);
+ xfree (instance->name);
+ xfree (instance->type);
+ xfree (instance);
}
\f/* motif utility functions */
}
else if (class == xmTextWidgetClass)
{
- free (val->value);
+ xfree (val->value);
val->value = XmTextGetString (widget);
val->edited = True;
}
else if (class == xmTextFieldWidgetClass)
{
- free (val->value);
+ xfree (val->value);
val->value = XmTextFieldGetString (widget);
val->edited = True;
}
XtVaGetValues (toggle, XmNset, &set, NULL);
if (set)
{
- free (val->value);
+ xfree (val->value);
val->value = safe_strdup (XtName (toggle));
}
}
XtApplyToWidgets (kids [i], proc, arg);
proc (kids [i], arg);
}
- free (kids);
+ xfree (kids);
}
}
static void
safe_free_str (char *s)
{
- free (s);
+ xfree (s);
}
static widget_value *widget_value_free_list = 0;
{
/* When the number of already allocated cells is too big,
We free it. */
- free (wv);
+ xfree (wv);
malloc_cpt--;
}
else
if (!wv)
return;
- free (wv->name);
- free (wv->value);
- free (wv->key);
+ xfree (wv->name);
+ xfree (wv->value);
+ xfree (wv->key);
wv->name = wv->value = wv->key = (char *) 0xDEADBEEF;
safe_free_str (info->name);
free_widget_value_tree (info->val);
memset ((void*)info, 0xDEADBEEF, sizeof (widget_info));
- free (info);
+ xfree (info);
}
static void
free_widget_instance (widget_instance *instance)
{
memset ((void*)instance, 0xDEADBEEF, sizeof (widget_instance));
- free (instance);
+ xfree (instance);
}
static widget_info *
widget = XtNameToWidget (instance->widget, real_name);
- free (real_name);
+ xfree (real_name);
}
return widget;
}
}
}
- if (fname != mw->menu.fontName) free (fname);
+ if (fname != mw->menu.fontName) xfree (fname);
return mw->menu.xft_font != 0;
}
+2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * editfns.c (Fset_time_zone_rule): Replace free with xfree to
+ avoid crash when xmalloc overrun checking is enabled.
+
2011-10-13 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
}
set_time_zone_rule (tzstring);
- free (environbuf);
+ xfree (environbuf);
environbuf = environ;
return Qnil;