Fix use-after-free in http_stop().