Ticket #9901: 0017-Fix-mismatching-allocation-and-deallocation.patch

File 0017-Fix-mismatching-allocation-and-deallocation.patch, 904 bytes (added by mt, 6 years ago)

Patch

  • src/add-ons/screen_savers/glife/GLifeGrid.cpp

    From d2f6e87784d856c531b57de46275c44b1ced3fa5 Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Sat, 27 Jul 2013 20:16:50 +0900
    Subject: [PATCH] Fix mismatching allocation and deallocation
    
    ---
     src/add-ons/screen_savers/glife/GLifeGrid.cpp |    4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/add-ons/screen_savers/glife/GLifeGrid.cpp b/src/add-ons/screen_savers/glife/GLifeGrid.cpp
    index c53ad3b..41a81a8 100644
    a b GLifeGrid::GLifeGrid(int32 iWidth, int32 iHeight)  
    5353//  GLifeGrid Class Destructor Definition
    5454GLifeGrid::~GLifeGrid(void)
    5555{
    56     delete m_pbGrid;
     56    delete[] m_pbGrid;
    5757}
    5858
    5959
    GLifeGrid::Generation(void)  
    7575    }
    7676   
    7777    // Swap grids
    78     delete m_pbGrid;
     78    delete[] m_pbGrid;
    7979    m_pbGrid = pbTemp;
    8080}
    8181