|
|
commit c21732705cf6fe4e456a377374f4b7d472231638
Author: fire-eggs <kbroutley@gmail.com>
AuthorDate: Wed Jun 23 11:04:03 2021 -0400
Commit: Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Sat Jun 26 15:46:56 2021 +0200
Fix potential memory leak (#241)
Signed-off-by: Albrecht Schlosser <albrechts.fltk@online.de>
src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
index 6e5d693..e47a901 100644
--- src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
+++ src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
@@ -475,7 +475,10 @@ void Fl_WinAPI_Window_Driver::hide() {
}
}
- if (hide_common()) return;
+ if (hide_common()) {
+ delete[] doit; // note: `count` and `doit` may be NULL (see PR #241)
+ return;
+ }
// make sure any custom icons get freed
// icons(NULL, 0); // free_icons() is called by the Fl_Window destructor
[ Direct Link to Message ] | |
|
| |