diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2011-10-13 07:55:46 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-10-13 07:55:46 -0700 |
commit | 81d40c920807279ccc0dae0aca46c8291755c66d (patch) | |
tree | 8770bfd02923e8b930aec16401eeb16f3fb6fbe4 /lwlib/lwlib.c | |
parent | e7e2364b7ba0293fb4b6f8ae3e38127e84dafe8b (diff) |
Use xfree, not free, to avoid crash with --enable-checking=xmallocoverrun.
Diffstat (limited to 'lwlib/lwlib.c')
-rw-r--r-- | lwlib/lwlib.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c index 9d8ec3330d..7e3538aec0 100644 --- a/lwlib/lwlib.c +++ b/lwlib/lwlib.c @@ -138,7 +138,7 @@ my_strcasecmp (const char *s1, const char *s2) static void safe_free_str (char *s) { - free (s); + xfree (s); } static widget_value *widget_value_free_list = 0; @@ -176,7 +176,7 @@ free_widget_value (widget_value *wv) { /* When the number of already allocated cells is too big, We free it. */ - free (wv); + xfree (wv); malloc_cpt--; } else @@ -192,9 +192,9 @@ free_widget_value_tree (widget_value *wv) 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; @@ -281,7 +281,7 @@ free_widget_info (widget_info *info) safe_free_str (info->name); free_widget_value_tree (info->val); memset ((void*)info, 0xDEADBEEF, sizeof (widget_info)); - free (info); + xfree (info); } static void @@ -317,7 +317,7 @@ static void free_widget_instance (widget_instance *instance) { memset ((void*)instance, 0xDEADBEEF, sizeof (widget_instance)); - free (instance); + xfree (instance); } static widget_info * @@ -602,7 +602,7 @@ name_to_widget (widget_instance *instance, const char *name) widget = XtNameToWidget (instance->widget, real_name); - free (real_name); + xfree (real_name); } return widget; } |