curl/tests/http/clients
Viktor Szakats 08c7c937dc
tidy-up: prefer return over exit(), fix fallouts
To avoid breaking the control flow and align to majority of code
already using `return`.

`exit()` has the side-effect of suppressing leak detection in cases.
Fix fallouts detected after switching to `return`.

- configure:
  - fix `getaddrinfo` run test to call `freeaddrinfo()` to pacify ASAN,
    and call `WSACleanup()` to deinit winsock2.
  - fix `getifaddrs` run test to call `freeifaddrs()` to pacify ASAN.
- tests/server:
  - setup `atexit(win32_cleanup)` via `win32_init()`.
  - return 2 instead of 1 on winsock2 init failures.
  - sws: goto cleanup instead of `exit()` in `http_connect()`.
    Follow-up to 02dfe71937 #7235
- tests/client/http:
  - cleanup memory to pacify ASAN in `h2-upgrade-extreme`,
    `tls-session-reuse`.
- examples:
  - block_ip: fix memory leak reported by CI.
  - http2-upload: avoid handle leaks.

Untouched `exit()` calls, made from callbacks:
- docs/examples: ephiperfifo.c, ghiper.c, hiperfifo.c
- tests/libtest: lib582.c, lib655.c, lib670.c
- tests/server: tftpd.c

Closes #16507
2025-02-28 13:11:41 +01:00
..
.gitignore gitignore: restore explicit lists and fix them 2025-01-28 14:44:35 +01:00
CMakeLists.txt msvc: tidy up _CRT_*_NO_DEPRECATE definitions 2025-01-12 00:34:21 +01:00
h2-pausing.c tidy-up: prefer return over exit(), fix fallouts 2025-02-28 13:11:41 +01:00
h2-serverpush.c lib/src: white space edits to comply better with code style 2024-09-19 14:59:12 +02:00
h2-upgrade-extreme.c tidy-up: prefer return over exit(), fix fallouts 2025-02-28 13:11:41 +01:00
hx-download.c client writer: handle pause before deocding 2025-02-20 15:53:18 +01:00
hx-upload.c TLS: TLSv1.3 earlydata support for curl 2024-10-11 12:28:22 +02:00
Makefile.am tidy-up: delete, comment or scope C macros reported unused 2025-02-14 10:37:14 +01:00
Makefile.inc tidy-up: .gitignore lines mostly 2025-01-27 20:59:46 +01:00
tls-session-reuse.c tidy-up: prefer return over exit(), fix fallouts 2025-02-28 13:11:41 +01:00
upload-pausing.c tidy-up: prefer return over exit(), fix fallouts 2025-02-28 13:11:41 +01:00
ws-data.c tidy-up: delete, comment or scope C macros reported unused 2025-02-14 10:37:14 +01:00
ws-pingpong.c tidy-up: delete, comment or scope C macros reported unused 2025-02-14 10:37:14 +01:00