[wx-dev] #9562: patch to fix a double free in print preview

wxTrac noreply at wxsite.net
Wed Jun 11 01:04:46 PDT 2008


Ticket URL: <http://trac.wxwidgets.org/ticket/9562>

#9562: patch to fix a double free in print preview
----------------------------------------------------+-----------------------
 Reporter:  Ago                                     |       Owner:         
     Type:  defect                                  |      Status:  new    
 Priority:  normal                                  |   Milestone:         
Component:  GUI-all                                 |     Version:  2.8-svn
 Keywords:  wxPrintPreviewBase printing doublefree  |   Blockedby:         
    Patch:  1                                       |    Blocking:         
----------------------------------------------------+-----------------------
 The printout gets freed in the wxPrintPreviewBase destructor as well as in
 wxPreviewFrame::OnCloseWindow. The problem is that almost none of the code
 in prntbase.cpp uses wxDELETE, which manifests itself in this problem,
 because while OnCloseWindow does free the printout, it does not set the
 pointer to NULL, which causes the destructor to double-free the pointer. I
 really think everything should be converted to use wxDELETE in the long
 run.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/9562>


More information about the wx-dev mailing list