Fixed leak and clean up formatting.
This commit is contained in:
parent
ef5410aaf0
commit
3870edf376
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user