Fixed leak and clean up formatting.

This commit is contained in:
Robert Osfield 2017-12-03 09:38:32 +00:00
parent ef5410aaf0
commit 3870edf376

View File

@ -405,6 +405,7 @@ int *numComponents_ret)
break;
default:
tgaerror = ERR_UNSUPPORTED;
delete [] formattedMap;
return NULL; /* unreachable code - (depth < 1 || depth > 4) rejected by "check for reasonable values in case this is not a tga file" near the start of this function*/
}
@ -415,8 +416,7 @@ int *numComponents_ret)
dest += lineoffset;
}
if (formattedMap)
delete[] formattedMap;
delete [] formattedMap;
}
break;
case 2: /* RGB, uncompressed */