fixed a use-after-free bug in dpd_timeout()