summaryrefslogtreecommitdiff
path: root/imap/src
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-06-18 15:16:03 -0600
committerEduardo Chappa <chappa@washington.edu>2020-06-18 15:16:03 -0600
commit1ec1ac67e40f334bd2115b6fb8f6501c0139d840 (patch)
tree0dfa9a4d9faef73cdc12860c62eb6c1ff72ad285 /imap/src
parent7c360d963d9cb727a47741624e31f0afac2f4852 (diff)
downloadalpine-1ec1ac67e40f334bd2115b6fb8f6501c0139d840.tar.xz
* Crash if Privacy Policy is not accessible.
Diffstat (limited to 'imap/src')
-rw-r--r--imap/src/c-client/http.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/imap/src/c-client/http.c b/imap/src/c-client/http.c
index 23d9f4b0..fef3c7fc 100644
--- a/imap/src/c-client/http.c
+++ b/imap/src/c-client/http.c
@@ -937,7 +937,10 @@ http_open (unsigned char *url)
stream->netstream = net_open (&mb, NIL, mb.port ? mb.port : HTTPTCPPORT,
(NETDRIVER *) mail_parameters (NIL,GET_SSLDRIVER,NIL),
"*https", mb.port ? mb.port : HTTPSSLPORT);
- if(!stream->netstream) http_close(stream);
+ if(!stream->netstream){
+ http_close(stream);
+ stream = NIL;
+ }
return stream;
}
@@ -1048,12 +1051,8 @@ http_get(unsigned char *url, int *code)
HTTPSTREAM *stream;
*code = -1;
- if(!url) return response;
- stream = http_open(url);
- if(!stream){
- fs_give((void **) &url);
+ if(!url || !(stream = http_open(url)))
return response;
- }
http_request = http_request_get();
http_request->request = http_request_line("GET", stream->urltail, HTTP_1_1_VERSION);