Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
d0bdb060
Commit
d0bdb060
authored
Jan 26, 2003
by
Jan Djärv
Browse files
lwlib-Xm.c: Fixed memory leak for menus.
parent
942da20c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
lwlib/ChangeLog
lwlib/ChangeLog
+5
-0
lwlib/lwlib-Xm.c
lwlib/lwlib-Xm.c
+8
-2
No files found.
lwlib/ChangeLog
View file @
d0bdb060
2003-01-26 Jan D. <jan.h.d@swipnet.se>
* lwlib-Xm.c (update_one_menu_entry): Deallocate widget_list.
(destroy_all_children): Call it self to destroy sub menu children.
2002-12-22 Richard M. Stallman <rms@gnu.org>
* xlwmenu.c (pop_new_stack_if_no_contents): Do nothing if
...
...
lwlib/lwlib-Xm.c
View file @
d0bdb060
...
...
@@ -268,7 +268,10 @@ destroy_all_children (widget, first_child_to_destroy)
XtSetArg
(
al
[
0
],
XmNsubMenuId
,
&
submenu
);
XtGetValues
(
children
[
i
],
al
,
1
);
if
(
submenu
)
XtDestroyWidget
(
submenu
);
{
destroy_all_children
(
submenu
,
0
);
XtDestroyWidget
(
submenu
);
}
XtDestroyWidget
(
children
[
i
]);
}
...
...
@@ -734,6 +737,9 @@ update_one_menu_entry (instance, widget, val, deep_p)
(
XtPointer
)
instance
);
XtManageChild
(
button
);
}
if
(
widget_list
)
XtFree
((
char
*
)
widget_list
);
}
}
else
if
(
!
contents
)
...
...
@@ -813,7 +819,7 @@ xm_update_menu (instance, widget, val, deep_p)
{
destroy_all_children
(
widget
,
num_children_to_keep
);
make_menu_in_widget
(
instance
,
widget
,
val
->
contents
,
num_children_to_keep
);
num_children_to_keep
);
}
XtFree
((
char
*
)
children
);
...
...
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