Commit 4d394594 authored by John Douglas Veitch's avatar John Douglas Veitch
Browse files

Fix potential memory leak when using margtime and tempramental waveforms

parent e6b6ebd0
......@@ -627,6 +627,11 @@ static REAL8 LALInferenceFusedFreqDomainLogLikelihood(LALInferenceVariables *cur
case XLAL_EUSR0: /* Template generation failed in a known way, set -Inf likelihood */
/* Free up allocated vectors */
if(dh_S_tilde) XLALDestroyCOMPLEX16Vector(dh_S_tilde);
if(dh_S) XLALDestroyREAL8Vector(dh_S);
if(dh_S_phase_tilde) XLALDestroyCOMPLEX16Vector(dh_S_phase_tilde);
if(dh_S_phase) XLALDestroyREAL8Vector(dh_S_phase);
if ( model->roq->hptildeLinear ) XLALDestroyCOMPLEX16FrequencySeries(model->roq->hptildeLinear);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment