From 1ec1ac67e40f334bd2115b6fb8f6501c0139d840 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Thu, 18 Jun 2020 15:16:03 -0600 Subject: * Crash if Privacy Policy is not accessible. --- imap/src/c-client/http.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'imap/src/c-client') 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); -- cgit v1.2.3-54-g00ecf