Skip to content

Commit

Permalink
Auxiliary vector pT in Frp_mat (calculation of optical forces) was fr…
Browse files Browse the repository at this point in the history
…eed by Free_general instead of the specialized Free_cVector. This caused random (unpredictable) crashes, described in comment 1 to issue 14. Fixed.
  • Loading branch information
myurkin committed Sep 10, 2010
1 parent ecd8c51 commit 17de61a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/crosssec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,5 +1113,5 @@ void Frp_mat(double Fsca_tot[3],double * restrict Fsca,double Finc_tot[3],double

Free_general(materialT);
Free_general(rdipT);
Free_general(pT);
Free_cVector(pT);
}
1 change: 1 addition & 0 deletions src/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ void Free_iMatrix(int ** restrict m,const size_t nrl,const size_t nrh,const size

void Free_general(void * restrict v)
// frees general vector; kept in a special function for future development
// !!! Must not be used for complex vectors - use Free_cVector instead !!!
{
IF_FREE(v);
}

0 comments on commit 17de61a

Please sign in to comment.