Skip to content

Commit

Permalink
Fix leak in write_nrnthread.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc Grosheintz authored and 1uc committed Aug 18, 2023
1 parent efc28fe commit e770f8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nrniv/nrncore_write/io/nrncore_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void write_nrnthread(const char* path, NrnThread& nt, CellGroup& cg) {
writeint(nodeindices, n);
}
writedbl(data, n * sz);
if (nrn_is_artificial_[type]) {
if (data) {
delete[] data;
}
sz = bbcore_dparam_size[type];
Expand Down

0 comments on commit e770f8a

Please sign in to comment.