diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-12-23 19:48:58 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-12-23 20:05:48 +0100 |
| commit | 016c36c917de79383fb2d81c267faa0829147bdf (patch) | |
| tree | 9de931553e58e885d741dfab901c2b5dc7fb2d8e /FL/Fl_Menu_Item.H | |
| parent | f59702e290be9ededeeae9f0e78b422cf359de3f (diff) | |
Fix memory free() mismatch (#875)
This issue was revealed during testing for GitHub Issue #875.
"ERROR: AddressSanitizer: attempting free on address which was not
malloc()-ed", reported by examples/howto-menu-with-images.cxx if
the window object was released at the end of the program, causing
Fl_Menu_::clear() to be called.
The issue was caused by casting all supported label types to
'const char *' which are stored in Fl_Menu_Item::text and then trying
to free() all text strings in Fl_Menu_::clear() under certain
conditions.
Now images and Fl_Multi_Label's are no longer (tried to be) free'd.
Diffstat (limited to 'FL/Fl_Menu_Item.H')
0 files changed, 0 insertions, 0 deletions
