Skip to content

Commit 175b78b

Browse files
committed
Fix allocation issue
1 parent 709f159 commit 175b78b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/fortran/lib/mod_distribs_container.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,7 @@ subroutine read_gdfs(this, file)
863863
read(unit, *) buffer1, buffer2, this%radius_distance_tol
864864
read(unit, '(A)') buffer
865865
nspec = icount(buffer(index(buffer,"elements")+8:))
866+
if(allocated(this%element_info)) deallocate(this%element_info)
866867
allocate(this%element_info(nspec))
867868
read(buffer, *) buffer1, buffer2, this%element_info(:)%name
868869
read(unit, *) buffer1, buffer2, this%element_info(:)%energy

0 commit comments

Comments
 (0)