From ba8db3cb5915b994c6f40cd1f8baac79b5e052f9 Mon Sep 17 00:00:00 2001 From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:48:16 +0000 Subject: [PATCH] make safer --- DESCRIPTION | 2 +- NEWS.md | 2 +- src/utils.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 89e2009d3..b96eb03ca 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: nanonext Type: Package Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library -Version: 0.10.4.9018 +Version: 0.10.4.9019 Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is a socket library implementing 'Scalability Protocols', a reliable, high-performance standard for common communications patterns including diff --git a/NEWS.md b/NEWS.md index 71a747dc0..4534582fe 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# nanonext 0.10.4.9018 +# nanonext 0.10.4.9019 *This is a major stability release bundling the 'libnng' v1.6.0 source code.* diff --git a/src/utils.c b/src/utils.c index 0432c20a4..ab615c8c8 100644 --- a/src/utils.c +++ b/src/utils.c @@ -262,10 +262,10 @@ SEXP rnng_ncurl(SEXP http, SEXP convert, SEXP follow, SEXP method, SEXP headers, if (relo && LOGICAL(follow)[0]) { const char *location = nng_http_res_get_header(res, "Location"); + if (location == NULL) goto resume; nng_url_free(url); xc = nng_url_parse(&url, location); - if (xc) - goto resume; + if (xc) goto resume; nng_http_res_free(res); nng_http_req_free(req); nng_http_client_free(client);