Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
021236b2
"platforms/reference/vscode:/vscode.git/clone" did not exist on "6b0b0a26e9c41604cda816a7e94fe7cef8ef95a6"
Commit
021236b2
authored
Aug 03, 2009
by
Peter Eastman
Browse files
Fixed some memory errors found by Valgrind
parent
d099819a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
platforms/reference/src/gbsa/CpuGBVI.cpp
platforms/reference/src/gbsa/CpuGBVI.cpp
+5
-2
platforms/reference/src/gbsa/GBVIParameters.cpp
platforms/reference/src/gbsa/GBVIParameters.cpp
+1
-1
No files found.
platforms/reference/src/gbsa/CpuGBVI.cpp
View file @
021236b2
...
...
@@ -566,8 +566,8 @@ int CpuGBVI::computeBornForces( const RealOpenMM* bornRadii, RealOpenMM** atomCo
const
unsigned
int
arraySzInBytes
=
sizeof
(
RealOpenMM
)
*
numberOfAtoms
;
RealOpenMM
**
forces
=
(
RealOpenMM
**
)
malloc
(
sizeof
(
RealOpenMM
*
)
*
numberOfAtoms
)
;
RealOpenMM
*
block
=
(
RealOpenMM
*
)
malloc
(
sizeof
(
RealOpenMM
)
*
numberOfAtoms
*
3
)
;
RealOpenMM
**
forces
=
new
RealOpenMM
*
[
numberOfAtoms
]
;
RealOpenMM
*
block
=
new
RealOpenMM
[
numberOfAtoms
*
3
]
;
memset
(
block
,
0
,
sizeof
(
RealOpenMM
)
*
numberOfAtoms
*
3
);
RealOpenMM
*
blockPtr
=
block
;
for
(
int
ii
=
0
;
ii
<
numberOfAtoms
;
ii
++
){
...
...
@@ -783,6 +783,9 @@ if( 0 ){
inputForces
[
atomI
][
2
]
=
conversion
*
forces
[
atomI
][
2
];
}
delete
[]
forces
;
delete
[]
block
;
return
SimTKOpenMMCommon
::
DefaultReturn
;
}
...
...
platforms/reference/src/gbsa/GBVIParameters.cpp
View file @
021236b2
...
...
@@ -148,7 +148,7 @@ GBVIParameters::~GBVIParameters( ){
if
(
_ownScaledRadii
){
delete
[]
_scaledRadii
;
}
delete
_gammaParameters
;
delete
[]
_gammaParameters
;
/*
if( getFreeArrays() ){
...
...
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