[master] 828d3dd - Fix malloc/delete mismatch (X11 only)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 828d3dd - Fix malloc/delete mismatch (X11 only) "Albrecht Schlosser" 04:47 Sep 12 top right image
 
commit 828d3dd722bd3c3beeca7bd07cb83d6105d6a324
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Sun Sep 12 13:37:53 2021 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Sun Sep 12 13:37:53 2021 +0200

    Fix malloc/delete mismatch (X11 only)

 src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx
index 17fbba7..2bab95a 100644
--- src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx
+++ src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx
@@ -75,5 +75,5 @@ void Fl_Xlib_Graphics_Driver::reset_pen_width(void *data) {
   XGCValues *gc_values = (XGCValues*)data;
   line_width_ = gc_values->line_width;
   XChangeGC(fl_display, gc_, GCLineWidth, gc_values);
-  delete gc_values;
+  free(data);
 }
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.