Skip to content

fixed a dangling pointer in test 10. Fixes #422 #423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/tests/jf_test_10.F90
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,10 @@ subroutine test_10(error_cnt)
end if
end if

nullify(p) ! p is just a pointer to f2

write(error_unit,'(A)') 'json_create...'
write(error_unit,'(A)') 'json_create_logical...'; call json%destroy(p); call json%create_logical(p,.true.,'foo')
write(error_unit,'(A)') 'json_create_logical...'; call json%create_logical(p,.true.,'foo')
write(error_unit,'(A)') 'json_create_integer...'; call json%destroy(p); call json%create_integer(p,1000_IK,'foo')
write(error_unit,'(A)') 'json_create_real ...'; call json%destroy(p); call json%create_real (p,9.0_wp,'foo')
write(error_unit,'(A)') 'json_create_string ...'; call json%destroy(p); call json%create_string (p,'foo','bar')
Expand All @@ -330,8 +332,8 @@ subroutine test_10(error_cnt)
!--------------------------------

!cleanup:
!call f%destroy() !WARNING: causing "pointer being freed was not allocated" errors.... need to investigate
!call f2%destroy()
call f%destroy()
call f2%destroy()

end subroutine test_10

Expand Down