From dc621da339cce84e90ab89c20e956b415a7a0238 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Mon, 29 Apr 2019 10:05:46 +0200 Subject: [PATCH] Remove superfluous NULL check The curl slist API properly handle NULLs so we can be less verbose and skip the check before passing to the slist cleanup function. Reviewed-by: Francisco Guerrero --- gpcontrib/pxf/src/libchurl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gpcontrib/pxf/src/libchurl.c b/gpcontrib/pxf/src/libchurl.c index 2d2c7cfb46..deaa73a23d 100644 --- a/gpcontrib/pxf/src/libchurl.c +++ b/gpcontrib/pxf/src/libchurl.c @@ -296,9 +296,7 @@ churl_headers_cleanup(CHURL_HEADERS headers) if (!settings) return; - if (settings->headers) - curl_slist_free_all(settings->headers); - + curl_slist_free_all(settings->headers); pfree(settings); } -- GitLab