Fix RNG memory leak on various error conditions
This memory leak shows up in the flaky blendfile_versioning test, and this may help fix it.
This commit is contained in:
parent
4657d541c8
commit
71474da5fd
|
@ -1565,6 +1565,7 @@ static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh)
|
|||
if (tmp_mesh) {
|
||||
BKE_id_free(nullptr, &tmp_mesh->id);
|
||||
}
|
||||
BLI_rng_free(rng);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4353,6 +4353,7 @@ static void particles_fluid_step(ParticleSimulationData *sim,
|
|||
BLI_snprintf(debugStrBuffer,
|
||||
sizeof(debugStrBuffer),
|
||||
"particles_fluid_step::error - unknown particle system type\n");
|
||||
BLI_rng_free(sim->rng);
|
||||
return;
|
||||
}
|
||||
# if 0
|
||||
|
|
|
@ -2086,6 +2086,7 @@ void rand_delaunay_test(int test_kind,
|
|||
}
|
||||
default:
|
||||
std::cout << "unknown delaunay test type\n";
|
||||
BLI_rng_free(rng);
|
||||
return;
|
||||
}
|
||||
if (otype != CDT_FULL) {
|
||||
|
|
Loading…
Reference in New Issue