Fix two memleaks found by coverity.

This commit is contained in:
Bastien Montagne 2016-08-16 16:15:55 +02:00
parent ae475e3554
commit 64a6a86d57
2 changed files with 4 additions and 0 deletions

View File

@ -585,6 +585,9 @@ static void import_startjob(void *user_data, short *stop, short *do_update, floa
IArchive *archive = open_archive(data->filename);
if (!archive || !archive->valid()) {
if (archive) {
delete archive;
}
data->error_code = ABC_ARCHIVE_FAIL;
return;
}

View File

@ -49,6 +49,7 @@ void TransformWriter::add_node_transform(COLLADASW::Node& node, float mat[4][4],
double dmat[4][4];
UnitConverter *converter = new UnitConverter();
converter->mat4_to_dae_double(dmat, local);
delete converter;
TransformBase::decompose(local, loc, rot, NULL, scale);