client: fix double free of command on timeout