Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
81d40c92
Commit
81d40c92
authored
Oct 13, 2011
by
Dmitry Antipov
Committed by
Paul Eggert
Oct 13, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use xfree, not free, to avoid crash with --enable-checking=xmallocoverrun.
parent
e7e2364b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
19 deletions
+34
-19
lwlib/ChangeLog
lwlib/ChangeLog
+10
-0
lwlib/lwlib-Xaw.c
lwlib/lwlib-Xaw.c
+2
-2
lwlib/lwlib-Xm.c
lwlib/lwlib-Xm.c
+6
-6
lwlib/lwlib-utils.c
lwlib/lwlib-utils.c
+1
-1
lwlib/lwlib.c
lwlib/lwlib.c
+8
-8
lwlib/xlwmenu.c
lwlib/xlwmenu.c
+1
-1
src/ChangeLog
src/ChangeLog
+5
-0
src/editfns.c
src/editfns.c
+1
-1
No files found.
lwlib/ChangeLog
View file @
81d40c92
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
...
...
lwlib/lwlib-Xaw.c
View file @
81d40c92
...
...
@@ -136,7 +136,7 @@ openFont (Widget widget, char *name)
}
fn
=
XftFontOpenName
(
XtDisplay
(
widget
),
screen
,
fname
);
if
(
fname
!=
name
)
free
(
fname
);
if
(
fname
!=
name
)
x
free
(
fname
);
return
fn
;
}
...
...
@@ -384,7 +384,7 @@ xaw_destroy_instance (widget_instance *instance)
if
(
instance
->
xft_data
[
0
].
xft_font
)
XftFontClose
(
XtDisplay
(
instance
->
widget
),
instance
->
xft_data
[
0
].
xft_font
);
free
(
instance
->
xft_data
);
x
free
(
instance
->
xft_data
);
}
#endif
if
(
XtIsSubclass
(
instance
->
widget
,
dialogWidgetClass
))
...
...
lwlib/lwlib-Xm.c
View file @
81d40c92
...
...
@@ -186,9 +186,9 @@ make_destroyed_instance (char* name,
static
void
free_destroyed_instance
(
destroyed_instance
*
instance
)
{
free
(
instance
->
name
);
free
(
instance
->
type
);
free
(
instance
);
x
free
(
instance
->
name
);
x
free
(
instance
->
type
);
x
free
(
instance
);
}
/* motif utility functions */
...
...
@@ -928,13 +928,13 @@ xm_update_one_value (widget_instance* instance,
}
else
if
(
class
==
xmTextWidgetClass
)
{
free
(
val
->
value
);
x
free
(
val
->
value
);
val
->
value
=
XmTextGetString
(
widget
);
val
->
edited
=
True
;
}
else
if
(
class
==
xmTextFieldWidgetClass
)
{
free
(
val
->
value
);
x
free
(
val
->
value
);
val
->
value
=
XmTextFieldGetString
(
widget
);
val
->
edited
=
True
;
}
...
...
@@ -959,7 +959,7 @@ xm_update_one_value (widget_instance* instance,
XtVaGetValues
(
toggle
,
XmNset
,
&
set
,
NULL
);
if
(
set
)
{
free
(
val
->
value
);
x
free
(
val
->
value
);
val
->
value
=
safe_strdup
(
XtName
(
toggle
));
}
}
...
...
lwlib/lwlib-utils.c
View file @
81d40c92
...
...
@@ -80,7 +80,7 @@ XtApplyToWidgets (Widget w, XtApplyToWidgetsProc proc, XtPointer arg)
XtApplyToWidgets
(
kids
[
i
],
proc
,
arg
);
proc
(
kids
[
i
],
arg
);
}
free
(
kids
);
x
free
(
kids
);
}
}
...
...
lwlib/lwlib.c
View file @
81d40c92
...
...
@@ -138,7 +138,7 @@ my_strcasecmp (const char *s1, const char *s2)
static
void
safe_free_str
(
char
*
s
)
{
free
(
s
);
x
free
(
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
);
x
free
(
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
);
x
free
(
wv
->
name
);
x
free
(
wv
->
value
);
x
free
(
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
);
x
free
(
info
);
}
static
void
...
...
@@ -317,7 +317,7 @@ static void
free_widget_instance
(
widget_instance
*
instance
)
{
memset
((
void
*
)
instance
,
0xDEADBEEF
,
sizeof
(
widget_instance
));
free
(
instance
);
x
free
(
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
);
x
free
(
real_name
);
}
return
widget
;
}
...
...
lwlib/xlwmenu.c
View file @
81d40c92
...
...
@@ -1891,7 +1891,7 @@ openXftFont (XlwMenuWidget mw)
}
}
if
(
fname
!=
mw
->
menu
.
fontName
)
free
(
fname
);
if
(
fname
!=
mw
->
menu
.
fontName
)
x
free
(
fname
);
return
mw
->
menu
.
xft_font
!=
0
;
}
...
...
src/ChangeLog
View file @
81d40c92
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
...
...
src/editfns.c
View file @
81d40c92
...
...
@@ -2079,7 +2079,7 @@ only the former. */)
}
set_time_zone_rule
(
tzstring
);
free
(
environbuf
);
x
free
(
environbuf
);
environbuf
=
environ
;
return
Qnil
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment