fetch: route every exit of libfetch_open() through one cleanup path While an HTTP mirror entry is in use, libfetch_open() points u->doc at docpath, a char[MAXPATHLEN] on the stack. fetchFreeURL(u) calls free(u->doc), so u->doc must be restored to libfetch's own heap pointer before every call. Today that is done by five separate "u->doc = doc;" lines in front of five separate fetchFreeURL(u) calls, with nothing enforcing the pairing. This exact omission has bitten before: cb54627b8 replaced the original single cleanup label with direct returns and dropped the restore, so from 2.0.0 through 2.8.1 any fetch that went through a mirror entry freed the stack. On FreeBSD that is a SIGSEGV in free() reached from "pkg update" via pkg_repo_fetch_meta -> pkg_repo_fetch_remote_tmp -> pkg_fetch_file_to_fd -> libfetch_open, and it made mirror_type "http" unusable for eight releases before 472c575e1 (#296955) re-added the restores. Because few repositories use HTTP mirror lists, a repeat would again go unnoticed for a long time. Replace each "u->doc = doc; fetchFreeURL(u); return (X);" with "retcode = X; goto out;" and add a single out: block that restores u->doc, frees u and returns retcode, with a comment recording why the restore is required. The two early returns that precede capturing doc are unchanged, as u->doc is still libfetch's pointer there. No functional change. Verified with an ASan/UBSan build: the mirror-list scenario that reproduces the historical crash on a 2.7.4 ASan build ("attempting free on address which was not malloc()-ed", in the stack frame of libfetch_open, variable docpath) runs clean, and the fetch_http unit tests http_mirror_failover, http_mirror_all_dead and http_mirror_zero_retry pass.