Skip to content

Commit

Permalink
Update MixedBeamColumnAsym3d.cpp
Browse files Browse the repository at this point in the history
Memory leak in `revertToStart`
  • Loading branch information
mhscott authored Apr 11, 2024
1 parent cbd079c commit 21aa688
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SRC/element/mixedBeamColumn/MixedBeamColumnAsym3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -959,8 +959,10 @@ int MixedBeamColumnAsym3d::revertToStart()
//perform transformation - transform axial force form centroid to shear center
kr.addMatrixTripleProduct(0.0, Tr, kv, 1.0);

Ki = new Matrix(crdTransf->getInitialGlobalStiffMatrix(kr));

if (Ki == 0)
Ki = new Matrix(NEGD,NEGD);
*Ki = crdTransf->getInitialGlobalStiffMatrix(kr);

// Vector V is zero at initial state
V.Zero();
committedV.Zero();
Expand Down

0 comments on commit 21aa688

Please sign in to comment.