zero out additionally allocated struct Param storage
This commit is contained in:
@ -890,6 +890,11 @@ void PairTersoffTable::read_file(char *file)
|
||||
maxparam += DELTA;
|
||||
params = (Param *) memory->srealloc(params,maxparam*sizeof(Param),
|
||||
"pair:params");
|
||||
|
||||
// make certain all addional allocated storage is initialized
|
||||
// to avoid false positives when checking with valgrind
|
||||
|
||||
memset(params + nparams, 0, DELTA*sizeof(Param));
|
||||
}
|
||||
|
||||
// some parameters are not used since only Tersoff_2 is implemented
|
||||
|
||||
Reference in New Issue
Block a user