From fe2500aa99137c9ce35907c118745d65a0c0c07e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 17 Sep 2019 12:36:24 +0300 Subject: libcurl updated to 7.66 --- libs/libcurl/src/security.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libs/libcurl/src/security.c') diff --git a/libs/libcurl/src/security.c b/libs/libcurl/src/security.c index 550ea2da8d..c5e4e135df 100644 --- a/libs/libcurl/src/security.c +++ b/libs/libcurl/src/security.c @@ -191,7 +191,6 @@ static CURLcode read_data(struct connectdata *conn, struct krb5buffer *buf) { int len; - void *tmp = NULL; CURLcode result; result = socket_read(fd, &len, sizeof(len)); @@ -201,12 +200,11 @@ static CURLcode read_data(struct connectdata *conn, if(len) { /* only realloc if there was a length */ len = ntohl(len); - tmp = Curl_saferealloc(buf->data, len); + buf->data = Curl_saferealloc(buf->data, len); } - if(tmp == NULL) + if(!len || !buf->data) return CURLE_OUT_OF_MEMORY; - buf->data = tmp; result = socket_read(fd, buf->data, len); if(result) return result; -- cgit v1.2.3