From fe43a662a25ab3903176575f1a7e0f8a04a9adc5 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Fri, 26 Dec 2014 11:53:34 +0000 Subject: vtls: Use CURLcode for Curl_ssl_init_certinfo() return type The return type for this function was 0 on success and 1 on error. This was then examined by the calling functions and, in most cases, used to return CURLE_OUT_OF_MEMORY. Instead use CURLcode for the return type and return the out of memory error directly, propagating it up the call stack. --- lib/vtls/gskit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/vtls/gskit.c') diff --git a/lib/vtls/gskit.c b/lib/vtls/gskit.c index 87086de30..0d133107b 100644 --- a/lib/vtls/gskit.c +++ b/lib/vtls/gskit.c @@ -855,8 +855,10 @@ static CURLcode gskit_connect_step3(struct connectdata *conn, int sockindex) However the server certificate may be available, thus we can return info about it. */ if(data->set.ssl.certinfo) { - if(Curl_ssl_init_certinfo(data, 1)) - return CURLE_OUT_OF_MEMORY; + result = Curl_ssl_init_certinfo(data, 1); + if(result) + return result; + if(cert) { result = Curl_extract_certinfo(conn, 0, cert, certend); if(result) -- cgit v1.2.3