Skip to content

Commit

Permalink
fixed leak in test
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Feb 15, 2024
1 parent ca5d26e commit d6cadd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/g2index.F90
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ end subroutine getg2i2r
endif
call baclose(11, iret1)
call baclose(31, iret1)
deallocate(cbuf)

end subroutine g2_create_index

Expand Down Expand Up @@ -150,7 +151,7 @@ subroutine g2_write_index_headers(lugi, nlen, nnum, cgb)

! fill second 81-byte header
chead(2) = 'IX1FORM:'
write(chead(2)(9:38),'(3i10)') 162,nlen,nnum
write(chead(2)(9:38),'(3i10)') 162, nlen, nnum
chead(2)(41:80) = cgb(ncgb1:ncgb)
chead(2)(81:81) = char(10)

Expand Down
3 changes: 3 additions & 0 deletions tests/test_create_index.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ program test_create_index
! ! Close the index file.
! call baclose(lugi, iret)
! if (iret .ne. 0) stop 100

call gf_finalize(iret)
if (iret .ne. 0) stop 200

print *, 'SUCCESS!...'
end program test_create_index

0 comments on commit d6cadd2

Please sign in to comment.