Ticket #10370: 0001-Fix-mismatching-allocation-and-deallocation.patch

File 0001-Fix-mismatching-allocation-and-deallocation.patch, 927 bytes (added by mt, 7 years ago)

Patch

  • src/add-ons/translators/psd/PSDLoader.cpp

    From e0332779ecb449c62e24d5d95e8687e5cf552355 Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Fri, 3 Jan 2014 19:28:40 +0900
    Subject: [PATCH] Fix mismatching allocation and deallocation
    
    ---
     src/add-ons/translators/psd/PSDLoader.cpp |    4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/add-ons/translators/psd/PSDLoader.cpp b/src/add-ons/translators/psd/PSDLoader.cpp
    index 2afc4ac..fb413fa 100644
    a b PSDLoader::Decode(BPositionIO *target)  
    250250            break;
    251251        }
    252252        default:
    253             delete fStreamBuffer;
     253            delete[] fStreamBuffer;
    254254            for (int i = 0; i < fChannels; i++)
    255255                delete imageData[i];
    256256            return  B_NO_TRANSLATOR;
    257257    }
    258258
    259     delete fStreamBuffer;
     259    delete[] fStreamBuffer;
    260260
    261261    TranslatorBitmap bitsHeader;
    262262    bitsHeader.magic = B_TRANSLATOR_BITMAP;