Bugfix in the time-out function: free()d the wrong structure before