Ticket #9867: 0003-PackageItem-ParseAttribute-use-delete-for-deleing-at.patch

File 0003-PackageItem-ParseAttribute-use-delete-for-deleing-at.patch, 860 bytes (added by mt, 6 years ago)

Patch

  • src/apps/packageinstaller/PackageItem.cpp

    From 8ec786ef67fafef8b4f3754f0762343458c2b02a Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Sat, 13 Jul 2013 19:11:39 +0900
    Subject: [PATCH] PackageItem::ParseAttribute(), use delete[] for deleing *attrData.
    
    ---
     src/apps/packageinstaller/PackageItem.cpp |    2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/apps/packageinstaller/PackageItem.cpp b/src/apps/packageinstaller/PackageItem.cpp
    index 1fb13a1..2b5d53f 100644
    a b PackageItem::ParseAttribute(uint8 *buffer, BNode *node, char **attrName,  
    336336            *temp = new uint8[*tempSize];
    337337        }
    338338        if (*dataSize < *attrOSize) {
    339             delete *attrData;
     339            delete[] *attrData;
    340340            *dataSize = *attrOSize;
    341341            *attrData = new uint8[*dataSize];
    342342        }