Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
L
lalsuite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
109
Issues
109
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
29
Merge Requests
29
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lscsoft
lalsuite
Commits
13aef0d5
Commit
13aef0d5
authored
May 07, 2018
by
Leslie Wade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up memory leaks
parent
b50b1c51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
lalinference/src/LALInference.c
lalinference/src/LALInference.c
+20
-5
No files found.
lalinference/src/LALInference.c
View file @
13aef0d5
...
...
@@ -2392,7 +2392,6 @@ if(LALInferenceCheckVariable(params, "logp1") && LALInferenceCheckVariable(param
// Make 4-piece polytrope eos
eos
=
XLALSimNeutronStarEOS4ParameterPiecewisePolytrope
(
logp1_si
,
gamma1
,
gamma2
,
gamma3
);
fam
=
XLALCreateSimNeutronStarFamily
(
eos
);
}
// Else if using 4-coeff spectral eos params...
else
if
(
LALInferenceCheckVariable
(
params
,
"SDgamma0"
)
&&
LALInferenceCheckVariable
(
params
,
"SDgamma1"
)
&&
LALInferenceCheckVariable
(
params
,
"SDgamma2"
)
&&
LALInferenceCheckVariable
(
params
,
"SDgamma3"
))
...
...
@@ -2441,8 +2440,21 @@ for (int i = 0; i < 4; ++i) {
/* determine if maximum mass has been found */
if
(
mdat
[
i
]
<=
mdat
[
i
-
1
])
fprintf
(
stdout
,
"EOS has too few points. Sample rejected.
\n
"
);
// Clean up
LALFree
(
pdat
);
LALFree
(
mdat
);
LALFree
(
rdat
);
LALFree
(
kdat
);
XLALDestroySimNeutronStarFamily
(
fam
);
XLALDestroySimNeutronStarEOS
(
eos
);
return
XLAL_FAILURE
;
}
// Clean up
LALFree
(
pdat
);
LALFree
(
mdat
);
LALFree
(
rdat
);
LALFree
(
kdat
);
fam
=
XLALCreateSimNeutronStarFamily
(
eos
);
// Determine which mass parameterization is used
...
...
@@ -2470,6 +2482,9 @@ else if(LALInferenceCheckVariable(params, "chirpmass") && LALInferenceCheckVaria
else
{
// Else fail
fprintf
(
stdout
,
"ERROR: NO MASS PARAMETERS FOUND
\n
"
);
// Clean up
XLALDestroySimNeutronStarFamily
(
fam
);
XLALDestroySimNeutronStarEOS
(
eos
);
return
XLAL_FAILURE
;
}
...
...
@@ -2501,16 +2516,16 @@ if(mass1_kg <= max_mass_kg && mass2_kg <= max_mass_kg && mass1_kg >= min_mass_kg
ret
=
XLAL_SUCCESS
;
// Else fail
}
else
{
// Clean up
XLALDestroySimNeutronStarFamily
(
fam
);
XLALDestroySimNeutronStarEOS
(
eos
);
ret
=
XLAL_FAILURE
;
}
// Clean up
LALFree
(
pdat
);
LALFree
(
mdat
);
LALFree
(
rdat
);
LALFree
(
kdat
);
XLALDestroySimNeutronStarFamily
(
fam
);
XLALDestroySimNeutronStarEOS
(
eos
);
LALCheckMemoryLeaks
();
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment