CID 903 : Memory leak on error.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38048 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues
2010-08-12 12:39:39 +00:00
parent 138bd45280
commit e0bc2fcce4
@@ -875,8 +875,11 @@ translate_from_bits_to_tgatc(BPositionIO *inSource,
const color_map *pmap = NULL;
if (fromspace == B_CMAP8) {
pmap = system_colors();
if (!pmap)
if (!pmap) {
delete[] tgaRowData;
delete[] bitsRowData;
return B_ERROR;
}
}
while (rd == bitsRowBytes) {
status_t bytescopied;