Use delete[] instead of delete
Signed-off-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
15be2c6018
commit
fa49409097
@@ -72,7 +72,7 @@ ICNSLoader::ICNSLoader(BPositionIO *stream)
|
|||||||
&fIconFamily);
|
&fIconFamily);
|
||||||
|
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
delete icnsDataBuffer;
|
delete[] icnsDataBuffer;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ ICNSLoader::ICNSLoader(BPositionIO *stream)
|
|||||||
|
|
||||||
fFormatList.SortItems(compareTypes);
|
fFormatList.SortItems(compareTypes);
|
||||||
|
|
||||||
delete icnsDataBuffer;
|
delete[] icnsDataBuffer;
|
||||||
|
|
||||||
fLoaded = true;
|
fLoaded = true;
|
||||||
}
|
}
|
||||||
@@ -177,7 +177,7 @@ ICNSLoader::GetIcon(BPositionIO *target, int index)
|
|||||||
}
|
}
|
||||||
target->Write(rowBuff, iconImage.imageWidth * sizeof(uint32));
|
target->Write(rowBuff, iconImage.imageWidth * sizeof(uint32));
|
||||||
}
|
}
|
||||||
delete rowBuff;
|
delete[] rowBuff;
|
||||||
icns_free_image(&iconImage);
|
icns_free_image(&iconImage);
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user