diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:56:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:56:01 +0000 |
commit | 502c540485a1626fce474639d572904a4e3c55fe (patch) | |
tree | c8bb1ed8bda9ce49697a30eaab650191e9462e2a /src/http.c | |
parent | Adding debian version 1.21.4-1. (diff) | |
download | wget-502c540485a1626fce474639d572904a4e3c55fe.tar.xz wget-502c540485a1626fce474639d572904a4e3c55fe.zip |
Merging upstream version 1.24.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/http.c')
-rw-r--r-- | src/http.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,5 @@ /* HTTP support. - Copyright (C) 1996-2012, 2014-2015, 2018-2023 Free Software + Copyright (C) 1996-2012, 2014-2015, 2018-2024 Free Software Foundation, Inc. This file is part of GNU Wget. @@ -4164,7 +4164,11 @@ gethttp (const struct url *u, struct url *original_url, struct http_stat *hs, err = open_output_stream (hs, count, &fp); if (err != RETROK) { + /* Make sure that errno doesn't get clobbered. + * This is the case for OpenSSL's SSL_shutdown(). */ + int tmp_errno = errno; CLOSE_INVALIDATE (sock); + errno = tmp_errno; retval = err; goto cleanup; } |