curl-8.18.0-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
curl-8.18.0/lib/altsvc.c:213:5: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(file, "r")'
curl-8.18.0/lib/altsvc.c:206:5: branch_false: following 'false' branch...
curl-8.18.0/lib/altsvc.c:209:8: branch_false: ...to here
curl-8.18.0/lib/altsvc.c:209:8: acquire_resource: opened here
curl-8.18.0/lib/altsvc.c:210:5: branch_true: following 'true' branch...
curl-8.18.0/lib/altsvc.c:211:10: branch_true: ...to here
curl-8.18.0/lib/altsvc.c:213:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/lib/altsvc.c:213:5: danger: 'fopen(file, "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  211|       bool eof = FALSE;
#  212|       struct dynbuf buf;
#  213|->     curlx_dyn_init(&buf, MAX_ALTSVC_LINE);
#  214|       do {
#  215|         result = Curl_get_line(&buf, fp, &eof);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
curl-8.18.0/lib/altsvc.c:213:5: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(file, "r")'
curl-8.18.0/lib/altsvc.c:206:5: branch_false: following 'false' branch...
curl-8.18.0/lib/altsvc.c:209:8: branch_false: ...to here
curl-8.18.0/lib/altsvc.c:209:8: acquire_memory: allocated here
curl-8.18.0/lib/altsvc.c:210:5: branch_true: following 'true' branch...
curl-8.18.0/lib/altsvc.c:211:10: branch_true: ...to here
curl-8.18.0/lib/altsvc.c:213:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/lib/altsvc.c:213:5: danger: 'fopen(file, "r")' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  211|       bool eof = FALSE;
#  212|       struct dynbuf buf;
#  213|->     curlx_dyn_init(&buf, MAX_ALTSVC_LINE);
#  214|       do {
#  215|         result = Curl_get_line(&buf, fp, &eof);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
curl-8.18.0/lib/altsvc.c:215:16: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(file, "r")'
curl-8.18.0/lib/altsvc.c:206:5: branch_false: following 'false' branch...
curl-8.18.0/lib/altsvc.c:209:8: branch_false: ...to here
curl-8.18.0/lib/altsvc.c:209:8: acquire_resource: opened here
curl-8.18.0/lib/altsvc.c:210:5: branch_true: following 'true' branch...
curl-8.18.0/lib/altsvc.c:211:10: branch_true: ...to here
curl-8.18.0/lib/altsvc.c:215:16: throw: if 'Curl_get_line' throws an exception...
curl-8.18.0/lib/altsvc.c:215:16: danger: 'fopen(file, "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  213|       curlx_dyn_init(&buf, MAX_ALTSVC_LINE);
#  214|       do {
#  215|->       result = Curl_get_line(&buf, fp, &eof);
#  216|         if(!result) {
#  217|           const char *lineptr = curlx_dyn_ptr(&buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
curl-8.18.0/lib/altsvc.c:215:16: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(file, "r")'
curl-8.18.0/lib/altsvc.c:206:5: branch_false: following 'false' branch...
curl-8.18.0/lib/altsvc.c:209:8: branch_false: ...to here
curl-8.18.0/lib/altsvc.c:209:8: acquire_memory: allocated here
curl-8.18.0/lib/altsvc.c:210:5: branch_true: following 'true' branch...
curl-8.18.0/lib/altsvc.c:211:10: branch_true: ...to here
curl-8.18.0/lib/altsvc.c:215:16: throw: if 'Curl_get_line' throws an exception...
curl-8.18.0/lib/altsvc.c:215:16: danger: 'fopen(file, "r")' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  213|       curlx_dyn_init(&buf, MAX_ALTSVC_LINE);
#  214|       do {
#  215|->       result = Curl_get_line(&buf, fp, &eof);
#  216|         if(!result) {
#  217|           const char *lineptr = curlx_dyn_ptr(&buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
curl-8.18.0/lib/cf-socket.c:361:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor
curl-8.18.0/lib/cf-socket.c:1071:17: enter_function: entry to 'cf_socket_open'
curl-8.18.0/lib/cf-socket.c:1091:12: call_function: calling 'socket_open' from 'cf_socket_open'
#  359|   
#  360|   #ifdef HAVE_FCNTL
#  361|->   if(fcntl(*sockfd, F_SETFD, FD_CLOEXEC) < 0) {
#  362|       failf(data, "fcntl set CLOEXEC: %s",
#  363|             curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));

Error: COMPILER_WARNING (CWE-704): [#def6]
curl-8.18.0/lib/cookie.c: scope_hint: In function 'bad_domain'
curl-8.18.0/lib/cookie.c:334:17: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
#  334 |     char *dot = memchr(domain, '.', len);
#      |                 ^~~~~~
#  332|     else {
#  333|       /* there must be a dot present, but that dot must not be a trailing dot */
#  334|->     char *dot = memchr(domain, '.', len);
#  335|       if(dot) {
#  336|         size_t i = dot - domain;

Error: COMPILER_WARNING (CWE-704): [#def7]
curl-8.18.0/lib/cookie.c:334:17: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
#  332|     else {
#  333|       /* there must be a dot present, but that dot must not be a trailing dot */
#  334|->     char *dot = memchr(domain, '.', len);
#  335|       if(dot) {
#  336|         size_t i = dot - domain;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
curl-8.18.0/lib/cookie.c:1119:5: warning[-Wanalyzer-file-leak]: leak of FILE 'handle'
curl-8.18.0/lib/cookie.c:1104:5: branch_true: following 'true' branch...
curl-8.18.0/lib/cookie.c:1105:7: branch_false: following 'false' branch (when the strings are non-equal)...
curl-8.18.0/lib/cookie.c:1108:12: branch_false: ...to here
curl-8.18.0/lib/cookie.c:1108:12: acquire_resource: opened here
curl-8.18.0/lib/cookie.c:1109:9: branch_false: following 'false' branch...
curl-8.18.0/lib/cookie.c:1118:10: branch_false: ...to here
curl-8.18.0/lib/cookie.c:1119:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/lib/cookie.c:1119:5: danger: 'handle' leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 1117|       struct dynbuf buf;
# 1118|       bool eof = FALSE;
# 1119|->     curlx_dyn_init(&buf, MAX_COOKIE_LINE);
# 1120|       do {
# 1121|         result = Curl_get_line(&buf, fp, &eof);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
curl-8.18.0/lib/cookie.c:1119:5: warning[-Wanalyzer-malloc-leak]: leak of 'handle'
curl-8.18.0/lib/cookie.c:1104:5: branch_true: following 'true' branch...
curl-8.18.0/lib/cookie.c:1105:7: branch_false: following 'false' branch (when the strings are non-equal)...
curl-8.18.0/lib/cookie.c:1108:12: branch_false: ...to here
curl-8.18.0/lib/cookie.c:1108:12: acquire_memory: allocated here
curl-8.18.0/lib/cookie.c:1109:9: branch_false: following 'false' branch...
curl-8.18.0/lib/cookie.c:1118:10: branch_false: ...to here
curl-8.18.0/lib/cookie.c:1119:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/lib/cookie.c:1119:5: danger: 'handle' leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 1117|       struct dynbuf buf;
# 1118|       bool eof = FALSE;
# 1119|->     curlx_dyn_init(&buf, MAX_COOKIE_LINE);
# 1120|       do {
# 1121|         result = Curl_get_line(&buf, fp, &eof);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def10]
curl-8.18.0/lib/cookie.c:1121:16: warning[-Wanalyzer-file-leak]: leak of FILE 'handle'
curl-8.18.0/lib/cookie.c:1104:5: branch_true: following 'true' branch...
curl-8.18.0/lib/cookie.c:1105:7: branch_false: following 'false' branch (when the strings are non-equal)...
curl-8.18.0/lib/cookie.c:1108:12: branch_false: ...to here
curl-8.18.0/lib/cookie.c:1108:12: acquire_resource: opened here
curl-8.18.0/lib/cookie.c:1109:9: branch_false: following 'false' branch...
curl-8.18.0/lib/cookie.c:1118:10: branch_false: ...to here
curl-8.18.0/lib/cookie.c:1121:16: throw: if 'Curl_get_line' throws an exception...
curl-8.18.0/lib/cookie.c:1121:16: danger: 'handle' leaks here; was opened at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 1119|       curlx_dyn_init(&buf, MAX_COOKIE_LINE);
# 1120|       do {
# 1121|->       result = Curl_get_line(&buf, fp, &eof);
# 1122|         if(!result) {
# 1123|           const char *lineptr = curlx_dyn_ptr(&buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
curl-8.18.0/lib/cookie.c:1121:16: warning[-Wanalyzer-malloc-leak]: leak of 'handle'
curl-8.18.0/lib/cookie.c:1104:5: branch_true: following 'true' branch...
curl-8.18.0/lib/cookie.c:1105:7: branch_false: following 'false' branch (when the strings are non-equal)...
curl-8.18.0/lib/cookie.c:1108:12: branch_false: ...to here
curl-8.18.0/lib/cookie.c:1108:12: acquire_memory: allocated here
curl-8.18.0/lib/cookie.c:1109:9: branch_false: following 'false' branch...
curl-8.18.0/lib/cookie.c:1118:10: branch_false: ...to here
curl-8.18.0/lib/cookie.c:1121:16: throw: if 'Curl_get_line' throws an exception...
curl-8.18.0/lib/cookie.c:1121:16: danger: 'handle' leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
# 1119|       curlx_dyn_init(&buf, MAX_COOKIE_LINE);
# 1120|       do {
# 1121|->       result = Curl_get_line(&buf, fp, &eof);
# 1122|         if(!result) {
# 1123|           const char *lineptr = curlx_dyn_ptr(&buf);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def12]
curl-8.18.0/lib/curl_share.c:91:26: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curl_share.c:69:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:72:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:77:3: branch_false: ...to here
curl-8.18.0/lib/curl_share.c:77:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curl_share.c:90:9: branch_true: following 'true' branch...
curl-8.18.0/lib/curl_share.c:91:26: branch_true: ...to here
curl-8.18.0/lib/curl_share.c:91:26: throw: if 'Curl_cookie_init' throws an exception...
curl-8.18.0/lib/curl_share.c:91:26: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   89|   #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
#   90|         if(!share->cookies) {
#   91|->         share->cookies = Curl_cookie_init();
#   92|           if(!share->cookies)
#   93|             res = CURLSHE_NOMEM;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def13]
curl-8.18.0/lib/curl_share.c:103:23: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curl_share.c:69:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:72:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:77:3: branch_false: ...to here
curl-8.18.0/lib/curl_share.c:77:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curl_share.c:102:9: branch_true: following 'true' branch...
curl-8.18.0/lib/curl_share.c:103:23: branch_true: ...to here
curl-8.18.0/lib/curl_share.c:103:23: throw: if 'Curl_hsts_init' throws an exception...
curl-8.18.0/lib/curl_share.c:103:23: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  101|   #ifndef CURL_DISABLE_HSTS
#  102|         if(!share->hsts) {
#  103|->         share->hsts = Curl_hsts_init();
#  104|           if(!share->hsts)
#  105|             res = CURLSHE_NOMEM;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def14]
curl-8.18.0/lib/curl_share.c:120:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curl_share.c:69:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:72:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:77:3: branch_false: ...to here
curl-8.18.0/lib/curl_share.c:77:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curl_share.c:114:9: branch_true: following 'true' branch...
curl-8.18.0/lib/curl_share.c:120:12: branch_true: ...to here
curl-8.18.0/lib/curl_share.c:120:12: throw: if 'Curl_ssl_scache_create' throws an exception...
curl-8.18.0/lib/curl_share.c:120:12: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  118|            * scache is not optimized for several hundreds of peers. So,
#  119|            * keep it at a reasonable level. */
#  120|->         if(Curl_ssl_scache_create(25, 2, &share->ssl_scache))
#  121|             res = CURLSHE_NOMEM;
#  122|         }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def15]
curl-8.18.0/lib/curl_share.c:131:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curl_share.c:69:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:72:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:77:3: branch_false: ...to here
curl-8.18.0/lib/curl_share.c:77:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curl_share.c:130:9: branch_true: following 'true' branch...
curl-8.18.0/lib/curl_share.c:131:9: branch_true: ...to here
curl-8.18.0/lib/curl_share.c:131:9: throw: if 'Curl_cpool_init' throws an exception...
curl-8.18.0/lib/curl_share.c:131:9: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  129|         /* It is safe to set this option several times on a share. */
#  130|         if(!share->cpool.initialised) {
#  131|->         Curl_cpool_init(&share->cpool, share->admin, share, 103);
#  132|         }
#  133|         break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def16]
curl-8.18.0/lib/curl_share.c:159:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curl_share.c:69:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:72:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:77:3: branch_false: ...to here
curl-8.18.0/lib/curl_share.c:77:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curl_share.c:158:9: branch_true: following 'true' branch...
curl-8.18.0/lib/curl_share.c:159:9: branch_true: ...to here
curl-8.18.0/lib/curl_share.c:159:9: throw: if 'Curl_cookie_cleanup' throws an exception...
curl-8.18.0/lib/curl_share.c:159:9: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  157|   #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
#  158|         if(share->cookies) {
#  159|->         Curl_cookie_cleanup(share->cookies);
#  160|           share->cookies = NULL;
#  161|         }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def17]
curl-8.18.0/lib/curl_share.c:170:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curl_share.c:69:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:72:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:77:3: branch_false: ...to here
curl-8.18.0/lib/curl_share.c:77:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curl_share.c:169:9: branch_true: following 'true' branch...
curl-8.18.0/lib/curl_share.c:170:9: branch_true: ...to here
curl-8.18.0/lib/curl_share.c:170:9: throw: if 'Curl_hsts_cleanup' throws an exception...
curl-8.18.0/lib/curl_share.c:170:9: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  168|   #ifndef CURL_DISABLE_HSTS
#  169|         if(share->hsts) {
#  170|->         Curl_hsts_cleanup(&share->hsts);
#  171|         }
#  172|   #else /* CURL_DISABLE_HSTS */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def18]
curl-8.18.0/lib/curl_share.c:180:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curl_share.c:69:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:72:5: branch_false: following 'false' branch...
curl-8.18.0/lib/curl_share.c:77:3: branch_false: ...to here
curl-8.18.0/lib/curl_share.c:77:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curl_share.c:179:9: branch_true: following 'true' branch...
curl-8.18.0/lib/curl_share.c:180:9: branch_true: ...to here
curl-8.18.0/lib/curl_share.c:180:9: throw: if 'Curl_ssl_scache_destroy' throws an exception...
curl-8.18.0/lib/curl_share.c:180:9: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  178|   #ifdef USE_SSL
#  179|         if(share->ssl_scache) {
#  180|->         Curl_ssl_scache_destroy(share->ssl_scache);
#  181|           share->ssl_scache = NULL;
#  182|         }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def19]
curl-8.18.0/lib/curl_trc.c:97:14: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curl_trc.c:440:6: enter_function: entry to 'Curl_trc_ssls'
curl-8.18.0/lib/curl_trc.c:443:5: branch_true: following 'true' branch...
curl-8.18.0/lib/curl_trc.c:445:5: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curl_trc.c:446:5: call_function: calling 'trc_infof' from 'Curl_trc_ssls'
#   95|     if(data->id >= 0) {
#   96|       if(cid >= 0)
#   97|->       return curl_msnprintf(buf, maxlen, CURL_TRC_FMT_IDSDC, data->id, cid);
#   98|       else
#   99|         return curl_msnprintf(buf, maxlen, CURL_TRC_FMT_IDSD, data->id);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def20]
curl-8.18.0/lib/curl_trc.c:99:14: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curl_trc.c:440:6: enter_function: entry to 'Curl_trc_ssls'
curl-8.18.0/lib/curl_trc.c:443:5: branch_true: following 'true' branch...
curl-8.18.0/lib/curl_trc.c:445:5: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curl_trc.c:446:5: call_function: calling 'trc_infof' from 'Curl_trc_ssls'
#   97|         return curl_msnprintf(buf, maxlen, CURL_TRC_FMT_IDSDC, data->id, cid);
#   98|       else
#   99|->       return curl_msnprintf(buf, maxlen, CURL_TRC_FMT_IDSD, data->id);
#  100|     }
#  101|     else if(cid >= 0)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def21]
curl-8.18.0/lib/curl_trc.c:102:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curl_trc.c:440:6: enter_function: entry to 'Curl_trc_ssls'
curl-8.18.0/lib/curl_trc.c:443:5: branch_true: following 'true' branch...
curl-8.18.0/lib/curl_trc.c:445:5: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curl_trc.c:446:5: call_function: calling 'trc_infof' from 'Curl_trc_ssls'
#  100|     }
#  101|     else if(cid >= 0)
#  102|->     return curl_msnprintf(buf, maxlen, CURL_TRC_FMT_IDSC, cid);
#  103|     else {
#  104|       return curl_msnprintf(buf, maxlen, "[x-x] ");

Error: GCC_ANALYZER_WARNING (CWE-404): [#def22]
curl-8.18.0/lib/curl_trc.c:104:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curl_trc.c:440:6: enter_function: entry to 'Curl_trc_ssls'
curl-8.18.0/lib/curl_trc.c:443:5: branch_true: following 'true' branch...
curl-8.18.0/lib/curl_trc.c:445:5: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curl_trc.c:446:5: call_function: calling 'trc_infof' from 'Curl_trc_ssls'
#  102|       return curl_msnprintf(buf, maxlen, CURL_TRC_FMT_IDSC, cid);
#  103|     else {
#  104|->     return curl_msnprintf(buf, maxlen, "[x-x] ");
#  105|     }
#  106|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def23]
curl-8.18.0/lib/curl_trc.c:215:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curl_trc.c:440:6: enter_function: entry to 'Curl_trc_ssls'
curl-8.18.0/lib/curl_trc.c:443:5: branch_true: following 'true' branch...
curl-8.18.0/lib/curl_trc.c:445:5: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curl_trc.c:446:5: call_function: calling 'trc_infof' from 'Curl_trc_ssls'
#  213|       len += trc_print_ids(data, buf + len, TRC_LINE_MAX - len);
#  214|     if(feat)
#  215|->     len += curl_msnprintf(buf + len, TRC_LINE_MAX - len, "[%s] ", feat->name);
#  216|     if(opt_id) {
#  217|       if(opt_id_idx > 0)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def24]
curl-8.18.0/lib/curl_trc.c:223:10: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curl_trc.c:440:6: enter_function: entry to 'Curl_trc_ssls'
curl-8.18.0/lib/curl_trc.c:443:5: branch_true: following 'true' branch...
curl-8.18.0/lib/curl_trc.c:445:5: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curl_trc.c:446:5: call_function: calling 'trc_infof' from 'Curl_trc_ssls'
#  221|         len += curl_msnprintf(buf + len, TRC_LINE_MAX - len, "[%s] ", opt_id);
#  222|     }
#  223|->   len += curl_mvsnprintf(buf + len, TRC_LINE_MAX - len, fmt, ap);
#  224|     len = trc_end_buf(buf, len, TRC_LINE_MAX, TRUE);
#  225|     trc_write(data, CURLINFO_TEXT, buf, len);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def25]
curl-8.18.0/lib/curlx/dynbuf.c:197:8: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curlx/dynbuf.c:222:10: enter_function: entry to 'curlx_dyn_addf'
curl-8.18.0/lib/curlx/dynbuf.c:230:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curlx/dynbuf.c:231:12: call_function: calling 'curlx_dyn_vaddf' from 'curlx_dyn_addf'
#  195|     DEBUGASSERT(!s->leng || s->bufr);
#  196|     DEBUGASSERT(fmt);
#  197|->   rc = curlx_dyn_vprintf(s, fmt, ap);
#  198|   
#  199|     if(!rc)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def26]
curl-8.18.0/lib/curlx/dynbuf.c:206:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/curlx/dynbuf.c:222:10: enter_function: entry to 'curlx_dyn_addf'
curl-8.18.0/lib/curlx/dynbuf.c:230:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/curlx/dynbuf.c:231:12: call_function: calling 'curlx_dyn_vaddf' from 'curlx_dyn_addf'
#  204|   #else
#  205|     char *str;
#  206|->   str = curl_mvaprintf(fmt, ap); /* this allocs a new string to append */
#  207|   
#  208|     if(str) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def27]
curl-8.18.0/lib/curlx/dynbuf.c:206:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/lib/curlx/dynbuf.c:222:10: enter_function: entry to ‘curlx_dyn_addf’
curl-8.18.0/lib/curlx/dynbuf.c:230:3: acquire_resource: ‘va_start’ called here
curl-8.18.0/lib/curlx/dynbuf.c:231:12: call_function: calling ‘curlx_dyn_vaddf’ from ‘curlx_dyn_addf’
#  204|   #else
#  205|     char *str;
#  206|->   str = curl_mvaprintf(fmt, ap); /* this allocs a new string to append */
#  207|   
#  208|     if(str) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def28]
curl-8.18.0/lib/dict.c:139:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/dict.c:138:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/dict.c:139:7: throw: if 'curl_mvaprintf' throws an exception...
curl-8.18.0/lib/dict.c:139:7: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  137|     va_list ap;
#  138|     va_start(ap, fmt);
#  139|->   s = curl_mvaprintf(fmt, ap); /* returns an allocated string */
#  140|     va_end(ap);
#  141|     if(!s)

Error: COMPILER_WARNING (CWE-704): [#def29]
curl-8.18.0/lib/doh.c: scope_hint: In function 'doh_req_encode'
curl-8.18.0/lib/doh.c:132:17: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
#  132 |     char *dot = strchr(hostp, '.');
#      |                 ^~~~~~
#  130|     while(*hostp) {
#  131|       size_t labellen;
#  132|->     char *dot = strchr(hostp, '.');
#  133|       if(dot)
#  134|         labellen = dot - hostp;

Error: COMPILER_WARNING (CWE-704): [#def30]
curl-8.18.0/lib/doh.c:132:17: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
#  130|     while(*hostp) {
#  131|       size_t labellen;
#  132|->     char *dot = strchr(hostp, '.');
#  133|       if(dot)
#  134|         labellen = dot - hostp;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def31]
curl-8.18.0/lib/easy.c:879:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/easy.c:873:5: branch_false: following 'false' branch...
curl-8.18.0/lib/easy.c:876:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/easy.c:879:12: throw: if 'Curl_getinfo' throws an exception...
curl-8.18.0/lib/easy.c:879:12: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  877|     paramp = va_arg(arg, void *);
#  878|   
#  879|->   result = Curl_getinfo(data, info, paramp);
#  880|   
#  881|     va_end(arg);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
curl-8.18.0/lib/file.c:262:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(real_path, 0)'
curl-8.18.0/lib/file.c:178:5: branch_false: following 'false' branch...
curl-8.18.0/lib/file.c:181:6: branch_false: ...to here
curl-8.18.0/lib/file.c:181:5: branch_false: following 'false' branch...
curl-8.18.0/lib/file.c:190:27: branch_false: ...to here
curl-8.18.0/lib/file.c:192:5: branch_false: following 'false' branch...
curl-8.18.0/lib/file.c:231:6: branch_false: ...to here
curl-8.18.0/lib/file.c:231:5: branch_false: following 'false' branch...
curl-8.18.0/lib/file.c:261:8: branch_false: ...to here
curl-8.18.0/lib/file.c:261:8: acquire_resource: opened here
curl-8.18.0/lib/file.c:265:3: throw: if the called function throws an exception...
curl-8.18.0/lib/file.c:262:3: danger: 'open(real_path, 0)' leaks here; was opened at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  260|     #else
#  261|     fd = curlx_open(real_path, O_RDONLY);
#  262|->   file->path = real_path;
#  263|     #endif
#  264|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
curl-8.18.0/lib/file.c:624:22: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(*<unknown>.path)'
curl-8.18.0/lib/file.c:447:5: branch_false: following 'false' branch...
curl-8.18.0/lib/file.c:450:6: branch_false: ...to here
curl-8.18.0/lib/file.c:450:5: branch_false: following 'false' branch...
curl-8.18.0/lib/file.c:454:3: branch_false: ...to here
curl-8.18.0/lib/file.c:520:5: branch_false: following 'false' branch...
curl-8.18.0/lib/file.c:525:6: branch_false: ...to here
curl-8.18.0/lib/file.c:578:5: branch_false: following 'false' branch...
curl-8.18.0/lib/file.c:581:7: branch_false: ...to here
curl-8.18.0/lib/file.c:581:5: branch_false: following 'false' branch...
curl-8.18.0/lib/file.c:616:24: branch_false: ...to here
curl-8.18.0/lib/file.c:616:16: acquire_memory: allocated here
curl-8.18.0/lib/file.c:619:7: branch_false: following 'false' branch...
curl-8.18.0/lib/file.c:619:7: branch_false: ...to here
curl-8.18.0/lib/file.c:624:22: throw: if 'readdir' throws an exception...
curl-8.18.0/lib/file.c:624:22: danger: 'opendir(*<unknown>.path)' leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#  622|       }
#  623|       else {
#  624|->       while((entry = readdir(dir))) {
#  625|           if(entry->d_name[0] != '.') {
#  626|             result = Curl_client_write(data, CLIENTWRITE_BODY,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def34]
curl-8.18.0/lib/formdata.c:108:32: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/formdata.c:609:14: enter_function: entry to 'curl_formadd'
curl-8.18.0/lib/formdata.c:614:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/formdata.c:615:12: call_function: calling 'FormAdd' from 'curl_formadd'
#  106|   static struct FormInfo *NewFormInfo(void)
#  107|   {
#  108|->   struct FormInfo *form_info = curlx_calloc(1, sizeof(struct FormInfo));
#  109|   
#  110|     if(form_info) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def35]
curl-8.18.0/lib/formdata.c:111:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/formdata.c:609:14: enter_function: entry to 'curl_formadd'
curl-8.18.0/lib/formdata.c:614:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/formdata.c:615:12: call_function: calling 'FormAdd' from 'curl_formadd'
#  109|   
#  110|     if(form_info) {
#  111|->     Curl_bufref_init(&form_info->name);
#  112|       Curl_bufref_init(&form_info->value);
#  113|       Curl_bufref_init(&form_info->contenttype);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def36]
curl-8.18.0/lib/formdata.c:112:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/formdata.c:609:14: enter_function: entry to 'curl_formadd'
curl-8.18.0/lib/formdata.c:614:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/formdata.c:615:12: call_function: calling 'FormAdd' from 'curl_formadd'
#  110|     if(form_info) {
#  111|       Curl_bufref_init(&form_info->name);
#  112|->     Curl_bufref_init(&form_info->value);
#  113|       Curl_bufref_init(&form_info->contenttype);
#  114|       Curl_bufref_init(&form_info->showfilename);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def37]
curl-8.18.0/lib/formdata.c:113:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/formdata.c:609:14: enter_function: entry to 'curl_formadd'
curl-8.18.0/lib/formdata.c:614:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/formdata.c:615:12: call_function: calling 'FormAdd' from 'curl_formadd'
#  111|       Curl_bufref_init(&form_info->name);
#  112|       Curl_bufref_init(&form_info->value);
#  113|->     Curl_bufref_init(&form_info->contenttype);
#  114|       Curl_bufref_init(&form_info->showfilename);
#  115|     }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def38]
curl-8.18.0/lib/formdata.c:114:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/formdata.c:609:14: enter_function: entry to 'curl_formadd'
curl-8.18.0/lib/formdata.c:614:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/formdata.c:615:12: call_function: calling 'FormAdd' from 'curl_formadd'
#  112|       Curl_bufref_init(&form_info->value);
#  113|       Curl_bufref_init(&form_info->contenttype);
#  114|->     Curl_bufref_init(&form_info->showfilename);
#  115|     }
#  116|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def39]
curl-8.18.0/lib/formdata.c:374:10: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/formdata.c:609:14: enter_function: entry to 'curl_formadd'
curl-8.18.0/lib/formdata.c:614:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/formdata.c:615:12: call_function: calling 'FormAdd' from 'curl_formadd'
#  372|         FALLTHROUGH();
#  373|       case CURLFORM_COPYNAME:
#  374|->       if(Curl_bufref_ptr(&curr->name))
#  375|           retval = CURL_FORMADD_OPTION_TWICE;
#  376|         else {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def40]
curl-8.18.0/lib/getinfo.c:92:21: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/getinfo.c:614:10: enter_function: entry to 'Curl_getinfo'
curl-8.18.0/lib/getinfo.c:626:5: branch_false: following 'false' branch (when 'data' is non-NULL)...
curl-8.18.0/lib/getinfo.c:629:3: branch_false: ...to here
curl-8.18.0/lib/getinfo.c:629:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/getinfo.c:635:7: branch_true: following 'true' branch (when 'param_charp' is non-NULL)...
curl-8.18.0/lib/getinfo.c:636:16: branch_true: ...to here
curl-8.18.0/lib/getinfo.c:636:16: call_function: calling 'getinfo_char' from 'Curl_getinfo'
#   90|     switch(info) {
#   91|     case CURLINFO_EFFECTIVE_URL: {
#   92|->     const char *s = Curl_bufref_ptr(&data->state.url);
#   93|       *param_charp = s ? s : "";
#   94|     }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def41]
curl-8.18.0/lib/getinfo.c:147:20: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/getinfo.c:614:10: enter_function: entry to 'Curl_getinfo'
curl-8.18.0/lib/getinfo.c:626:5: branch_false: following 'false' branch (when 'data' is non-NULL)...
curl-8.18.0/lib/getinfo.c:629:3: branch_false: ...to here
curl-8.18.0/lib/getinfo.c:629:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/getinfo.c:635:7: branch_true: following 'true' branch (when 'param_charp' is non-NULL)...
curl-8.18.0/lib/getinfo.c:636:16: branch_true: ...to here
curl-8.18.0/lib/getinfo.c:636:16: call_function: calling 'getinfo_char' from 'Curl_getinfo'
#  145|     case CURLINFO_REFERER:
#  146|       /* Return the referrer header for this request, or NULL if unset */
#  147|->     *param_charp = Curl_bufref_ptr(&data->state.referer);
#  148|       break;
#  149|     case CURLINFO_PRIMARY_IP:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def42]
curl-8.18.0/lib/getinfo.c:287:14: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/getinfo.c:614:10: enter_function: entry to 'Curl_getinfo'
curl-8.18.0/lib/getinfo.c:626:5: branch_false: following 'false' branch (when 'data' is non-NULL)...
curl-8.18.0/lib/getinfo.c:629:3: branch_false: ...to here
curl-8.18.0/lib/getinfo.c:629:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/getinfo.c:640:7: branch_true: following 'true' branch (when 'param_longp' is non-NULL)...
curl-8.18.0/lib/getinfo.c:641:16: branch_true: ...to here
curl-8.18.0/lib/getinfo.c:641:16: call_function: calling 'getinfo_long' from 'Curl_getinfo'
#  285|       break;
#  286|     case CURLINFO_LASTSOCKET:
#  287|->     sockfd = Curl_getconnectinfo(data, NULL);
#  288|   
#  289|       /* note: this is not a good conversion for systems with 64-bit sockets and

Error: GCC_ANALYZER_WARNING (CWE-404): [#def43]
curl-8.18.0/lib/getinfo.c:567:21: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/getinfo.c:614:10: enter_function: entry to 'Curl_getinfo'
curl-8.18.0/lib/getinfo.c:626:5: branch_false: following 'false' branch (when 'data' is non-NULL)...
curl-8.18.0/lib/getinfo.c:629:3: branch_false: ...to here
curl-8.18.0/lib/getinfo.c:629:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/getinfo.c:655:7: branch_true: following 'true' branch (when 'param_slistp' is non-NULL)...
curl-8.18.0/lib/getinfo.c:656:16: branch_true: ...to here
curl-8.18.0/lib/getinfo.c:656:16: call_function: calling 'getinfo_slist' from 'Curl_getinfo'
#  565|     switch(info) {
#  566|     case CURLINFO_SSL_ENGINES:
#  567|->     *param_slistp = Curl_ssl_engines_list(data);
#  568|       break;
#  569|     case CURLINFO_COOKIELIST:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def44]
curl-8.18.0/lib/getinfo.c:570:21: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/getinfo.c:614:10: enter_function: entry to 'Curl_getinfo'
curl-8.18.0/lib/getinfo.c:626:5: branch_false: following 'false' branch (when 'data' is non-NULL)...
curl-8.18.0/lib/getinfo.c:629:3: branch_false: ...to here
curl-8.18.0/lib/getinfo.c:629:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/getinfo.c:655:7: branch_true: following 'true' branch (when 'param_slistp' is non-NULL)...
curl-8.18.0/lib/getinfo.c:656:16: branch_true: ...to here
curl-8.18.0/lib/getinfo.c:656:16: call_function: calling 'getinfo_slist' from 'Curl_getinfo'
#  568|       break;
#  569|     case CURLINFO_COOKIELIST:
#  570|->     *param_slistp = Curl_cookie_list(data);
#  571|       break;
#  572|     case CURLINFO_CERTINFO:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def45]
curl-8.18.0/lib/getinfo.c:605:22: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/getinfo.c:614:10: enter_function: entry to 'Curl_getinfo'
curl-8.18.0/lib/getinfo.c:626:5: branch_false: following 'false' branch (when 'data' is non-NULL)...
curl-8.18.0/lib/getinfo.c:629:3: branch_false: ...to here
curl-8.18.0/lib/getinfo.c:629:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/getinfo.c:660:7: branch_true: following 'true' branch (when 'param_socketp' is non-NULL)...
curl-8.18.0/lib/getinfo.c:661:16: call_function: inlined call to 'getinfo_socket' from 'Curl_getinfo'
#  603|     switch(info) {
#  604|     case CURLINFO_ACTIVESOCKET:
#  605|->     *param_socketp = Curl_getconnectinfo(data, NULL);
#  606|       break;
#  607|     default:

Error: CPPCHECK_WARNING (CWE-457): [#def46]
curl-8.18.0/lib/hash.c:221: warning[uninitvar]: Uninitialized variable: *he_anchor
#  219|   
#  220|       he_anchor = CURL_HASH_SLOT_ADDR(h, key, key_len);
#  221|->     while(*he_anchor) {
#  222|         he = *he_anchor;
#  223|         if(h->comp_func(he->key, he->key_len, key, key_len)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
curl-8.18.0/lib/hostip.c:698:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor 's'
curl-8.18.0/lib/hostip.c:692:23: acquire_resource: datagram socket created here
curl-8.18.0/lib/hostip.c:693:7: branch_false: following 'false' branch (when 's != -1')...
curl-8.18.0/lib/hostip.c:698:7: branch_false: ...to here
curl-8.18.0/lib/hostip.c:698:7: throw: if 'close' throws an exception...
curl-8.18.0/lib/hostip.c:698:7: danger: 's' leaks here
#  696|       else {
#  697|         ipv6_works = 1;
#  698|->       sclose(s);
#  699|       }
#  700|       return ipv6_works > 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
curl-8.18.0/lib/hsts.c:510:5: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(file, "r")'
curl-8.18.0/lib/hsts.c:503:5: branch_false: following 'false' branch...
curl-8.18.0/lib/hsts.c:506:8: branch_false: ...to here
curl-8.18.0/lib/hsts.c:506:8: acquire_resource: opened here
curl-8.18.0/lib/hsts.c:507:5: branch_true: following 'true' branch...
curl-8.18.0/lib/hsts.c:509:10: branch_true: ...to here
curl-8.18.0/lib/hsts.c:510:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/lib/hsts.c:510:5: danger: 'fopen(file, "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  508|       struct dynbuf buf;
#  509|       bool eof = FALSE;
#  510|->     curlx_dyn_init(&buf, MAX_HSTS_LINE);
#  511|       do {
#  512|         result = Curl_get_line(&buf, fp, &eof);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
curl-8.18.0/lib/hsts.c:510:5: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(file, "r")'
curl-8.18.0/lib/hsts.c:503:5: branch_false: following 'false' branch...
curl-8.18.0/lib/hsts.c:506:8: branch_false: ...to here
curl-8.18.0/lib/hsts.c:506:8: acquire_memory: allocated here
curl-8.18.0/lib/hsts.c:507:5: branch_true: following 'true' branch...
curl-8.18.0/lib/hsts.c:509:10: branch_true: ...to here
curl-8.18.0/lib/hsts.c:510:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/lib/hsts.c:510:5: danger: 'fopen(file, "r")' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  508|       struct dynbuf buf;
#  509|       bool eof = FALSE;
#  510|->     curlx_dyn_init(&buf, MAX_HSTS_LINE);
#  511|       do {
#  512|         result = Curl_get_line(&buf, fp, &eof);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
curl-8.18.0/lib/hsts.c:512:16: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(file, "r")'
curl-8.18.0/lib/hsts.c:503:5: branch_false: following 'false' branch...
curl-8.18.0/lib/hsts.c:506:8: branch_false: ...to here
curl-8.18.0/lib/hsts.c:506:8: acquire_resource: opened here
curl-8.18.0/lib/hsts.c:507:5: branch_true: following 'true' branch...
curl-8.18.0/lib/hsts.c:509:10: branch_true: ...to here
curl-8.18.0/lib/hsts.c:512:16: throw: if 'Curl_get_line' throws an exception...
curl-8.18.0/lib/hsts.c:512:16: danger: 'fopen(file, "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  510|       curlx_dyn_init(&buf, MAX_HSTS_LINE);
#  511|       do {
#  512|->       result = Curl_get_line(&buf, fp, &eof);
#  513|         if(!result) {
#  514|           const char *lineptr = curlx_dyn_ptr(&buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
curl-8.18.0/lib/hsts.c:512:16: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(file, "r")'
curl-8.18.0/lib/hsts.c:503:5: branch_false: following 'false' branch...
curl-8.18.0/lib/hsts.c:506:8: branch_false: ...to here
curl-8.18.0/lib/hsts.c:506:8: acquire_memory: allocated here
curl-8.18.0/lib/hsts.c:507:5: branch_true: following 'true' branch...
curl-8.18.0/lib/hsts.c:509:10: branch_true: ...to here
curl-8.18.0/lib/hsts.c:512:16: throw: if 'Curl_get_line' throws an exception...
curl-8.18.0/lib/hsts.c:512:16: danger: 'fopen(file, "r")' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  510|       curlx_dyn_init(&buf, MAX_HSTS_LINE);
#  511|       do {
#  512|->       result = Curl_get_line(&buf, fp, &eof);
#  513|         if(!result) {
#  514|           const char *lineptr = curlx_dyn_ptr(&buf);

Error: COMPILER_WARNING (CWE-704): [#def52]
curl-8.18.0/lib/http.c: scope_hint: In function 'verify_header'
curl-8.18.0/lib/http.c:3753:15: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 3753 |   char *ptr = memchr(hd, 0x00, hdlen);
#      |               ^~~~~~
# 3751|   {
# 3752|     struct SingleRequest *k = &data->req;
# 3753|->   char *ptr = memchr(hd, 0x00, hdlen);
# 3754|     if(ptr) {
# 3755|       /* this is bad, bail out */

Error: COMPILER_WARNING (CWE-704): [#def53]
curl-8.18.0/lib/http.c:3753:15: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 3751|   {
# 3752|     struct SingleRequest *k = &data->req;
# 3753|->   char *ptr = memchr(hd, 0x00, hdlen);
# 3754|     if(ptr) {
# 3755|       /* this is bad, bail out */

Error: COMPILER_WARNING (CWE-704): [#def54]
curl-8.18.0/lib/http.c:3766:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 3766 |     ptr = memchr(hd, ':', hdlen);
#      |         ^
# 3764|       ;
# 3765|     else {
# 3766|->     ptr = memchr(hd, ':', hdlen);
# 3767|       if(!ptr) {
# 3768|         /* this is bad, bail out */

Error: COMPILER_WARNING (CWE-704): [#def55]
curl-8.18.0/lib/http.c:3766:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 3764|       ;
# 3765|     else {
# 3766|->     ptr = memchr(hd, ':', hdlen);
# 3767|       if(!ptr) {
# 3768|         /* this is bad, bail out */

Error: COMPILER_WARNING (CWE-704): [#def56]
curl-8.18.0/lib/http.c: scope_hint: In function 'http_parse_headers'
curl-8.18.0/lib/http.c:4367:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 4367 |     end_ptr = memchr(buf, '\n', blen);
#      |             ^
# 4365|       }
# 4366|   
# 4367|->     end_ptr = memchr(buf, '\n', blen);
# 4368|       if(!end_ptr) {
# 4369|         /* Not a complete header line within buffer, append the data to

Error: COMPILER_WARNING (CWE-704): [#def57]
curl-8.18.0/lib/http.c:4367:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 4365|       }
# 4366|   
# 4367|->     end_ptr = memchr(buf, '\n', blen);
# 4368|       if(!end_ptr) {
# 4369|         /* Not a complete header line within buffer, append the data to

Error: COMPILER_WARNING (CWE-704): [#def58]
curl-8.18.0/lib/http_digest.c: scope_hint: In function 'Curl_output_digest'
curl-8.18.0/lib/http_digest.c:142:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  142 |     tmp = strchr((const char *)uripath, '?');
#      |         ^
#  140|   
#  141|     if(authp->iestyle) {
#  142|->     tmp = strchr((const char *)uripath, '?');
#  143|       if(tmp) {
#  144|         size_t urilen = tmp - (const char *)uripath;

Error: COMPILER_WARNING (CWE-704): [#def59]
curl-8.18.0/lib/http_digest.c:142:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  140|   
#  141|     if(authp->iestyle) {
#  142|->     tmp = strchr((const char *)uripath, '?');
#  143|       if(tmp) {
#  144|         size_t urilen = tmp - (const char *)uripath;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def60]
curl-8.18.0/lib/imap.c:2038:14: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/imap.c:2031:5: branch_true: following 'true' branch...
curl-8.18.0/lib/imap.c:2033:5: branch_true: ...to here
curl-8.18.0/lib/imap.c:2033:5: acquire_resource: 'va_start' called here
curl-8.18.0/lib/imap.c:2038:14: throw: if 'Curl_pp_vsendf' throws an exception...
curl-8.18.0/lib/imap.c:2038:14: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 2036|   #pragma clang diagnostic ignored "-Wformat-nonliteral"
# 2037|   #endif
# 2038|->     result = Curl_pp_vsendf(data, &imapc->pp, curlx_dyn_ptr(&imapc->dyn), ap);
# 2039|   #ifdef __clang__
# 2040|   #pragma clang diagnostic pop

Error: GCC_ANALYZER_WARNING (CWE-404): [#def61]
curl-8.18.0/lib/imap.c:2038:47: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/imap.c:2031:5: branch_true: following 'true' branch...
curl-8.18.0/lib/imap.c:2033:5: branch_true: ...to here
curl-8.18.0/lib/imap.c:2033:5: acquire_resource: 'va_start' called here
curl-8.18.0/lib/imap.c:2038:47: throw: if 'curlx_dyn_ptr' throws an exception...
curl-8.18.0/lib/imap.c:2038:47: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 2036|   #pragma clang diagnostic ignored "-Wformat-nonliteral"
# 2037|   #endif
# 2038|->     result = Curl_pp_vsendf(data, &imapc->pp, curlx_dyn_ptr(&imapc->dyn), ap);
# 2039|   #ifdef __clang__
# 2040|   #pragma clang diagnostic pop

Error: GCC_ANALYZER_WARNING (CWE-835): [#def62]
curl-8.18.0/lib/mime.c:985:9: warning[-Wanalyzer-infinite-loop]: infinite loop
#  983|     (void)size;  /* Always 1 */
#  984|   
#  985|->   while(nitems) {
#  986|       size_t sz = 0;
#  987|       curl_mimepart *part = mime->state.ptr;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def63]
curl-8.18.0/lib/multi.c:3252:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/multi.c:3216:5: branch_false: following 'false' branch...
curl-8.18.0/lib/multi.c:3219:5: branch_false: following 'false' branch...
curl-8.18.0/lib/multi.c:3222:3: branch_false: ...to here
curl-8.18.0/lib/multi.c:3222:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/multi.c:3252:9: throw: if 'curlx_sltouz' throws an exception...
curl-8.18.0/lib/multi.c:3252:9: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 3250|       break;
# 3251|     case CURLMOPT_MAX_HOST_CONNECTIONS:
# 3252|->     if(!curlx_sltouz(va_arg(param, long), &multi->max_host_connections))
# 3253|         mresult = CURLM_BAD_FUNCTION_ARGUMENT;
# 3254|       break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def64]
curl-8.18.0/lib/multi.c:3256:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/multi.c:3216:5: branch_false: following 'false' branch...
curl-8.18.0/lib/multi.c:3219:5: branch_false: following 'false' branch...
curl-8.18.0/lib/multi.c:3222:3: branch_false: ...to here
curl-8.18.0/lib/multi.c:3222:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/multi.c:3256:9: throw: if 'curlx_sltouz' throws an exception...
curl-8.18.0/lib/multi.c:3256:9: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 3254|       break;
# 3255|     case CURLMOPT_MAX_TOTAL_CONNECTIONS:
# 3256|->     if(!curlx_sltouz(va_arg(param, long), &multi->max_total_connections))
# 3257|         mresult = CURLM_BAD_FUNCTION_ARGUMENT;
# 3258|       break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def65]
curl-8.18.0/lib/multi.c:3280:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/multi.c:3216:5: branch_false: following 'false' branch...
curl-8.18.0/lib/multi.c:3219:5: branch_false: following 'false' branch...
curl-8.18.0/lib/multi.c:3222:3: branch_false: ...to here
curl-8.18.0/lib/multi.c:3222:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/multi.c:3279:7: branch_true: following 'true' branch...
curl-8.18.0/lib/multi.c:3280:7: branch_true: ...to here
curl-8.18.0/lib/multi.c:3280:7: throw: if 'Curl_dnscache_clear' throws an exception...
curl-8.18.0/lib/multi.c:3280:7: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 3278|       long val = va_arg(param, long);
# 3279|       if(val & CURLMNWC_CLEAR_DNS) {
# 3280|->       Curl_dnscache_clear(multi->admin);
# 3281|       }
# 3282|       if(val & CURLMNWC_CLEAR_CONNS) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def66]
curl-8.18.0/lib/multi.c:3283:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/multi.c:3216:5: branch_false: following 'false' branch...
curl-8.18.0/lib/multi.c:3219:5: branch_false: following 'false' branch...
curl-8.18.0/lib/multi.c:3222:3: branch_false: ...to here
curl-8.18.0/lib/multi.c:3222:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/multi.c:3279:7: branch_true: following 'true' branch...
curl-8.18.0/lib/multi.c:3280:7: branch_true: ...to here
curl-8.18.0/lib/multi.c:3283:7: throw: if 'Curl_cpool_nw_changed' throws an exception...
curl-8.18.0/lib/multi.c:3283:7: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 3281|       }
# 3282|       if(val & CURLMNWC_CLEAR_CONNS) {
# 3283|->       Curl_cpool_nw_changed(multi->admin);
# 3284|       }
# 3285|       break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
curl-8.18.0/lib/netrc.c:76:3: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r")'
curl-8.18.0/lib/netrc.c:109:18: enter_function: entry to 'parsenetrc'
curl-8.18.0/lib/netrc.c:131:5: branch_true: following 'true' branch...
curl-8.18.0/lib/netrc.c:132:21: branch_true: ...to here
curl-8.18.0/lib/netrc.c:132:21: call_function: calling 'file2memory' from 'parsenetrc'
#   74|     FILE *file = curlx_fopen(filename, FOPEN_READTEXT);
#   75|     struct dynbuf linebuf;
#   76|->   curlx_dyn_init(&linebuf, MAX_NETRC_LINE);
#   77|   
#   78|     if(file) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
curl-8.18.0/lib/netrc.c:76:3: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r")'
curl-8.18.0/lib/netrc.c:109:18: enter_function: entry to 'parsenetrc'
curl-8.18.0/lib/netrc.c:131:5: branch_true: following 'true' branch...
curl-8.18.0/lib/netrc.c:132:21: branch_true: ...to here
curl-8.18.0/lib/netrc.c:132:21: call_function: calling 'file2memory' from 'parsenetrc'
#   74|     FILE *file = curlx_fopen(filename, FOPEN_READTEXT);
#   75|     struct dynbuf linebuf;
#   76|->   curlx_dyn_init(&linebuf, MAX_NETRC_LINE);
#   77|   
#   78|     if(file) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def69]
curl-8.18.0/lib/netrc.c:84:16: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r")'
curl-8.18.0/lib/netrc.c:109:18: enter_function: entry to 'parsenetrc'
curl-8.18.0/lib/netrc.c:131:5: branch_true: following 'true' branch...
curl-8.18.0/lib/netrc.c:132:21: branch_true: ...to here
curl-8.18.0/lib/netrc.c:132:21: call_function: calling 'file2memory' from 'parsenetrc'
#   82|       do {
#   83|         const char *line;
#   84|->       result = Curl_get_line(&linebuf, file, &eof);
#   85|         if(!result) {
#   86|           line = curlx_dyn_ptr(&linebuf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
curl-8.18.0/lib/netrc.c:84:16: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r")'
curl-8.18.0/lib/netrc.c:109:18: enter_function: entry to 'parsenetrc'
curl-8.18.0/lib/netrc.c:131:5: branch_true: following 'true' branch...
curl-8.18.0/lib/netrc.c:132:21: branch_true: ...to here
curl-8.18.0/lib/netrc.c:132:21: call_function: calling 'file2memory' from 'parsenetrc'
#   82|       do {
#   83|         const char *line;
#   84|->       result = Curl_get_line(&linebuf, file, &eof);
#   85|         if(!result) {
#   86|           line = curlx_dyn_ptr(&linebuf);

Error: COMPILER_WARNING (CWE-704): [#def71]
curl-8.18.0/lib/netrc.c: scope_hint: In function 'parsenetrc'
curl-8.18.0/lib/netrc.c:331:12: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  331 |         nl = strchr(tok, '\n');
#      |            ^
#  329|         char *nl = NULL;
#  330|         if(tok)
#  331|->         nl = strchr(tok, '\n');
#  332|         if(!nl)
#  333|           break;

Error: COMPILER_WARNING (CWE-704): [#def72]
curl-8.18.0/lib/netrc.c:331:12: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  329|         char *nl = NULL;
#  330|         if(tok)
#  331|->         nl = strchr(tok, '\n');
#  332|         if(!nl)
#  333|           break;

Error: COMPILER_WARNING (CWE-704): [#def73]
curl-8.18.0/lib/noproxy.c: scope_hint: In function 'match_ip'
curl-8.18.0/lib/noproxy.c:163:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  163 |   slash = strchr(check, '/');
#      |         ^
#  161|     check = checkip;
#  162|   
#  163|->   slash = strchr(check, '/');
#  164|     /* if the slash is part of this token, use it */
#  165|     if(slash) {

Error: COMPILER_WARNING (CWE-704): [#def74]
curl-8.18.0/lib/noproxy.c:163:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  161|     check = checkip;
#  162|   
#  163|->   slash = strchr(check, '/');
#  164|     /* if the slash is part of this token, use it */
#  165|     if(slash) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def75]
curl-8.18.0/lib/pingpong.c:176:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/pingpong.c:225:10: enter_function: entry to 'Curl_pp_sendf'
curl-8.18.0/lib/pingpong.c:230:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/pingpong.c:232:12: call_function: calling 'Curl_pp_vsendf' from 'Curl_pp_sendf'
#  174|       return CURLE_SEND_ERROR;
#  175|   
#  176|->   curlx_dyn_reset(&pp->sendbuf);
#  177|     result = curlx_dyn_vaddf(&pp->sendbuf, fmt, args);
#  178|     if(result)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def76]
curl-8.18.0/lib/pingpong.c:177:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/pingpong.c:225:10: enter_function: entry to 'Curl_pp_sendf'
curl-8.18.0/lib/pingpong.c:230:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/pingpong.c:232:12: call_function: calling 'Curl_pp_vsendf' from 'Curl_pp_sendf'
#  175|   
#  176|     curlx_dyn_reset(&pp->sendbuf);
#  177|->   result = curlx_dyn_vaddf(&pp->sendbuf, fmt, args);
#  178|     if(result)
#  179|       return result;

Error: COMPILER_WARNING (CWE-704): [#def77]
curl-8.18.0/lib/pop3.c: scope_hint: In function 'pop3_state_servergreet_resp'
curl-8.18.0/lib/pop3.c:823:8: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  823 |     lt = memchr(line, '<', len);
#      |        ^
#  821|   
#  822|       /* Look for the APOP timestamp */
#  823|->     lt = memchr(line, '<', len);
#  824|       if(lt)
#  825|         /* search the remainder for '>' */

Error: COMPILER_WARNING (CWE-704): [#def78]
curl-8.18.0/lib/pop3.c:823:8: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  821|   
#  822|       /* Look for the APOP timestamp */
#  823|->     lt = memchr(line, '<', len);
#  824|       if(lt)
#  825|         /* search the remainder for '>' */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def79]
curl-8.18.0/lib/sendf.c:1130:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'r'
curl-8.18.0/lib/sendf.c:1384:10: enter_function: entry to 'Curl_creader_set_buf'
curl-8.18.0/lib/sendf.c:1391:12: call_function: calling 'Curl_creader_create' from 'Curl_creader_set_buf'
curl-8.18.0/lib/sendf.c:1391:12: return_function: returning to 'Curl_creader_set_buf' from 'Curl_creader_create'
curl-8.18.0/lib/sendf.c:1392:5: branch_false: following 'false' branch...
curl-8.18.0/lib/sendf.c:1394:10: branch_false: ...to here
curl-8.18.0/lib/sendf.c:1400:12: call_function: calling 'do_init_reader_stack' from 'Curl_creader_set_buf'
# 1128|     if(result)
# 1129|       goto out;
# 1130|->   ctx = r->ctx;
# 1131|     ctx->total_len = len;
# 1132|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def80]
curl-8.18.0/lib/setopt.c:606:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/setopt.c:2970:10: enter_function: entry to 'curl_easy_setopt'
curl-8.18.0/lib/setopt.c:2976:5: branch_false: following 'false' branch (when 'd' is non-NULL)...
curl-8.18.0/lib/setopt.c:2979:3: branch_false: ...to here
curl-8.18.0/lib/setopt.c:2979:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/setopt.c:2981:12: call_function: calling 'Curl_vsetopt' from 'curl_easy_setopt'
#  604|   
#  605|       /* Update the current connection proxy_ssl_config. */
#  606|->     Curl_ssl_conn_config_update(data, TRUE);
#  607|       break;
#  608|     case CURLOPT_PROXY_SSL_VERIFYHOST:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def81]
curl-8.18.0/lib/setopt.c:615:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/setopt.c:2970:10: enter_function: entry to 'curl_easy_setopt'
curl-8.18.0/lib/setopt.c:2976:5: branch_false: following 'false' branch (when 'd' is non-NULL)...
curl-8.18.0/lib/setopt.c:2979:3: branch_false: ...to here
curl-8.18.0/lib/setopt.c:2979:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/setopt.c:2981:12: call_function: calling 'Curl_vsetopt' from 'curl_easy_setopt'
#  613|       ok = 2;
#  614|       /* Update the current connection proxy_ssl_config. */
#  615|->     Curl_ssl_conn_config_update(data, TRUE);
#  616|       break;
#  617|     case CURLOPT_PROXY_TRANSFER_MODE:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def82]
curl-8.18.0/lib/setopt.c:703:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/setopt.c:2970:10: enter_function: entry to 'curl_easy_setopt'
curl-8.18.0/lib/setopt.c:2976:5: branch_false: following 'false' branch (when 'd' is non-NULL)...
curl-8.18.0/lib/setopt.c:2979:3: branch_false: ...to here
curl-8.18.0/lib/setopt.c:2979:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/setopt.c:2981:12: call_function: calling 'Curl_vsetopt' from 'curl_easy_setopt'
#  701|   
#  702|       /* Update the current connection ssl_config. */
#  703|->     Curl_ssl_conn_config_update(data, FALSE);
#  704|       break;
#  705|   #ifndef CURL_DISABLE_DOH

Error: GCC_ANALYZER_WARNING (CWE-404): [#def83]
curl-8.18.0/lib/setopt.c:723:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/setopt.c:2970:10: enter_function: entry to 'curl_easy_setopt'
curl-8.18.0/lib/setopt.c:2976:5: branch_false: following 'false' branch (when 'd' is non-NULL)...
curl-8.18.0/lib/setopt.c:2979:3: branch_false: ...to here
curl-8.18.0/lib/setopt.c:2979:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/setopt.c:2981:12: call_function: calling 'Curl_vsetopt' from 'curl_easy_setopt'
#  721|        * Enable certificate status verifying for DoH.
#  722|        */
#  723|->     if(!Curl_ssl_cert_status_request())
#  724|         return CURLE_NOT_BUILT_IN;
#  725|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def84]
curl-8.18.0/lib/setopt.c:742:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/setopt.c:2970:10: enter_function: entry to 'curl_easy_setopt'
curl-8.18.0/lib/setopt.c:2976:5: branch_false: following 'false' branch (when 'd' is non-NULL)...
curl-8.18.0/lib/setopt.c:2979:3: branch_false: ...to here
curl-8.18.0/lib/setopt.c:2979:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/setopt.c:2981:12: call_function: calling 'Curl_vsetopt' from 'curl_easy_setopt'
#  740|   
#  741|       /* Update the current connection ssl_config. */
#  742|->     Curl_ssl_conn_config_update(data, FALSE);
#  743|       break;
#  744|     case CURLOPT_SSL_VERIFYSTATUS:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def85]
curl-8.18.0/lib/setopt.c:748:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/setopt.c:2970:10: enter_function: entry to 'curl_easy_setopt'
curl-8.18.0/lib/setopt.c:2976:5: branch_false: following 'false' branch (when 'd' is non-NULL)...
curl-8.18.0/lib/setopt.c:2979:3: branch_false: ...to here
curl-8.18.0/lib/setopt.c:2979:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/setopt.c:2981:12: call_function: calling 'Curl_vsetopt' from 'curl_easy_setopt'
#  746|        * Enable certificate status verifying.
#  747|        */
#  748|->     if(!Curl_ssl_cert_status_request())
#  749|         return CURLE_NOT_BUILT_IN;
#  750|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def86]
curl-8.18.0/lib/setopt.c:754:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/setopt.c:2970:10: enter_function: entry to 'curl_easy_setopt'
curl-8.18.0/lib/setopt.c:2976:5: branch_false: following 'false' branch (when 'd' is non-NULL)...
curl-8.18.0/lib/setopt.c:2979:3: branch_false: ...to here
curl-8.18.0/lib/setopt.c:2979:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/setopt.c:2981:12: call_function: calling 'Curl_vsetopt' from 'curl_easy_setopt'
#  752|   
#  753|       /* Update the current connection ssl_config. */
#  754|->     Curl_ssl_conn_config_update(data, FALSE);
#  755|       break;
#  756|     case CURLOPT_CERTINFO:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def87]
curl-8.18.0/lib/setopt.c:758:8: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/lib/setopt.c:2970:10: enter_function: entry to 'curl_easy_setopt'
curl-8.18.0/lib/setopt.c:2976:5: branch_false: following 'false' branch (when 'd' is non-NULL)...
curl-8.18.0/lib/setopt.c:2979:3: branch_false: ...to here
curl-8.18.0/lib/setopt.c:2979:3: acquire_resource: 'va_start' called here
curl-8.18.0/lib/setopt.c:2981:12: call_function: calling 'Curl_vsetopt' from 'curl_easy_setopt'
#  756|     case CURLOPT_CERTINFO:
#  757|   #ifdef USE_SSL
#  758|->     if(Curl_ssl_supports(data, SSLSUPP_CERTINFO))
#  759|         s->ssl.certinfo = enabled;
#  760|       else

Error: CPPCHECK_WARNING (CWE-457): [#def88]
curl-8.18.0/lib/uint-hash.c:153: warning[uninitvar]: Uninitialized variable: *he_anchor
#  151|   
#  152|       he_anchor = CURL_UINT32_HASH_SLOT_ADDR(h, id);
#  153|->     while(*he_anchor) {
#  154|         he = *he_anchor;
#  155|         if(id == he->id) {

Error: COMPILER_WARNING (CWE-704): [#def89]
curl-8.18.0/lib/url.c: scope_hint: In function 'parse_connect_to_string'
curl-8.18.0/lib/url.c:2971:24: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 2971 |       char *ptr_next = strchr(ptr, ':');
#      |                        ^~~~~~
# 2969|       else {
# 2970|         /* check whether the URL's port matches */
# 2971|->       char *ptr_next = strchr(ptr, ':');
# 2972|         if(ptr_next) {
# 2973|           curl_off_t port_to_match;

Error: COMPILER_WARNING (CWE-704): [#def90]
curl-8.18.0/lib/url.c:2971:24: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 2969|       else {
# 2970|         /* check whether the URL's port matches */
# 2971|->       char *ptr_next = strchr(ptr, ':');
# 2972|         if(ptr_next) {
# 2973|           curl_off_t port_to_match;

Error: COMPILER_WARNING (CWE-704): [#def91]
curl-8.18.0/lib/urlapi.c: scope_hint: In function 'parse_hostname_login'
curl-8.18.0/lib/urlapi.c:351:7: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  351 |   ptr = memchr(login, '@', len);
#      |       ^
#  349|   
#  350|     *offset = 0;
#  351|->   ptr = memchr(login, '@', len);
#  352|     if(!ptr)
#  353|       goto out;

Error: COMPILER_WARNING (CWE-704): [#def92]
curl-8.18.0/lib/urlapi.c:351:7: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  349|   
#  350|     *offset = 0;
#  351|->   ptr = memchr(login, '@', len);
#  352|     if(!ptr)
#  353|       goto out;

Error: COMPILER_WARNING (CWE-704): [#def93]
curl-8.18.0/lib/urlapi.c: scope_hint: In function 'urldecode_host'
curl-8.18.0/lib/urlapi.c:660:7: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  660 |   per = strchr(hostname, '%');
#      |       ^
#  658|     char *per = NULL;
#  659|     const char *hostname = curlx_dyn_ptr(host);
#  660|->   per = strchr(hostname, '%');
#  661|     if(!per)
#  662|       /* nothing to decode */

Error: COMPILER_WARNING (CWE-704): [#def94]
curl-8.18.0/lib/urlapi.c:660:7: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  658|     char *per = NULL;
#  659|     const char *hostname = curlx_dyn_ptr(host);
#  660|->   per = strchr(hostname, '%');
#  661|     if(!per)
#  662|       /* nothing to decode */

Error: COMPILER_WARNING (CWE-704): [#def95]
curl-8.18.0/lib/urlapi.c: scope_hint: In function 'parseurl'
curl-8.18.0/lib/urlapi.c:1143:12: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1143 |   fragment = strchr(path, '#');
#      |            ^
# 1141|     }
# 1142|   
# 1143|->   fragment = strchr(path, '#');
# 1144|     if(fragment) {
# 1145|       fraglen = pathlen - (fragment - path);

Error: COMPILER_WARNING (CWE-704): [#def96]
curl-8.18.0/lib/urlapi.c:1143:12: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1141|     }
# 1142|   
# 1143|->   fragment = strchr(path, '#');
# 1144|     if(fragment) {
# 1145|       fraglen = pathlen - (fragment - path);

Error: COMPILER_WARNING (CWE-704): [#def97]
curl-8.18.0/lib/urlapi.c:1169:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1169 |   query = memchr(path, '?', pathlen);
#      |         ^
# 1167|     }
# 1168|   
# 1169|->   query = memchr(path, '?', pathlen);
# 1170|     if(query) {
# 1171|       size_t qlen = fragment ? (size_t)(fragment - query) :

Error: COMPILER_WARNING (CWE-704): [#def98]
curl-8.18.0/lib/urlapi.c:1169:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1167|     }
# 1168|   
# 1169|->   query = memchr(path, '?', pathlen);
# 1170|     if(query) {
# 1171|       size_t qlen = fragment ? (size_t)(fragment - query) :

Error: COMPILER_WARNING (CWE-704): [#def99]
curl-8.18.0/lib/vauth/vauth.c: scope_hint: In function 'Curl_auth_user_contains_domain'
curl-8.18.0/lib/vauth/vauth.c:120:15: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
#  120 |     char *p = strpbrk(user, "\\/@");
#      |               ^~~~~~~
#  118|     if(user && *user) {
#  119|       /* Check we have a domain name or UPN present */
#  120|->     char *p = strpbrk(user, "\\/@");
#  121|   
#  122|       valid = (p != NULL && p > user && p < user + strlen(user) - 1);

Error: COMPILER_WARNING (CWE-704): [#def100]
curl-8.18.0/lib/vauth/vauth.c:120:15: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
#  118|     if(user && *user) {
#  119|       /* Check we have a domain name or UPN present */
#  120|->     char *p = strpbrk(user, "\\/@");
#  121|   
#  122|       valid = (p != NULL && p > user && p < user + strlen(user) - 1);

Error: COMPILER_WARNING (CWE-704): [#def101]
curl-8.18.0/lib/vtls/vtls.c: scope_hint: In function 'pubkey_pem_to_der'
curl-8.18.0/lib/vtls/vtls.c:703:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  703 |   begin_pos = strstr(pem, "-----BEGIN PUBLIC KEY-----");
#      |             ^
#  701|     curlx_dyn_init(&pbuf, MAX_PINNED_PUBKEY_SIZE);
#  702|   
#  703|->   begin_pos = strstr(pem, "-----BEGIN PUBLIC KEY-----");
#  704|     if(!begin_pos)
#  705|       return CURLE_BAD_CONTENT_ENCODING;

Error: COMPILER_WARNING (CWE-704): [#def102]
curl-8.18.0/lib/vtls/vtls.c:703:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  701|     curlx_dyn_init(&pbuf, MAX_PINNED_PUBKEY_SIZE);
#  702|   
#  703|->   begin_pos = strstr(pem, "-----BEGIN PUBLIC KEY-----");
#  704|     if(!begin_pos)
#  705|       return CURLE_BAD_CONTENT_ENCODING;

Error: COMPILER_WARNING (CWE-704): [#def103]
curl-8.18.0/lib/vtls/vtls.c:716:11: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  716 |   end_pos = strstr(pem + pem_count, "\n-----END PUBLIC KEY-----");
#      |           ^
#  714|   
#  715|     /* Invalid if not directly following \n */
#  716|->   end_pos = strstr(pem + pem_count, "\n-----END PUBLIC KEY-----");
#  717|     if(!end_pos)
#  718|       return CURLE_BAD_CONTENT_ENCODING;

Error: COMPILER_WARNING (CWE-704): [#def104]
curl-8.18.0/lib/vtls/vtls.c:716:11: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  714|   
#  715|     /* Invalid if not directly following \n */
#  716|->   end_pos = strstr(pem + pem_count, "\n-----END PUBLIC KEY-----");
#  717|     if(!end_pos)
#  718|       return CURLE_BAD_CONTENT_ENCODING;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def105]
curl-8.18.0/lib/vtls/vtls.c:830:5: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_resource: opened here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:830:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/lib/vtls/vtls.c:830:5: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  828|         return result;
#  829|   
#  830|->     curlx_dyn_init(&buf, MAX_PINNED_PUBKEY_SIZE);
#  831|   
#  832|       /* Determine the file's size */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
curl-8.18.0/lib/vtls/vtls.c:830:5: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_memory: allocated here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:830:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/lib/vtls/vtls.c:830:5: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  828|         return result;
#  829|   
#  830|->     curlx_dyn_init(&buf, MAX_PINNED_PUBKEY_SIZE);
#  831|   
#  832|       /* Determine the file's size */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def107]
curl-8.18.0/lib/vtls/vtls.c:833:8: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_resource: opened here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:833:8: throw: if 'fseek' throws an exception...
curl-8.18.0/lib/vtls/vtls.c:833:8: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  831|   
#  832|       /* Determine the file's size */
#  833|->     if(fseek(fp, 0, SEEK_END))
#  834|         goto end;
#  835|       filesize = ftell(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
curl-8.18.0/lib/vtls/vtls.c:833:8: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_memory: allocated here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:833:8: throw: if 'fseek' throws an exception...
curl-8.18.0/lib/vtls/vtls.c:833:8: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  831|   
#  832|       /* Determine the file's size */
#  833|->     if(fseek(fp, 0, SEEK_END))
#  834|         goto end;
#  835|       filesize = ftell(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def109]
curl-8.18.0/lib/vtls/vtls.c:835:16: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_resource: opened here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:833:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:835:16: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:835:16: throw: if 'ftell' throws an exception...
curl-8.18.0/lib/vtls/vtls.c:835:16: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was opened at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  833|       if(fseek(fp, 0, SEEK_END))
#  834|         goto end;
#  835|->     filesize = ftell(fp);
#  836|       if(fseek(fp, 0, SEEK_SET))
#  837|         goto end;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
curl-8.18.0/lib/vtls/vtls.c:835:16: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_memory: allocated here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:833:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:835:16: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:835:16: throw: if 'ftell' throws an exception...
curl-8.18.0/lib/vtls/vtls.c:835:16: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  833|       if(fseek(fp, 0, SEEK_END))
#  834|         goto end;
#  835|->     filesize = ftell(fp);
#  836|       if(fseek(fp, 0, SEEK_SET))
#  837|         goto end;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def111]
curl-8.18.0/lib/vtls/vtls.c:836:8: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_resource: opened here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:833:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:835:16: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:836:8: throw: if 'fseek' throws an exception...
curl-8.18.0/lib/vtls/vtls.c:836:8: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was opened at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  834|         goto end;
#  835|       filesize = ftell(fp);
#  836|->     if(fseek(fp, 0, SEEK_SET))
#  837|         goto end;
#  838|       if(filesize < 0 || filesize > MAX_PINNED_PUBKEY_SIZE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def112]
curl-8.18.0/lib/vtls/vtls.c:836:8: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_memory: allocated here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:833:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:835:16: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:836:8: throw: if 'fseek' throws an exception...
curl-8.18.0/lib/vtls/vtls.c:836:8: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  834|         goto end;
#  835|       filesize = ftell(fp);
#  836|->     if(fseek(fp, 0, SEEK_SET))
#  837|         goto end;
#  838|       if(filesize < 0 || filesize > MAX_PINNED_PUBKEY_SIZE)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def113]
curl-8.18.0/lib/vtls/vtls.c:838:8: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_resource: opened here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:833:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:835:16: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:836:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:838:8: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:838:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:845:12: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:845:12: throw: if 'curlx_sotouz' throws an exception...
curl-8.18.0/lib/vtls/vtls.c:838:8: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was opened at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  836|       if(fseek(fp, 0, SEEK_SET))
#  837|         goto end;
#  838|->     if(filesize < 0 || filesize > MAX_PINNED_PUBKEY_SIZE)
#  839|         goto end;
#  840|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
curl-8.18.0/lib/vtls/vtls.c:838:8: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_memory: allocated here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:833:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:835:16: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:836:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:838:8: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:838:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:845:12: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:845:12: throw: if 'curlx_sotouz' throws an exception...
curl-8.18.0/lib/vtls/vtls.c:838:8: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  836|       if(fseek(fp, 0, SEEK_SET))
#  837|         goto end;
#  838|->     if(filesize < 0 || filesize > MAX_PINNED_PUBKEY_SIZE)
#  839|         goto end;
#  840|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def115]
curl-8.18.0/lib/vtls/vtls.c:886:5: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_resource: opened here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:886:5: throw: if 'curlx_dyn_free' throws an exception...
curl-8.18.0/lib/vtls/vtls.c:886:5: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was opened at [(7)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/6)
#  884|         result = CURLE_OK;
#  885|   end:
#  886|->     curlx_dyn_free(&buf);
#  887|       Curl_safefree(pem_ptr);
#  888|       curlx_fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
curl-8.18.0/lib/vtls/vtls.c:886:5: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_memory: allocated here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:886:5: throw: if 'curlx_dyn_free' throws an exception...
curl-8.18.0/lib/vtls/vtls.c:886:5: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was allocated at [(7)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/6)
#  884|         result = CURLE_OK;
#  885|   end:
#  886|->     curlx_dyn_free(&buf);
#  887|       Curl_safefree(pem_ptr);
#  888|       curlx_fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def117]
curl-8.18.0/lib/vtls/vtls.c:887:5: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_resource: opened here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:887:5: throw: if the called function throws an exception...
curl-8.18.0/lib/vtls/vtls.c:887:5: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was opened at [(7)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/6)
#  885|   end:
#  886|       curlx_dyn_free(&buf);
#  887|->     Curl_safefree(pem_ptr);
#  888|       curlx_fclose(fp);
#  889|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
curl-8.18.0/lib/vtls/vtls.c:887:5: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(pinnedpubkey, "rb")'
curl-8.18.0/lib/vtls/vtls.c:760:5: branch_false: following 'false' branch (when 'pinnedpubkey' is non-NULL)...
curl-8.18.0/lib/vtls/vtls.c:762:6: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:762:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:766:7: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:766:5: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:824:20: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:826:16: acquire_memory: allocated here
curl-8.18.0/lib/vtls/vtls.c:827:7: branch_false: following 'false' branch...
curl-8.18.0/lib/vtls/vtls.c:830:5: branch_false: ...to here
curl-8.18.0/lib/vtls/vtls.c:887:5: throw: if the called function throws an exception...
curl-8.18.0/lib/vtls/vtls.c:887:5: danger: 'fopen(pinnedpubkey, "rb")' leaks here; was allocated at [(7)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/6)
#  885|   end:
#  886|       curlx_dyn_free(&buf);
#  887|->     Curl_safefree(pem_ptr);
#  888|       curlx_fclose(fp);
#  889|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
curl-8.18.0/src/tool_cfgable.c:55:3: warning[-Wanalyzer-malloc-leak]: leak of 'config'
curl-8.18.0/src/tool_cfgable.c:39:5: acquire_memory: allocated here
curl-8.18.0/src/tool_cfgable.c:40:5: branch_false: following 'false' branch (when 'config' is non-NULL)...
curl-8.18.0/src/tool_cfgable.c:44:3: branch_false: ...to here
curl-8.18.0/src/tool_cfgable.c:55:3: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/src/tool_cfgable.c:55:3: danger: 'config' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   53|     config->file_clobber_mode = CLOBBER_DEFAULT;
#   54|     config->upload_flags = CURLULFLAG_SEEN;
#   55|->   curlx_dyn_init(&config->postdata, MAX_FILE2MEMORY);
#   56|     return config;
#   57|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
curl-8.18.0/src/tool_cfgable.c:55:3: warning[-Wanalyzer-malloc-leak]: leak of ‘config’
curl-8.18.0/src/tool_cfgable.c:39:5: acquire_memory: allocated here
curl-8.18.0/src/tool_cfgable.c:40:5: branch_false: following ‘false’ branch (when ‘config’ is non-NULL)...
curl-8.18.0/src/tool_cfgable.c:44:3: branch_false: ...to here
curl-8.18.0/src/tool_cfgable.c:55:3: throw: if ‘curlx_dyn_init’ throws an exception...
curl-8.18.0/src/tool_cfgable.c:55:3: danger: ‘config’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   53|     config->file_clobber_mode = CLOBBER_DEFAULT;
#   54|     config->upload_flags = CURLULFLAG_SEEN;
#   55|->   curlx_dyn_init(&config->postdata, MAX_FILE2MEMORY);
#   56|     return config;
#   57|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def121]
curl-8.18.0/src/tool_easysrc.c:110:10: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_easysrc.c:109:3: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_easysrc.c:110:10: throw: if 'curl_mvaprintf' throws an exception...
curl-8.18.0/src/tool_easysrc.c:110:10: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  108|     va_list ap;
#  109|     va_start(ap, fmt);
#  110|->   bufp = curl_mvaprintf(fmt, ap);
#  111|     va_end(ap);
#  112|     if(!bufp) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def122]
curl-8.18.0/src/tool_easysrc.c:110:10: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_easysrc.c:109:3: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_easysrc.c:110:10: throw: if ‘curl_mvaprintf’ throws an exception...
curl-8.18.0/src/tool_easysrc.c:110:10: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  108|     va_list ap;
#  109|     va_start(ap, fmt);
#  110|->   bufp = curl_mvaprintf(fmt, ap);
#  111|     va_end(ap);
#  112|     if(!bufp) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def123]
curl-8.18.0/src/tool_easysrc.c:191:7: warning[-Wanalyzer-file-leak]: leak of FILE 'out'
curl-8.18.0/src/tool_easysrc.c:178:5: branch_true: following 'true' branch (when the strings are non-equal)...
curl-8.18.0/src/tool_easysrc.c:179:11: branch_true: ...to here
curl-8.18.0/src/tool_easysrc.c:179:11: acquire_resource: opened here
curl-8.18.0/src/tool_easysrc.c:184:5: branch_false: following 'false' branch (when 'out' is non-NULL)...
curl-8.18.0/src/tool_easysrc.c:184:5: branch_false: ...to here
curl-8.18.0/src/tool_easysrc.c:190:16: branch_true: following 'true' branch (when 'c' is non-NULL)...
curl-8.18.0/src/tool_easysrc.c:191:7: branch_true: ...to here
curl-8.18.0/src/tool_easysrc.c:191:7: throw: if 'curl_mfprintf' throws an exception...
curl-8.18.0/src/tool_easysrc.c:191:7: danger: 'out' leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  189|   
#  190|       for(i = 0; ((c = srchead[i]) != NULL); i++)
#  191|->       curl_mfprintf(out, "%s\n", c);
#  192|   
#  193|       /* Declare variables used for complex setopt values */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def124]
curl-8.18.0/src/tool_easysrc.c:191:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘out’
curl-8.18.0/src/tool_easysrc.c:178:5: branch_true: following ‘true’ branch (when the strings are non-equal)...
curl-8.18.0/src/tool_easysrc.c:179:11: branch_true: ...to here
curl-8.18.0/src/tool_easysrc.c:179:11: acquire_resource: opened here
curl-8.18.0/src/tool_easysrc.c:184:5: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
curl-8.18.0/src/tool_easysrc.c:184:5: branch_false: ...to here
curl-8.18.0/src/tool_easysrc.c:190:16: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
curl-8.18.0/src/tool_easysrc.c:191:7: branch_true: ...to here
curl-8.18.0/src/tool_easysrc.c:191:7: throw: if ‘curl_mfprintf’ throws an exception...
curl-8.18.0/src/tool_easysrc.c:191:7: danger: ‘out’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  189|   
#  190|       for(i = 0; ((c = srchead[i]) != NULL); i++)
#  191|->       curl_mfprintf(out, "%s\n", c);
#  192|   
#  193|       /* Declare variables used for complex setopt values */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
curl-8.18.0/src/tool_easysrc.c:191:7: warning[-Wanalyzer-malloc-leak]: leak of 'out'
curl-8.18.0/src/tool_easysrc.c:178:5: branch_true: following 'true' branch (when the strings are non-equal)...
curl-8.18.0/src/tool_easysrc.c:179:11: branch_true: ...to here
curl-8.18.0/src/tool_easysrc.c:179:11: acquire_memory: allocated here
curl-8.18.0/src/tool_easysrc.c:184:5: branch_false: following 'false' branch (when 'out' is non-NULL)...
curl-8.18.0/src/tool_easysrc.c:184:5: branch_false: ...to here
curl-8.18.0/src/tool_easysrc.c:190:16: branch_true: following 'true' branch (when 'c' is non-NULL)...
curl-8.18.0/src/tool_easysrc.c:191:7: branch_true: ...to here
curl-8.18.0/src/tool_easysrc.c:191:7: throw: if 'curl_mfprintf' throws an exception...
curl-8.18.0/src/tool_easysrc.c:191:7: danger: 'out' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  189|   
#  190|       for(i = 0; ((c = srchead[i]) != NULL); i++)
#  191|->       curl_mfprintf(out, "%s\n", c);
#  192|   
#  193|       /* Declare variables used for complex setopt values */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
curl-8.18.0/src/tool_easysrc.c:191:7: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
curl-8.18.0/src/tool_easysrc.c:178:5: branch_true: following ‘true’ branch (when the strings are non-equal)...
curl-8.18.0/src/tool_easysrc.c:179:11: branch_true: ...to here
curl-8.18.0/src/tool_easysrc.c:179:11: acquire_memory: allocated here
curl-8.18.0/src/tool_easysrc.c:184:5: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
curl-8.18.0/src/tool_easysrc.c:184:5: branch_false: ...to here
curl-8.18.0/src/tool_easysrc.c:190:16: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
curl-8.18.0/src/tool_easysrc.c:191:7: branch_true: ...to here
curl-8.18.0/src/tool_easysrc.c:191:7: throw: if ‘curl_mfprintf’ throws an exception...
curl-8.18.0/src/tool_easysrc.c:191:7: danger: ‘out’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  189|   
#  190|       for(i = 0; ((c = srchead[i]) != NULL); i++)
#  191|->       curl_mfprintf(out, "%s\n", c);
#  192|   
#  193|       /* Declare variables used for complex setopt values */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def127]
curl-8.18.0/src/tool_findfile.c:77:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(c, 0)'
curl-8.18.0/src/tool_findfile.c:67:14: branch_true: following 'true' branch...
curl-8.18.0/src/tool_findfile.c:69:7: branch_true: ...to here
curl-8.18.0/src/tool_findfile.c:74:16: acquire_resource: opened here
curl-8.18.0/src/tool_findfile.c:77:9: danger: 'open(c, 0)' leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   75|         if(fd >= 0) {
#   76|           char *path = curlx_strdup(c);
#   77|->         close(fd);
#   78|           curl_free(c);
#   79|           return path;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def128]
curl-8.18.0/src/tool_findfile.c:77:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(c, 0)’
curl-8.18.0/src/tool_findfile.c:67:14: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_findfile.c:69:7: branch_true: ...to here
curl-8.18.0/src/tool_findfile.c:74:16: acquire_resource: opened here
curl-8.18.0/src/tool_findfile.c:77:9: danger: ‘open(c, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   75|         if(fd >= 0) {
#   76|           char *path = curlx_strdup(c);
#   77|->         close(fd);
#   78|           curl_free(c);
#   79|           return path;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
curl-8.18.0/src/tool_findfile.c:77:9: warning[-Wanalyzer-malloc-leak]: leak of 'path'
curl-8.18.0/src/tool_findfile.c:67:14: branch_true: following 'true' branch...
curl-8.18.0/src/tool_findfile.c:69:7: branch_true: ...to here
curl-8.18.0/src/tool_findfile.c:76:22: acquire_memory: allocated here
curl-8.18.0/src/tool_findfile.c:77:9: throw: if 'close' throws an exception...
curl-8.18.0/src/tool_findfile.c:77:9: danger: 'path' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   75|         if(fd >= 0) {
#   76|           char *path = curlx_strdup(c);
#   77|->         close(fd);
#   78|           curl_free(c);
#   79|           return path;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
curl-8.18.0/src/tool_findfile.c:77:9: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
curl-8.18.0/src/tool_findfile.c:67:14: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_findfile.c:69:7: branch_true: ...to here
curl-8.18.0/src/tool_findfile.c:76:22: acquire_memory: allocated here
curl-8.18.0/src/tool_findfile.c:77:9: throw: if ‘close’ throws an exception...
curl-8.18.0/src/tool_findfile.c:77:9: danger: ‘path’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   75|         if(fd >= 0) {
#   76|           char *path = curlx_strdup(c);
#   77|->         close(fd);
#   78|           curl_free(c);
#   79|           return path;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
curl-8.18.0/src/tool_findfile.c:78:9: warning[-Wanalyzer-malloc-leak]: leak of 'path'
curl-8.18.0/src/tool_findfile.c:67:14: branch_true: following 'true' branch...
curl-8.18.0/src/tool_findfile.c:69:7: branch_true: ...to here
curl-8.18.0/src/tool_findfile.c:76:22: acquire_memory: allocated here
curl-8.18.0/src/tool_findfile.c:78:9: throw: if 'curl_free' throws an exception...
curl-8.18.0/src/tool_findfile.c:78:9: danger: 'path' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   76|           char *path = curlx_strdup(c);
#   77|           close(fd);
#   78|->         curl_free(c);
#   79|           return path;
#   80|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
curl-8.18.0/src/tool_findfile.c:78:9: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
curl-8.18.0/src/tool_findfile.c:67:14: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_findfile.c:69:7: branch_true: ...to here
curl-8.18.0/src/tool_findfile.c:76:22: acquire_memory: allocated here
curl-8.18.0/src/tool_findfile.c:78:9: throw: if ‘curl_free’ throws an exception...
curl-8.18.0/src/tool_findfile.c:78:9: danger: ‘path’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   76|           char *path = curlx_strdup(c);
#   77|           close(fd);
#   78|->         curl_free(c);
#   79|           return path;
#   80|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
curl-8.18.0/src/tool_formparse.c:508:18: warning[-Wanalyzer-malloc-leak]: leak of 'contents'
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to 'formparse'
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following 'false' branch (when 'contents' is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_false: following 'false' branch...
curl-8.18.0/src/tool_formparse.c:752:6: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:754:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:754:8: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:754:8: branch_false: following 'false' branch (when 'literal_value == 0')...
curl-8.18.0/src/tool_formparse.c:756:13: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:756:13: call_function: calling 'get_param_part' from 'formparse'
#  506|         ;
#  507|   
#  508|->     if(!endct && checkprefix("type=", p)) {
#  509|         size_t tlen;
#  510|         for(p += 5; ISBLANK(*p); p++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
curl-8.18.0/src/tool_formparse.c:508:18: warning[-Wanalyzer-malloc-leak]: leak of 'name'
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to 'formparse'
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following 'false' branch (when 'contents' is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:767:12: branch_false: following 'false' branch (when 'name' is non-NULL)...
curl-8.18.0/src/tool_formparse.c:775:12: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:829:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:829:10: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:829:10: branch_false: following 'false' branch (when 'literal_value == 0')...
curl-8.18.0/src/tool_formparse.c:830:9: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:831:15: call_function: calling 'get_param_part' from 'formparse'
#  506|         ;
#  507|   
#  508|->     if(!endct && checkprefix("type=", p)) {
#  509|         size_t tlen;
#  510|         for(p += 5; ISBLANK(*p); p++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
curl-8.18.0/src/tool_formparse.c:508:18: warning[-Wanalyzer-malloc-leak]: leak of ‘contents’
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to ‘formparse’
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following ‘false’ branch (when ‘contents’ is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_formparse.c:752:6: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:754:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:754:8: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:754:8: branch_false: following ‘false’ branch (when ‘literal_value == 0’)...
curl-8.18.0/src/tool_formparse.c:756:13: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:756:13: call_function: calling ‘get_param_part’ from ‘formparse’
#  506|         ;
#  507|   
#  508|->     if(!endct && checkprefix("type=", p)) {
#  509|         size_t tlen;
#  510|         for(p += 5; ISBLANK(*p); p++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
curl-8.18.0/src/tool_formparse.c:508:18: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to ‘formparse’
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following ‘false’ branch (when ‘contents’ is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:767:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
curl-8.18.0/src/tool_formparse.c:775:12: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:829:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:829:10: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:829:10: branch_false: following ‘false’ branch (when ‘literal_value == 0’)...
curl-8.18.0/src/tool_formparse.c:830:9: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:831:15: call_function: calling ‘get_param_part’ from ‘formparse’
#  506|         ;
#  507|   
#  508|->     if(!endct && checkprefix("type=", p)) {
#  509|         size_t tlen;
#  510|         for(p += 5; ISBLANK(*p); p++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
curl-8.18.0/src/tool_formparse.c:521:13: warning[-Wanalyzer-malloc-leak]: leak of 'contents'
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to 'formparse'
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following 'false' branch (when 'contents' is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_false: following 'false' branch...
curl-8.18.0/src/tool_formparse.c:752:6: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:754:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:754:8: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:754:8: branch_false: following 'false' branch (when 'literal_value == 0')...
curl-8.18.0/src/tool_formparse.c:756:13: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:756:13: call_function: calling 'get_param_part' from 'formparse'
#  519|         sep = *p;
#  520|       }
#  521|->     else if(checkprefix("filename=", p)) {
#  522|         if(endct) {
#  523|           *endct = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
curl-8.18.0/src/tool_formparse.c:521:13: warning[-Wanalyzer-malloc-leak]: leak of 'name'
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to 'formparse'
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following 'false' branch (when 'contents' is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:767:12: branch_false: following 'false' branch (when 'name' is non-NULL)...
curl-8.18.0/src/tool_formparse.c:775:12: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:829:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:829:10: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:829:10: branch_false: following 'false' branch (when 'literal_value == 0')...
curl-8.18.0/src/tool_formparse.c:830:9: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:831:15: call_function: calling 'get_param_part' from 'formparse'
#  519|         sep = *p;
#  520|       }
#  521|->     else if(checkprefix("filename=", p)) {
#  522|         if(endct) {
#  523|           *endct = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
curl-8.18.0/src/tool_formparse.c:521:13: warning[-Wanalyzer-malloc-leak]: leak of ‘contents’
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to ‘formparse’
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following ‘false’ branch (when ‘contents’ is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_formparse.c:752:6: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:754:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:754:8: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:754:8: branch_false: following ‘false’ branch (when ‘literal_value == 0’)...
curl-8.18.0/src/tool_formparse.c:756:13: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:756:13: call_function: calling ‘get_param_part’ from ‘formparse’
#  519|         sep = *p;
#  520|       }
#  521|->     else if(checkprefix("filename=", p)) {
#  522|         if(endct) {
#  523|           *endct = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
curl-8.18.0/src/tool_formparse.c:521:13: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to ‘formparse’
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following ‘false’ branch (when ‘contents’ is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:767:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
curl-8.18.0/src/tool_formparse.c:775:12: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:829:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:829:10: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:829:10: branch_false: following ‘false’ branch (when ‘literal_value == 0’)...
curl-8.18.0/src/tool_formparse.c:830:9: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:831:15: call_function: calling ‘get_param_part’ from ‘formparse’
#  519|         sep = *p;
#  520|       }
#  521|->     else if(checkprefix("filename=", p)) {
#  522|         if(endct) {
#  523|           *endct = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
curl-8.18.0/src/tool_formparse.c:537:13: warning[-Wanalyzer-malloc-leak]: leak of 'contents'
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to 'formparse'
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following 'false' branch (when 'contents' is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_false: following 'false' branch...
curl-8.18.0/src/tool_formparse.c:752:6: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:754:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:754:8: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:754:8: branch_false: following 'false' branch (when 'literal_value == 0')...
curl-8.18.0/src/tool_formparse.c:756:13: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:756:13: call_function: calling 'get_param_part' from 'formparse'
#  535|         *endpos = '\0';
#  536|       }
#  537|->     else if(checkprefix("headers=", p)) {
#  538|         if(endct) {
#  539|           *endct = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
curl-8.18.0/src/tool_formparse.c:537:13: warning[-Wanalyzer-malloc-leak]: leak of 'name'
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to 'formparse'
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following 'false' branch (when 'contents' is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:767:12: branch_false: following 'false' branch (when 'name' is non-NULL)...
curl-8.18.0/src/tool_formparse.c:775:12: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:829:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:829:10: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:829:10: branch_false: following 'false' branch (when 'literal_value == 0')...
curl-8.18.0/src/tool_formparse.c:830:9: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:831:15: call_function: calling 'get_param_part' from 'formparse'
#  535|         *endpos = '\0';
#  536|       }
#  537|->     else if(checkprefix("headers=", p)) {
#  538|         if(endct) {
#  539|           *endct = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
curl-8.18.0/src/tool_formparse.c:537:13: warning[-Wanalyzer-malloc-leak]: leak of ‘contents’
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to ‘formparse’
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following ‘false’ branch (when ‘contents’ is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_formparse.c:752:6: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:754:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:754:8: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:754:8: branch_false: following ‘false’ branch (when ‘literal_value == 0’)...
curl-8.18.0/src/tool_formparse.c:756:13: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:756:13: call_function: calling ‘get_param_part’ from ‘formparse’
#  535|         *endpos = '\0';
#  536|       }
#  537|->     else if(checkprefix("headers=", p)) {
#  538|         if(endct) {
#  539|           *endct = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
curl-8.18.0/src/tool_formparse.c:537:13: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to ‘formparse’
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following ‘false’ branch (when ‘contents’ is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:767:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
curl-8.18.0/src/tool_formparse.c:775:12: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:829:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:829:10: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:829:10: branch_false: following ‘false’ branch (when ‘literal_value == 0’)...
curl-8.18.0/src/tool_formparse.c:830:9: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:831:15: call_function: calling ‘get_param_part’ from ‘formparse’
#  535|         *endpos = '\0';
#  536|       }
#  537|->     else if(checkprefix("headers=", p)) {
#  538|         if(endct) {
#  539|           *endct = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def145]
curl-8.18.0/src/tool_formparse.c:594:13: warning[-Wanalyzer-malloc-leak]: leak of 'contents'
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to 'formparse'
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following 'false' branch (when 'contents' is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_false: following 'false' branch...
curl-8.18.0/src/tool_formparse.c:752:6: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:754:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:754:8: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:754:8: branch_false: following 'false' branch (when 'literal_value == 0')...
curl-8.18.0/src/tool_formparse.c:756:13: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:756:13: call_function: calling 'get_param_part' from 'formparse'
#  592|         }
#  593|       }
#  594|->     else if(checkprefix("encoder=", p)) {
#  595|         if(endct) {
#  596|           *endct = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
curl-8.18.0/src/tool_formparse.c:594:13: warning[-Wanalyzer-malloc-leak]: leak of 'name'
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to 'formparse'
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following 'false' branch (when 'contents' is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:767:12: branch_false: following 'false' branch (when 'name' is non-NULL)...
curl-8.18.0/src/tool_formparse.c:775:12: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:829:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:829:10: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:829:10: branch_false: following 'false' branch (when 'literal_value == 0')...
curl-8.18.0/src/tool_formparse.c:830:9: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:831:15: call_function: calling 'get_param_part' from 'formparse'
#  592|         }
#  593|       }
#  594|->     else if(checkprefix("encoder=", p)) {
#  595|         if(endct) {
#  596|           *endct = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
curl-8.18.0/src/tool_formparse.c:594:13: warning[-Wanalyzer-malloc-leak]: leak of ‘contents’
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to ‘formparse’
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following ‘false’ branch (when ‘contents’ is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_formparse.c:752:6: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:754:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:754:8: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:754:8: branch_false: following ‘false’ branch (when ‘literal_value == 0’)...
curl-8.18.0/src/tool_formparse.c:756:13: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:756:13: call_function: calling ‘get_param_part’ from ‘formparse’
#  592|         }
#  593|       }
#  594|->     else if(checkprefix("encoder=", p)) {
#  595|         if(endct) {
#  596|           *endct = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
curl-8.18.0/src/tool_formparse.c:594:13: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
curl-8.18.0/src/tool_formparse.c:714:5: enter_function: entry to ‘formparse’
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following ‘false’ branch (when ‘contents’ is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:767:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
curl-8.18.0/src/tool_formparse.c:775:12: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:829:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:829:10: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:829:10: branch_false: following ‘false’ branch (when ‘literal_value == 0’)...
curl-8.18.0/src/tool_formparse.c:830:9: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:831:15: call_function: calling ‘get_param_part’ from ‘formparse’
#  592|         }
#  593|       }
#  594|->     else if(checkprefix("encoder=", p)) {
#  595|         if(endct) {
#  596|           *endct = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
curl-8.18.0/src/tool_formparse.c:770:9: warning[-Wanalyzer-malloc-leak]: leak of 'contents'
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following 'false' branch (when 'contents' is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_false: following 'false' branch...
curl-8.18.0/src/tool_formparse.c:752:6: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:767:12: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:767:13: branch_false: following 'false' branch (when 'literal_value == 0')...
curl-8.18.0/src/tool_formparse.c:769:10: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:769:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_formparse.c:770:9: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:770:9: throw: if 'warnf' throws an exception...
curl-8.18.0/src/tool_formparse.c:770:9: danger: 'contents' leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  768|         /* Ending a multipart. */
#  769|         if(*mimecurrent == *mimeroot) {
#  770|->         warnf("no multipart to terminate");
#  771|           goto fail;
#  772|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
curl-8.18.0/src/tool_formparse.c:770:9: warning[-Wanalyzer-malloc-leak]: leak of ‘contents’
curl-8.18.0/src/tool_formparse.c:742:14: acquire_memory: allocated here
curl-8.18.0/src/tool_formparse.c:743:5: branch_false: following ‘false’ branch (when ‘contents’ is non-NULL)...
curl-8.18.0/src/tool_formparse.c:747:11: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:748:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:750:7: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:750:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_formparse.c:752:6: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:767:12: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:767:13: branch_false: following ‘false’ branch (when ‘literal_value == 0’)...
curl-8.18.0/src/tool_formparse.c:769:10: branch_false: ...to here
curl-8.18.0/src/tool_formparse.c:769:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_formparse.c:770:9: branch_true: ...to here
curl-8.18.0/src/tool_formparse.c:770:9: throw: if ‘warnf’ throws an exception...
curl-8.18.0/src/tool_formparse.c:770:9: danger: ‘contents’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  768|         /* Ending a multipart. */
#  769|         if(*mimecurrent == *mimeroot) {
#  770|->         warnf("no multipart to terminate");
#  771|           goto fail;
#  772|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def151]
curl-8.18.0/src/tool_getparam.c:651:11: warning[-Wanalyzer-file-leak]: leak of FILE 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
#  649|       }
#  650|   
#  651|->     err = file2memory(&postdata, &size, file);
#  652|   
#  653|       if(file && (file != stdin))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def152]
curl-8.18.0/src/tool_getparam.c:651:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
#  649|       }
#  650|   
#  651|->     err = file2memory(&postdata, &size, file);
#  652|   
#  653|       if(file && (file != stdin))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
curl-8.18.0/src/tool_getparam.c:651:11: warning[-Wanalyzer-malloc-leak]: leak of 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
#  649|       }
#  650|   
#  651|->     err = file2memory(&postdata, &size, file);
#  652|   
#  653|       if(file && (file != stdin))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
curl-8.18.0/src/tool_getparam.c:651:11: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
#  649|       }
#  650|   
#  651|->     err = file2memory(&postdata, &size, file);
#  652|   
#  653|       if(file && (file != stdin))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
curl-8.18.0/src/tool_getparam.c:674:17: warning[-Wanalyzer-malloc-leak]: leak of 'postdata'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
#  672|     }
#  673|     else {
#  674|->     char *enc = curl_easy_escape(NULL, postdata, (int)size);
#  675|       tool_safefree(postdata); /* no matter if it worked or not */
#  676|       if(enc) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
curl-8.18.0/src/tool_getparam.c:674:17: warning[-Wanalyzer-malloc-leak]: leak of ‘postdata’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
#  672|     }
#  673|     else {
#  674|->     char *enc = curl_easy_escape(NULL, postdata, (int)size);
#  675|       tool_safefree(postdata); /* no matter if it worked or not */
#  676|       if(enc) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
curl-8.18.0/src/tool_getparam.c:878:25: warning[-Wanalyzer-malloc-leak]: leak of 'query'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
#  876|     if(!err) {
#  877|       if(config->query) {
#  878|->       CURLcode result = curlx_dyn_addf(&dyn, "%s&%s", config->query, query);
#  879|         curlx_free(query);
#  880|         if(result)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def158]
curl-8.18.0/src/tool_getparam.c:878:25: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
#  876|     if(!err) {
#  877|       if(config->query) {
#  878|->       CURLcode result = curlx_dyn_addf(&dyn, "%s&%s", config->query, query);
#  879|         curlx_free(query);
#  880|         if(result)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def159]
curl-8.18.0/src/tool_getparam.c:928:13: warning[-Wanalyzer-file-leak]: leak of FILE 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
#  926|          (cmd == C_JSON) /* --json */)
#  927|         /* forced binary */
#  928|->       err = file2memory(&postdata, &size, file);
#  929|       else {
#  930|         err = file2string(&postdata, file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def160]
curl-8.18.0/src/tool_getparam.c:928:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
#  926|          (cmd == C_JSON) /* --json */)
#  927|         /* forced binary */
#  928|->       err = file2memory(&postdata, &size, file);
#  929|       else {
#  930|         err = file2string(&postdata, file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
curl-8.18.0/src/tool_getparam.c:928:13: warning[-Wanalyzer-malloc-leak]: leak of 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
#  926|          (cmd == C_JSON) /* --json */)
#  927|         /* forced binary */
#  928|->       err = file2memory(&postdata, &size, file);
#  929|       else {
#  930|         err = file2string(&postdata, file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
curl-8.18.0/src/tool_getparam.c:928:13: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
#  926|          (cmd == C_JSON) /* --json */)
#  927|         /* forced binary */
#  928|->       err = file2memory(&postdata, &size, file);
#  929|       else {
#  930|         err = file2string(&postdata, file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def163]
curl-8.18.0/src/tool_getparam.c:930:13: warning[-Wanalyzer-file-leak]: leak of FILE 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
#  928|         err = file2memory(&postdata, &size, file);
#  929|       else {
#  930|->       err = file2string(&postdata, file);
#  931|         if(postdata)
#  932|           size = strlen(postdata);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def164]
curl-8.18.0/src/tool_getparam.c:930:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
#  928|         err = file2memory(&postdata, &size, file);
#  929|       else {
#  930|->       err = file2string(&postdata, file);
#  931|         if(postdata)
#  932|           size = strlen(postdata);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
curl-8.18.0/src/tool_getparam.c:930:13: warning[-Wanalyzer-malloc-leak]: leak of 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
#  928|         err = file2memory(&postdata, &size, file);
#  929|       else {
#  930|->       err = file2string(&postdata, file);
#  931|         if(postdata)
#  932|           size = strlen(postdata);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
curl-8.18.0/src/tool_getparam.c:930:13: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
#  928|         err = file2memory(&postdata, &size, file);
#  929|       else {
#  930|->       err = file2string(&postdata, file);
#  931|         if(postdata)
#  932|           size = strlen(postdata);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
curl-8.18.0/src/tool_getparam.c:957:6: warning[-Wanalyzer-malloc-leak]: leak of 'postdata'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
#  955|       config->jsoned = TRUE;
#  956|   
#  957|->   if(curlx_dyn_len(&config->postdata)) {
#  958|       /* skip separator append for --json */
#  959|       if(!err && (cmd != C_JSON) &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
curl-8.18.0/src/tool_getparam.c:957:6: warning[-Wanalyzer-malloc-leak]: leak of ‘postdata’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
#  955|       config->jsoned = TRUE;
#  956|   
#  957|->   if(curlx_dyn_len(&config->postdata)) {
#  958|       /* skip separator append for --json */
#  959|       if(!err && (cmd != C_JSON) &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
curl-8.18.0/src/tool_getparam.c:960:8: warning[-Wanalyzer-malloc-leak]: leak of 'postdata'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
#  958|       /* skip separator append for --json */
#  959|       if(!err && (cmd != C_JSON) &&
#  960|->        curlx_dyn_addn(&config->postdata, "&", 1))
#  961|         err = PARAM_NO_MEM;
#  962|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
curl-8.18.0/src/tool_getparam.c:960:8: warning[-Wanalyzer-malloc-leak]: leak of ‘postdata’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
#  958|       /* skip separator append for --json */
#  959|       if(!err && (cmd != C_JSON) &&
#  960|->        curlx_dyn_addn(&config->postdata, "&", 1))
#  961|         err = PARAM_NO_MEM;
#  962|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def171]
curl-8.18.0/src/tool_getparam.c:964:14: warning[-Wanalyzer-malloc-leak]: leak of 'postdata'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
#  962|     }
#  963|   
#  964|->   if(!err && curlx_dyn_addn(&config->postdata, postdata, size))
#  965|       err = PARAM_NO_MEM;
#  966|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def172]
curl-8.18.0/src/tool_getparam.c:964:14: warning[-Wanalyzer-malloc-leak]: leak of ‘postdata’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
#  962|     }
#  963|   
#  964|->   if(!err && curlx_dyn_addn(&config->postdata, postdata, size))
#  965|       err = PARAM_NO_MEM;
#  966|   

Error: CPPCHECK_WARNING (CWE-457): [#def173]
curl-8.18.0/src/tool_getparam.c:1043: error[uninitvar]: Uninitialized variables: &key.desc, &key.letter, &key.cmd
# 1041|     key.lname = opt;
# 1042|   
# 1043|->   return bsearch(&key, aliases, CURL_ARRAYSIZE(aliases),
# 1044|                    sizeof(aliases[0]), findarg);
# 1045|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def174]
curl-8.18.0/src/tool_getparam.c:1107:7: warning[-Wanalyzer-file-leak]: leak of FILE 'f'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
# 1105|         f = curlx_fopen(&nextarg[1], FOPEN_READTEXT);
# 1106|       if(f) {
# 1107|->       curlx_dyn_init(&line, 8092);
# 1108|         while(my_get_line(f, &line, &error)) {
# 1109|           const char *ptr = curlx_dyn_ptr(&line);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def175]
curl-8.18.0/src/tool_getparam.c:1107:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
# 1105|         f = curlx_fopen(&nextarg[1], FOPEN_READTEXT);
# 1106|       if(f) {
# 1107|->       curlx_dyn_init(&line, 8092);
# 1108|         while(my_get_line(f, &line, &error)) {
# 1109|           const char *ptr = curlx_dyn_ptr(&line);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def176]
curl-8.18.0/src/tool_getparam.c:1107:7: warning[-Wanalyzer-malloc-leak]: leak of 'f'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
# 1105|         f = curlx_fopen(&nextarg[1], FOPEN_READTEXT);
# 1106|       if(f) {
# 1107|->       curlx_dyn_init(&line, 8092);
# 1108|         while(my_get_line(f, &line, &error)) {
# 1109|           const char *ptr = curlx_dyn_ptr(&line);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
curl-8.18.0/src/tool_getparam.c:1107:7: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
# 1105|         f = curlx_fopen(&nextarg[1], FOPEN_READTEXT);
# 1106|       if(f) {
# 1107|->       curlx_dyn_init(&line, 8092);
# 1108|         while(my_get_line(f, &line, &error)) {
# 1109|           const char *ptr = curlx_dyn_ptr(&line);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def178]
curl-8.18.0/src/tool_getparam.c:1108:13: warning[-Wanalyzer-file-leak]: leak of FILE 'f'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
# 1106|       if(f) {
# 1107|         curlx_dyn_init(&line, 8092);
# 1108|->       while(my_get_line(f, &line, &error)) {
# 1109|           const char *ptr = curlx_dyn_ptr(&line);
# 1110|           err = add_url(config, ptr, TRUE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def179]
curl-8.18.0/src/tool_getparam.c:1108:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
# 1106|       if(f) {
# 1107|         curlx_dyn_init(&line, 8092);
# 1108|->       while(my_get_line(f, &line, &error)) {
# 1109|           const char *ptr = curlx_dyn_ptr(&line);
# 1110|           err = add_url(config, ptr, TRUE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
curl-8.18.0/src/tool_getparam.c:1108:13: warning[-Wanalyzer-malloc-leak]: leak of 'f'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
# 1106|       if(f) {
# 1107|         curlx_dyn_init(&line, 8092);
# 1108|->       while(my_get_line(f, &line, &error)) {
# 1109|           const char *ptr = curlx_dyn_ptr(&line);
# 1110|           err = add_url(config, ptr, TRUE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
curl-8.18.0/src/tool_getparam.c:1108:13: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
# 1106|       if(f) {
# 1107|         curlx_dyn_init(&line, 8092);
# 1108|->       while(my_get_line(f, &line, &error)) {
# 1109|           const char *ptr = curlx_dyn_ptr(&line);
# 1110|           err = add_url(config, ptr, TRUE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def182]
curl-8.18.0/src/tool_getparam.c:1224:13: warning[-Wanalyzer-file-leak]: leak of FILE 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
# 1222|           return PARAM_BAD_USE; /*  */
# 1223|         }
# 1224|->       err = file2string(&tmpcfg, file);
# 1225|         if(file != stdin)
# 1226|           curlx_fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def183]
curl-8.18.0/src/tool_getparam.c:1224:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
# 1222|           return PARAM_BAD_USE; /*  */
# 1223|         }
# 1224|->       err = file2string(&tmpcfg, file);
# 1225|         if(file != stdin)
# 1226|           curlx_fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
curl-8.18.0/src/tool_getparam.c:1224:13: warning[-Wanalyzer-malloc-leak]: leak of 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
# 1222|           return PARAM_BAD_USE; /*  */
# 1223|         }
# 1224|->       err = file2string(&tmpcfg, file);
# 1225|         if(file != stdin)
# 1226|           curlx_fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
curl-8.18.0/src/tool_getparam.c:1224:13: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
# 1222|           return PARAM_BAD_USE; /*  */
# 1223|         }
# 1224|->       err = file2string(&tmpcfg, file);
# 1225|         if(file != stdin)
# 1226|           curlx_fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def186]
curl-8.18.0/src/tool_getparam.c:1260:7: warning[-Wanalyzer-file-leak]: leak of FILE 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
# 1258|         struct dynbuf line;
# 1259|         bool error = FALSE;
# 1260|->       curlx_dyn_init(&line, 1024 * 100);
# 1261|         while(my_get_line(file, &line, &error)) {
# 1262|           const char *ptr = curlx_dyn_ptr(&line);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def187]
curl-8.18.0/src/tool_getparam.c:1260:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
# 1258|         struct dynbuf line;
# 1259|         bool error = FALSE;
# 1260|->       curlx_dyn_init(&line, 1024 * 100);
# 1261|         while(my_get_line(file, &line, &error)) {
# 1262|           const char *ptr = curlx_dyn_ptr(&line);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
curl-8.18.0/src/tool_getparam.c:1260:7: warning[-Wanalyzer-malloc-leak]: leak of 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
# 1258|         struct dynbuf line;
# 1259|         bool error = FALSE;
# 1260|->       curlx_dyn_init(&line, 1024 * 100);
# 1261|         while(my_get_line(file, &line, &error)) {
# 1262|           const char *ptr = curlx_dyn_ptr(&line);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
curl-8.18.0/src/tool_getparam.c:1260:7: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
# 1258|         struct dynbuf line;
# 1259|         bool error = FALSE;
# 1260|->       curlx_dyn_init(&line, 1024 * 100);
# 1261|         while(my_get_line(file, &line, &error)) {
# 1262|           const char *ptr = curlx_dyn_ptr(&line);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def190]
curl-8.18.0/src/tool_getparam.c:1261:13: warning[-Wanalyzer-file-leak]: leak of FILE 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
# 1259|         bool error = FALSE;
# 1260|         curlx_dyn_init(&line, 1024 * 100);
# 1261|->       while(my_get_line(file, &line, &error)) {
# 1262|           const char *ptr = curlx_dyn_ptr(&line);
# 1263|           err = add2list(cmd == C_PROXY_HEADER ? /* --proxy-header? */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def191]
curl-8.18.0/src/tool_getparam.c:1261:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
# 1259|         bool error = FALSE;
# 1260|         curlx_dyn_init(&line, 1024 * 100);
# 1261|->       while(my_get_line(file, &line, &error)) {
# 1262|           const char *ptr = curlx_dyn_ptr(&line);
# 1263|           err = add2list(cmd == C_PROXY_HEADER ? /* --proxy-header? */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
curl-8.18.0/src/tool_getparam.c:1261:13: warning[-Wanalyzer-malloc-leak]: leak of 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
# 1259|         bool error = FALSE;
# 1260|         curlx_dyn_init(&line, 1024 * 100);
# 1261|->       while(my_get_line(file, &line, &error)) {
# 1262|           const char *ptr = curlx_dyn_ptr(&line);
# 1263|           err = add2list(cmd == C_PROXY_HEADER ? /* --proxy-header? */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
curl-8.18.0/src/tool_getparam.c:1261:13: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
# 1259|         bool error = FALSE;
# 1260|         curlx_dyn_init(&line, 1024 * 100);
# 1261|->       while(my_get_line(file, &line, &error)) {
# 1262|           const char *ptr = curlx_dyn_ptr(&line);
# 1263|           err = add2list(cmd == C_PROXY_HEADER ? /* --proxy-header? */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def194]
curl-8.18.0/src/tool_getparam.c:1557:11: warning[-Wanalyzer-file-leak]: leak of FILE 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
# 1555|       }
# 1556|       tool_safefree(config->writeout);
# 1557|->     err = file2string(&config->writeout, file);
# 1558|       if(file && (file != stdin))
# 1559|         curlx_fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def195]
curl-8.18.0/src/tool_getparam.c:1557:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
# 1555|       }
# 1556|       tool_safefree(config->writeout);
# 1557|->     err = file2string(&config->writeout, file);
# 1558|       if(file && (file != stdin))
# 1559|         curlx_fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
curl-8.18.0/src/tool_getparam.c:1557:11: warning[-Wanalyzer-malloc-leak]: leak of 'file'
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to 'parse_args'
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following 'false' branch (when 'orig_opt' is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling 'getparameter' from 'parse_args'
# 1555|       }
# 1556|       tool_safefree(config->writeout);
# 1557|->     err = file2string(&config->writeout, file);
# 1558|       if(file && (file != stdin))
# 1559|         curlx_fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
curl-8.18.0/src/tool_getparam.c:1557:11: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
curl-8.18.0/src/tool_getparam.c:3015:16: enter_function: entry to ‘parse_args’
curl-8.18.0/src/tool_getparam.c:3023:33: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3024:16: branch_true: ...to here
curl-8.18.0/src/tool_getparam.c:3025:7: branch_false: following ‘false’ branch (when ‘orig_opt’ is non-NULL)...
curl-8.18.0/src/tool_getparam.c:3028:7: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3028:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_getparam.c:3037:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_getparam.c:3045:18: branch_false: ...to here
curl-8.18.0/src/tool_getparam.c:3045:18: call_function: calling ‘getparameter’ from ‘parse_args’
# 1555|       }
# 1556|       tool_safefree(config->writeout);
# 1557|->     err = file2string(&config->writeout, file);
# 1558|       if(file && (file != stdin))
# 1559|         curlx_fclose(file);

Error: COMPILER_WARNING (CWE-704): [#def198]
curl-8.18.0/src/tool_getparam.c: scope_hint: In function 'parse_upload_flags'
curl-8.18.0/src/tool_getparam.c:1638:18: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 1638 |     char *next = strchr(flag, ','); /* Find next comma or end */
#      |                  ^~~~~~
# 1636|       const struct flagmap *map;
# 1637|       size_t len;
# 1638|->     char *next = strchr(flag, ','); /* Find next comma or end */
# 1639|       if(next)
# 1640|         len = next - flag;

Error: COMPILER_WARNING (CWE-704): [#def199]
curl-8.18.0/src/tool_getparam.c:1638:18: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 1636|       const struct flagmap *map;
# 1637|       size_t len;
# 1638|->     char *next = strchr(flag, ','); /* Find next comma or end */
# 1639|       if(next)
# 1640|         len = next - flag;

Error: COMPILER_WARNING (CWE-704): [#def200]
curl-8.18.0/src/tool_getparam.c: scope_hint: In function ‘parse_upload_flags’
curl-8.18.0/src/tool_getparam.c:1638:18: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 1638 |     char *next = strchr(flag, ','); /* Find next comma or end */
#      |                  ^~~~~~
# 1636|       const struct flagmap *map;
# 1637|       size_t len;
# 1638|->     char *next = strchr(flag, ','); /* Find next comma or end */
# 1639|       if(next)
# 1640|         len = next - flag;

Error: COMPILER_WARNING (CWE-704): [#def201]
curl-8.18.0/src/tool_getparam.c:1638:18: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 1636|       const struct flagmap *map;
# 1637|       size_t len;
# 1638|->     char *next = strchr(flag, ','); /* Find next comma or end */
# 1639|       if(next)
# 1640|         len = next - flag;

Error: CPPCHECK_WARNING (CWE-457): [#def202]
curl-8.18.0/src/tool_getparam.c:2433: error[uninitvar]: Uninitialized variable: &find.value
# 2431|       const struct TOSEntry *entry;
# 2432|       find.name = nextarg;
# 2433|->     entry = bsearch(&find, tos_entries,
# 2434|                       CURL_ARRAYSIZE(tos_entries),
# 2435|                       sizeof(*tos_entries), find_tos);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def203]
curl-8.18.0/src/tool_help.c:374:7: warning[-Wanalyzer-malloc-leak]: leak of 'feat_ext'
curl-8.18.0/src/tool_help.c:359:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_help.c:361:12: branch_true: ...to here
curl-8.18.0/src/tool_help.c:365:16: acquire_memory: allocated here
curl-8.18.0/src/tool_help.c:366:7: branch_true: following 'true' branch (when 'feat_ext' is non-NULL)...
curl-8.18.0/src/tool_help.c:368:14: branch_true: ...to here
curl-8.18.0/src/tool_help.c:374:7: throw: if 'qsort' throws an exception...
curl-8.18.0/src/tool_help.c:374:7: danger: 'feat_ext' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  372|   #endif
#  373|         feat_ext[feat_ext_count] = NULL;
#  374|->       qsort((void *)feat_ext, feat_ext_count, sizeof(*feat_ext),
#  375|               struplocompare4sort);
#  376|         curl_mprintf("Features:");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def204]
curl-8.18.0/src/tool_help.c:374:7: warning[-Wanalyzer-malloc-leak]: leak of ‘feat_ext’
curl-8.18.0/src/tool_help.c:359:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_help.c:361:12: branch_true: ...to here
curl-8.18.0/src/tool_help.c:365:16: acquire_memory: allocated here
curl-8.18.0/src/tool_help.c:366:7: branch_true: following ‘true’ branch (when ‘feat_ext’ is non-NULL)...
curl-8.18.0/src/tool_help.c:368:14: branch_true: ...to here
curl-8.18.0/src/tool_help.c:374:7: throw: if ‘qsort’ throws an exception...
curl-8.18.0/src/tool_help.c:374:7: danger: ‘feat_ext’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  372|   #endif
#  373|         feat_ext[feat_ext_count] = NULL;
#  374|->       qsort((void *)feat_ext, feat_ext_count, sizeof(*feat_ext),
#  375|               struplocompare4sort);
#  376|         curl_mprintf("Features:");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def205]
curl-8.18.0/src/tool_ipfs.c:69:3: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")'
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following 'false' branch (when 'gateway_env' is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_resource: opened here
curl-8.18.0/src/tool_ipfs.c:69:3: throw: if 'curl_free' throws an exception...
curl-8.18.0/src/tool_ipfs.c:69:3: danger: 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")' leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   67|   
#   68|     gfile = curlx_fopen(gateway_composed_c, FOPEN_READTEXT);
#   69|->   curl_free(gateway_composed_c);
#   70|   
#   71|     if(gfile) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def206]
curl-8.18.0/src/tool_ipfs.c:69:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following ‘false’ branch (when ‘gateway_env’ is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_resource: opened here
curl-8.18.0/src/tool_ipfs.c:69:3: throw: if ‘curl_free’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:69:3: danger: ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   67|   
#   68|     gfile = curlx_fopen(gateway_composed_c, FOPEN_READTEXT);
#   69|->   curl_free(gateway_composed_c);
#   70|   
#   71|     if(gfile) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def207]
curl-8.18.0/src/tool_ipfs.c:69:3: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")'
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following 'false' branch (when 'gateway_env' is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:69:3: throw: if 'curl_free' throws an exception...
curl-8.18.0/src/tool_ipfs.c:69:3: danger: 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   67|   
#   68|     gfile = curlx_fopen(gateway_composed_c, FOPEN_READTEXT);
#   69|->   curl_free(gateway_composed_c);
#   70|   
#   71|     if(gfile) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
curl-8.18.0/src/tool_ipfs.c:69:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following ‘false’ branch (when ‘gateway_env’ is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:69:3: throw: if ‘curl_free’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:69:3: danger: ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   67|   
#   68|     gfile = curlx_fopen(gateway_composed_c, FOPEN_READTEXT);
#   69|->   curl_free(gateway_composed_c);
#   70|   
#   71|     if(gfile) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def209]
curl-8.18.0/src/tool_ipfs.c:75:5: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")'
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following 'false' branch (when 'gateway_env' is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_resource: opened here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:75:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/src/tool_ipfs.c:75:5: danger: 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")' leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#   73|       struct dynbuf dyn;
#   74|       char *gateway = NULL;
#   75|->     curlx_dyn_init(&dyn, MAX_GATEWAY_URL_LEN);
#   76|   
#   77|       /* get the first line of the gateway file, ignore the rest */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def210]
curl-8.18.0/src/tool_ipfs.c:75:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following ‘false’ branch (when ‘gateway_env’ is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_resource: opened here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:75:5: throw: if ‘curlx_dyn_init’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:75:5: danger: ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#   73|       struct dynbuf dyn;
#   74|       char *gateway = NULL;
#   75|->     curlx_dyn_init(&dyn, MAX_GATEWAY_URL_LEN);
#   76|   
#   77|       /* get the first line of the gateway file, ignore the rest */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
curl-8.18.0/src/tool_ipfs.c:75:5: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")'
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following 'false' branch (when 'gateway_env' is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:75:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/src/tool_ipfs.c:75:5: danger: 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")' leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#   73|       struct dynbuf dyn;
#   74|       char *gateway = NULL;
#   75|->     curlx_dyn_init(&dyn, MAX_GATEWAY_URL_LEN);
#   76|   
#   77|       /* get the first line of the gateway file, ignore the rest */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
curl-8.18.0/src/tool_ipfs.c:75:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following ‘false’ branch (when ‘gateway_env’ is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:75:5: throw: if ‘curlx_dyn_init’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:75:5: danger: ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#   73|       struct dynbuf dyn;
#   74|       char *gateway = NULL;
#   75|->     curlx_dyn_init(&dyn, MAX_GATEWAY_URL_LEN);
#   76|   
#   77|       /* get the first line of the gateway file, ignore the rest */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def213]
curl-8.18.0/src/tool_ipfs.c:78:39: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")'
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following 'false' branch (when 'gateway_env' is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_resource: opened here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:78:11: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:80:10: throw: if 'curlx_dyn_addn' throws an exception...
curl-8.18.0/src/tool_ipfs.c:78:39: danger: 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")' leaks here; was opened at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#   76|   
#   77|       /* get the first line of the gateway file, ignore the rest */
#   78|->     while((c = getc(gfile)) != EOF && c != '\n' && c != '\r') {
#   79|         char c_char = (char)c;
#   80|         if(curlx_dyn_addn(&dyn, &c_char, 1))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def214]
curl-8.18.0/src/tool_ipfs.c:78:39: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following ‘false’ branch (when ‘gateway_env’ is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_resource: opened here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:78:11: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:80:10: throw: if ‘curlx_dyn_addn’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:78:39: danger: ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#   76|   
#   77|       /* get the first line of the gateway file, ignore the rest */
#   78|->     while((c = getc(gfile)) != EOF && c != '\n' && c != '\r') {
#   79|         char c_char = (char)c;
#   80|         if(curlx_dyn_addn(&dyn, &c_char, 1))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
curl-8.18.0/src/tool_ipfs.c:78:39: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")'
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following 'false' branch (when 'gateway_env' is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:78:11: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:80:10: throw: if 'curlx_dyn_addn' throws an exception...
curl-8.18.0/src/tool_ipfs.c:78:39: danger: 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")' leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#   76|   
#   77|       /* get the first line of the gateway file, ignore the rest */
#   78|->     while((c = getc(gfile)) != EOF && c != '\n' && c != '\r') {
#   79|         char c_char = (char)c;
#   80|         if(curlx_dyn_addn(&dyn, &c_char, 1))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
curl-8.18.0/src/tool_ipfs.c:78:39: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following ‘false’ branch (when ‘gateway_env’ is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:78:11: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:80:10: throw: if ‘curlx_dyn_addn’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:78:39: danger: ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#   76|   
#   77|       /* get the first line of the gateway file, ignore the rest */
#   78|->     while((c = getc(gfile)) != EOF && c != '\n' && c != '\r') {
#   79|         char c_char = (char)c;
#   80|         if(curlx_dyn_addn(&dyn, &c_char, 1))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def217]
curl-8.18.0/src/tool_ipfs.c:84:8: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")'
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following 'false' branch (when 'gateway_env' is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_resource: opened here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:84:8: throw: if 'curlx_dyn_len' throws an exception...
curl-8.18.0/src/tool_ipfs.c:84:8: danger: 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")' leaks here; was opened at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#   82|       }
#   83|   
#   84|->     if(curlx_dyn_len(&dyn))
#   85|         gateway = curlx_dyn_ptr(&dyn);
#   86|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def218]
curl-8.18.0/src/tool_ipfs.c:84:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following ‘false’ branch (when ‘gateway_env’ is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_resource: opened here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:84:8: throw: if ‘curlx_dyn_len’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:84:8: danger: ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#   82|       }
#   83|   
#   84|->     if(curlx_dyn_len(&dyn))
#   85|         gateway = curlx_dyn_ptr(&dyn);
#   86|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
curl-8.18.0/src/tool_ipfs.c:84:8: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")'
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following 'false' branch (when 'gateway_env' is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:84:8: throw: if 'curlx_dyn_len' throws an exception...
curl-8.18.0/src/tool_ipfs.c:84:8: danger: 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")' leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#   82|       }
#   83|   
#   84|->     if(curlx_dyn_len(&dyn))
#   85|         gateway = curlx_dyn_ptr(&dyn);
#   86|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def220]
curl-8.18.0/src/tool_ipfs.c:84:8: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following ‘false’ branch (when ‘gateway_env’ is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:84:8: throw: if ‘curlx_dyn_len’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:84:8: danger: ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#   82|       }
#   83|   
#   84|->     if(curlx_dyn_len(&dyn))
#   85|         gateway = curlx_dyn_ptr(&dyn);
#   86|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def221]
curl-8.18.0/src/tool_ipfs.c:85:17: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")'
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following 'false' branch (when 'gateway_env' is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_resource: opened here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:84:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:85:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:85:17: throw: if 'curlx_dyn_ptr' throws an exception...
curl-8.18.0/src/tool_ipfs.c:85:17: danger: 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")' leaks here; was opened at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#   83|   
#   84|       if(curlx_dyn_len(&dyn))
#   85|->       gateway = curlx_dyn_ptr(&dyn);
#   86|   
#   87|       curl_free(ipfs_path_c);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def222]
curl-8.18.0/src/tool_ipfs.c:85:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following ‘false’ branch (when ‘gateway_env’ is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_resource: opened here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:84:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:85:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:85:17: throw: if ‘curlx_dyn_ptr’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:85:17: danger: ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#   83|   
#   84|       if(curlx_dyn_len(&dyn))
#   85|->       gateway = curlx_dyn_ptr(&dyn);
#   86|   
#   87|       curl_free(ipfs_path_c);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
curl-8.18.0/src/tool_ipfs.c:85:17: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")'
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following 'false' branch (when 'gateway_env' is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:84:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:85:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:85:17: throw: if 'curlx_dyn_ptr' throws an exception...
curl-8.18.0/src/tool_ipfs.c:85:17: danger: 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")' leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#   83|   
#   84|       if(curlx_dyn_len(&dyn))
#   85|->       gateway = curlx_dyn_ptr(&dyn);
#   86|   
#   87|       curl_free(ipfs_path_c);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def224]
curl-8.18.0/src/tool_ipfs.c:85:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following ‘false’ branch (when ‘gateway_env’ is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:84:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:85:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:85:17: throw: if ‘curlx_dyn_ptr’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:85:17: danger: ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#   83|   
#   84|       if(curlx_dyn_len(&dyn))
#   85|->       gateway = curlx_dyn_ptr(&dyn);
#   86|   
#   87|       curl_free(ipfs_path_c);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def225]
curl-8.18.0/src/tool_ipfs.c:87:5: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")'
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following 'false' branch (when 'gateway_env' is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_resource: opened here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:84:7: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:87:5: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:87:5: throw: if 'curl_free' throws an exception...
curl-8.18.0/src/tool_ipfs.c:87:5: danger: 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")' leaks here; was opened at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#   85|         gateway = curlx_dyn_ptr(&dyn);
#   86|   
#   87|->     curl_free(ipfs_path_c);
#   88|       curlx_fclose(gfile);
#   89|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def226]
curl-8.18.0/src/tool_ipfs.c:87:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following ‘false’ branch (when ‘gateway_env’ is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_resource: opened here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:84:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:87:5: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:87:5: throw: if ‘curl_free’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:87:5: danger: ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#   85|         gateway = curlx_dyn_ptr(&dyn);
#   86|   
#   87|->     curl_free(ipfs_path_c);
#   88|       curlx_fclose(gfile);
#   89|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
curl-8.18.0/src/tool_ipfs.c:87:5: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")'
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following 'false' branch (when 'gateway_env' is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:84:7: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:87:5: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:87:5: throw: if 'curl_free' throws an exception...
curl-8.18.0/src/tool_ipfs.c:87:5: danger: 'fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")' leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#   85|         gateway = curlx_dyn_ptr(&dyn);
#   86|   
#   87|->     curl_free(ipfs_path_c);
#   88|       curlx_fclose(gfile);
#   89|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def228]
curl-8.18.0/src/tool_ipfs.c:87:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’
curl-8.18.0/src/tool_ipfs.c:46:5: branch_false: following ‘false’ branch (when ‘gateway_env’ is NULL)...
curl-8.18.0/src/tool_ipfs.c:50:17: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:65:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:68:11: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:68:11: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:71:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:75:5: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:84:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:87:5: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:87:5: throw: if ‘curl_free’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:87:5: danger: ‘fopen(curl_maprintf("%s%sgateway", ipfs_path_c,  <unknown>), "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#   85|         gateway = curlx_dyn_ptr(&dyn);
#   86|   
#   87|->     curl_free(ipfs_path_c);
#   88|       curlx_fclose(gfile);
#   89|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def229]
curl-8.18.0/src/tool_ipfs.c:160:6: warning[-Wanalyzer-malloc-leak]: leak of 'gateway'
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following 'false' branch (when 'gateway' is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:6: throw: if 'curl_url_get' throws an exception...
curl-8.18.0/src/tool_ipfs.c:160:6: danger: 'gateway' leaks here; was allocated at [(9)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/8)
#  158|   
#  159|     /* check for unsupported gateway parts */
#  160|->   if(curl_url_get(gatewayurl, CURLUPART_QUERY, &gwquery, 0) !=
#  161|        CURLUE_NO_QUERY) {
#  162|       result = CURLE_URL_MALFORMAT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def230]
curl-8.18.0/src/tool_ipfs.c:160:6: warning[-Wanalyzer-malloc-leak]: leak of ‘gateway’
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following ‘false’ branch (when ‘gateway’ is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:6: throw: if ‘curl_url_get’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:160:6: danger: ‘gateway’ leaks here; was allocated at [(9)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/8)
#  158|   
#  159|     /* check for unsupported gateway parts */
#  160|->   if(curl_url_get(gatewayurl, CURLUPART_QUERY, &gwquery, 0) !=
#  161|        CURLUE_NO_QUERY) {
#  162|       result = CURLE_URL_MALFORMAT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
curl-8.18.0/src/tool_ipfs.c:167:6: warning[-Wanalyzer-malloc-leak]: leak of 'gateway'
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following 'false' branch (when 'gateway' is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: throw: if 'curl_url_get' throws an exception...
curl-8.18.0/src/tool_ipfs.c:167:6: danger: 'gateway' leaks here; was allocated at [(9)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/8)
#  165|   
#  166|     /* get gateway parts */
#  167|->   if(curl_url_get(gatewayurl, CURLUPART_HOST, &gwhost, CURLU_URLDECODE) ||
#  168|        curl_url_get(gatewayurl, CURLUPART_SCHEME, &gwscheme, CURLU_URLDECODE) ||
#  169|        curl_url_get(gatewayurl, CURLUPART_PORT, &gwport, CURLU_URLDECODE) ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
curl-8.18.0/src/tool_ipfs.c:167:6: warning[-Wanalyzer-malloc-leak]: leak of ‘gateway’
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following ‘false’ branch (when ‘gateway’ is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: throw: if ‘curl_url_get’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:167:6: danger: ‘gateway’ leaks here; was allocated at [(9)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/8)
#  165|   
#  166|     /* get gateway parts */
#  167|->   if(curl_url_get(gatewayurl, CURLUPART_HOST, &gwhost, CURLU_URLDECODE) ||
#  168|        curl_url_get(gatewayurl, CURLUPART_SCHEME, &gwscheme, CURLU_URLDECODE) ||
#  169|        curl_url_get(gatewayurl, CURLUPART_PORT, &gwport, CURLU_URLDECODE) ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def233]
curl-8.18.0/src/tool_ipfs.c:168:6: warning[-Wanalyzer-malloc-leak]: leak of 'gateway'
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following 'false' branch (when 'gateway' is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:168:6: throw: if 'curl_url_get' throws an exception...
curl-8.18.0/src/tool_ipfs.c:168:6: danger: 'gateway' leaks here; was allocated at [(9)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/8)
#  166|     /* get gateway parts */
#  167|     if(curl_url_get(gatewayurl, CURLUPART_HOST, &gwhost, CURLU_URLDECODE) ||
#  168|->      curl_url_get(gatewayurl, CURLUPART_SCHEME, &gwscheme, CURLU_URLDECODE) ||
#  169|        curl_url_get(gatewayurl, CURLUPART_PORT, &gwport, CURLU_URLDECODE) ||
#  170|        curl_url_get(gatewayurl, CURLUPART_PATH, &gwpath, CURLU_URLDECODE))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
curl-8.18.0/src/tool_ipfs.c:168:6: warning[-Wanalyzer-malloc-leak]: leak of ‘gateway’
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following ‘false’ branch (when ‘gateway’ is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:168:6: throw: if ‘curl_url_get’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:168:6: danger: ‘gateway’ leaks here; was allocated at [(9)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/8)
#  166|     /* get gateway parts */
#  167|     if(curl_url_get(gatewayurl, CURLUPART_HOST, &gwhost, CURLU_URLDECODE) ||
#  168|->      curl_url_get(gatewayurl, CURLUPART_SCHEME, &gwscheme, CURLU_URLDECODE) ||
#  169|        curl_url_get(gatewayurl, CURLUPART_PORT, &gwport, CURLU_URLDECODE) ||
#  170|        curl_url_get(gatewayurl, CURLUPART_PATH, &gwpath, CURLU_URLDECODE))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def235]
curl-8.18.0/src/tool_ipfs.c:169:6: warning[-Wanalyzer-malloc-leak]: leak of 'gateway'
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following 'false' branch (when 'gateway' is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:169:6: throw: if 'curl_url_get' throws an exception...
curl-8.18.0/src/tool_ipfs.c:169:6: danger: 'gateway' leaks here; was allocated at [(9)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/8)
#  167|     if(curl_url_get(gatewayurl, CURLUPART_HOST, &gwhost, CURLU_URLDECODE) ||
#  168|        curl_url_get(gatewayurl, CURLUPART_SCHEME, &gwscheme, CURLU_URLDECODE) ||
#  169|->      curl_url_get(gatewayurl, CURLUPART_PORT, &gwport, CURLU_URLDECODE) ||
#  170|        curl_url_get(gatewayurl, CURLUPART_PATH, &gwpath, CURLU_URLDECODE))
#  171|       goto clean;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def236]
curl-8.18.0/src/tool_ipfs.c:169:6: warning[-Wanalyzer-malloc-leak]: leak of ‘gateway’
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following ‘false’ branch (when ‘gateway’ is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:169:6: throw: if ‘curl_url_get’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:169:6: danger: ‘gateway’ leaks here; was allocated at [(9)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/8)
#  167|     if(curl_url_get(gatewayurl, CURLUPART_HOST, &gwhost, CURLU_URLDECODE) ||
#  168|        curl_url_get(gatewayurl, CURLUPART_SCHEME, &gwscheme, CURLU_URLDECODE) ||
#  169|->      curl_url_get(gatewayurl, CURLUPART_PORT, &gwport, CURLU_URLDECODE) ||
#  170|        curl_url_get(gatewayurl, CURLUPART_PATH, &gwpath, CURLU_URLDECODE))
#  171|       goto clean;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def237]
curl-8.18.0/src/tool_ipfs.c:170:6: warning[-Wanalyzer-malloc-leak]: leak of 'gateway'
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following 'false' branch (when 'gateway' is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:170:6: throw: if 'curl_url_get' throws an exception...
curl-8.18.0/src/tool_ipfs.c:170:6: danger: 'gateway' leaks here; was allocated at [(9)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/8)
#  168|        curl_url_get(gatewayurl, CURLUPART_SCHEME, &gwscheme, CURLU_URLDECODE) ||
#  169|        curl_url_get(gatewayurl, CURLUPART_PORT, &gwport, CURLU_URLDECODE) ||
#  170|->      curl_url_get(gatewayurl, CURLUPART_PATH, &gwpath, CURLU_URLDECODE))
#  171|       goto clean;
#  172|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def238]
curl-8.18.0/src/tool_ipfs.c:170:6: warning[-Wanalyzer-malloc-leak]: leak of ‘gateway’
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following ‘false’ branch (when ‘gateway’ is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:170:6: throw: if ‘curl_url_get’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:170:6: danger: ‘gateway’ leaks here; was allocated at [(9)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/8)
#  168|        curl_url_get(gatewayurl, CURLUPART_SCHEME, &gwscheme, CURLU_URLDECODE) ||
#  169|        curl_url_get(gatewayurl, CURLUPART_PORT, &gwport, CURLU_URLDECODE) ||
#  170|->      curl_url_get(gatewayurl, CURLUPART_PATH, &gwpath, CURLU_URLDECODE))
#  171|       goto clean;
#  172|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def239]
curl-8.18.0/src/tool_ipfs.c:174:6: warning[-Wanalyzer-malloc-leak]: leak of 'gateway'
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following 'false' branch (when 'gateway' is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:6: throw: if 'curl_url_get' throws an exception...
curl-8.18.0/src/tool_ipfs.c:174:6: danger: 'gateway' leaks here; was allocated at [(9)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/8)
#  172|   
#  173|     /* get the path from user input */
#  174|->   if(curl_url_get(uh, CURLUPART_PATH, &inputpath, CURLU_URLDECODE))
#  175|       goto clean;
#  176|     /* inputpath might be NULL or a valid pointer now */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def240]
curl-8.18.0/src/tool_ipfs.c:174:6: warning[-Wanalyzer-malloc-leak]: leak of ‘gateway’
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following ‘false’ branch (when ‘gateway’ is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:6: throw: if ‘curl_url_get’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:174:6: danger: ‘gateway’ leaks here; was allocated at [(9)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/8)
#  172|   
#  173|     /* get the path from user input */
#  174|->   if(curl_url_get(uh, CURLUPART_PATH, &inputpath, CURLU_URLDECODE))
#  175|       goto clean;
#  176|     /* inputpath might be NULL or a valid pointer now */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def241]
curl-8.18.0/src/tool_ipfs.c:179:6: warning[-Wanalyzer-malloc-leak]: leak of 'gateway'
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following 'false' branch (when 'gateway' is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: throw: if 'curl_url_set' throws an exception...
curl-8.18.0/src/tool_ipfs.c:179:6: danger: 'gateway' leaks here; was allocated at [(9)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/8)
#  177|   
#  178|     /* set gateway parts in input URL */
#  179|->   if(curl_url_set(uh, CURLUPART_SCHEME, gwscheme, CURLU_URLENCODE) ||
#  180|        curl_url_set(uh, CURLUPART_HOST, gwhost, CURLU_URLENCODE) ||
#  181|        curl_url_set(uh, CURLUPART_PORT, gwport, CURLU_URLENCODE))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def242]
curl-8.18.0/src/tool_ipfs.c:179:6: warning[-Wanalyzer-malloc-leak]: leak of ‘gateway’
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following ‘false’ branch (when ‘gateway’ is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: throw: if ‘curl_url_set’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:179:6: danger: ‘gateway’ leaks here; was allocated at [(9)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/8)
#  177|   
#  178|     /* set gateway parts in input URL */
#  179|->   if(curl_url_set(uh, CURLUPART_SCHEME, gwscheme, CURLU_URLENCODE) ||
#  180|        curl_url_set(uh, CURLUPART_HOST, gwhost, CURLU_URLENCODE) ||
#  181|        curl_url_set(uh, CURLUPART_PORT, gwport, CURLU_URLENCODE))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def243]
curl-8.18.0/src/tool_ipfs.c:180:6: warning[-Wanalyzer-malloc-leak]: leak of 'gateway'
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following 'false' branch (when 'gateway' is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:180:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:180:6: throw: if 'curl_url_set' throws an exception...
curl-8.18.0/src/tool_ipfs.c:180:6: danger: 'gateway' leaks here; was allocated at [(9)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/8)
#  178|     /* set gateway parts in input URL */
#  179|     if(curl_url_set(uh, CURLUPART_SCHEME, gwscheme, CURLU_URLENCODE) ||
#  180|->      curl_url_set(uh, CURLUPART_HOST, gwhost, CURLU_URLENCODE) ||
#  181|        curl_url_set(uh, CURLUPART_PORT, gwport, CURLU_URLENCODE))
#  182|       goto clean;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def244]
curl-8.18.0/src/tool_ipfs.c:180:6: warning[-Wanalyzer-malloc-leak]: leak of ‘gateway’
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following ‘false’ branch (when ‘gateway’ is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:180:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:180:6: throw: if ‘curl_url_set’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:180:6: danger: ‘gateway’ leaks here; was allocated at [(9)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/8)
#  178|     /* set gateway parts in input URL */
#  179|     if(curl_url_set(uh, CURLUPART_SCHEME, gwscheme, CURLU_URLENCODE) ||
#  180|->      curl_url_set(uh, CURLUPART_HOST, gwhost, CURLU_URLENCODE) ||
#  181|        curl_url_set(uh, CURLUPART_PORT, gwport, CURLU_URLENCODE))
#  182|       goto clean;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def245]
curl-8.18.0/src/tool_ipfs.c:181:6: warning[-Wanalyzer-malloc-leak]: leak of 'gateway'
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following 'false' branch (when 'gateway' is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:180:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:181:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:181:6: throw: if 'curl_url_set' throws an exception...
curl-8.18.0/src/tool_ipfs.c:181:6: danger: 'gateway' leaks here; was allocated at [(9)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/8)
#  179|     if(curl_url_set(uh, CURLUPART_SCHEME, gwscheme, CURLU_URLENCODE) ||
#  180|        curl_url_set(uh, CURLUPART_HOST, gwhost, CURLU_URLENCODE) ||
#  181|->      curl_url_set(uh, CURLUPART_PORT, gwport, CURLU_URLENCODE))
#  182|       goto clean;
#  183|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def246]
curl-8.18.0/src/tool_ipfs.c:181:6: warning[-Wanalyzer-malloc-leak]: leak of ‘gateway’
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following ‘false’ branch (when ‘gateway’ is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:180:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:181:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:181:6: throw: if ‘curl_url_set’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:181:6: danger: ‘gateway’ leaks here; was allocated at [(9)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/8)
#  179|     if(curl_url_set(uh, CURLUPART_SCHEME, gwscheme, CURLU_URLENCODE) ||
#  180|        curl_url_set(uh, CURLUPART_HOST, gwhost, CURLU_URLENCODE) ||
#  181|->      curl_url_set(uh, CURLUPART_PORT, gwport, CURLU_URLENCODE))
#  182|       goto clean;
#  183|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def247]
curl-8.18.0/src/tool_ipfs.c:188:16: warning[-Wanalyzer-malloc-leak]: leak of 'gateway'
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following 'false' branch (when 'gateway' is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:180:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:181:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:185:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:188:16: throw: if 'curl_maprintf' throws an exception...
curl-8.18.0/src/tool_ipfs.c:188:16: danger: 'gateway' leaks here; was allocated at [(9)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/8)
#  186|       *inputpath = '\0';
#  187|   
#  188|->   pathbuffer = curl_maprintf("%s%s%s/%s%s", gwpath,
#  189|                                has_trailing_slash(gwpath) ? "" : "/",
#  190|                                protocol, cid,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def248]
curl-8.18.0/src/tool_ipfs.c:188:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gateway’
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following ‘false’ branch (when ‘gateway’ is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:180:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:181:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:185:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:188:16: throw: if ‘curl_maprintf’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:188:16: danger: ‘gateway’ leaks here; was allocated at [(9)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/8)
#  186|       *inputpath = '\0';
#  187|   
#  188|->   pathbuffer = curl_maprintf("%s%s%s/%s%s", gwpath,
#  189|                                has_trailing_slash(gwpath) ? "" : "/",
#  190|                                protocol, cid,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def249]
curl-8.18.0/src/tool_ipfs.c:193:6: warning[-Wanalyzer-malloc-leak]: leak of 'gateway'
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following 'false' branch (when 'gateway' is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:180:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:181:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:185:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:192:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:193:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:193:6: throw: if 'curl_url_set' throws an exception...
curl-8.18.0/src/tool_ipfs.c:193:6: danger: 'gateway' leaks here; was allocated at [(9)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/8)
#  191|                                inputpath ? inputpath : "");
#  192|     if(!pathbuffer ||
#  193|->      curl_url_set(uh, CURLUPART_PATH, pathbuffer, CURLU_URLENCODE))
#  194|       goto clean;
#  195|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
curl-8.18.0/src/tool_ipfs.c:193:6: warning[-Wanalyzer-malloc-leak]: leak of ‘gateway’
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following ‘false’ branch (when ‘gateway’ is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:180:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:181:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:185:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:192:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:193:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:193:6: throw: if ‘curl_url_set’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:193:6: danger: ‘gateway’ leaks here; was allocated at [(9)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/8)
#  191|                                inputpath ? inputpath : "");
#  192|     if(!pathbuffer ||
#  193|->      curl_url_set(uh, CURLUPART_PATH, pathbuffer, CURLU_URLENCODE))
#  194|       goto clean;
#  195|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def251]
curl-8.18.0/src/tool_ipfs.c:199:6: warning[-Wanalyzer-malloc-leak]: leak of 'gateway'
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following 'false' branch (when 'gateway' is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:180:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:181:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:185:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:192:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:193:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:192:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:197:3: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:199:6: throw: if 'curl_url_get' throws an exception...
curl-8.18.0/src/tool_ipfs.c:199:6: danger: 'gateway' leaks here; was allocated at [(9)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/8)
#  197|     tool_safefree(*url);
#  198|   
#  199|->   if(curl_url_get(uh, CURLUPART_URL, &cloneurl, CURLU_URLENCODE)) {
#  200|       goto clean;
#  201|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def252]
curl-8.18.0/src/tool_ipfs.c:199:6: warning[-Wanalyzer-malloc-leak]: leak of ‘gateway’
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following ‘false’ branch (when ‘gateway’ is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:180:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:181:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:185:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:192:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:193:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:192:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:197:3: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:199:6: throw: if ‘curl_url_get’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:199:6: danger: ‘gateway’ leaks here; was allocated at [(9)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/8)
#  197|     tool_safefree(*url);
#  198|   
#  199|->   if(curl_url_get(uh, CURLUPART_URL, &cloneurl, CURLU_URLENCODE)) {
#  200|       goto clean;
#  201|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
curl-8.18.0/src/tool_ipfs.c:204:3: warning[-Wanalyzer-malloc-leak]: leak of 'gateway'
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following 'false' branch (when 'gateway' is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:180:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:181:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:185:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:192:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:193:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:192:6: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:197:3: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:199:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ipfs.c:203:10: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:204:3: throw: if 'curl_free' throws an exception...
curl-8.18.0/src/tool_ipfs.c:204:3: danger: 'gateway' leaks here; was allocated at [(9)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/8)
#  202|     /* we need to strdup the URL so that we can call curlx_free() on it later */
#  203|     *url = curlx_strdup(cloneurl);
#  204|->   curl_free(cloneurl);
#  205|     if(!*url)
#  206|       goto clean;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
curl-8.18.0/src/tool_ipfs.c:204:3: warning[-Wanalyzer-malloc-leak]: leak of ‘gateway’
curl-8.18.0/src/tool_ipfs.c:120:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:125:15: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:126:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:132:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:133:9: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:133:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ipfs.c:135:17: branch_true: ...to here
curl-8.18.0/src/tool_ipfs.c:135:17: acquire_memory: allocated here
curl-8.18.0/src/tool_ipfs.c:136:9: branch_false: following ‘false’ branch (when ‘gateway’ is non-NULL)...
curl-8.18.0/src/tool_ipfs.c:160:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:160:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:168:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:169:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:170:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:167:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:174:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:174:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:180:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:181:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:179:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:185:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:192:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:193:6: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:192:6: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:197:3: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:199:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ipfs.c:203:10: branch_false: ...to here
curl-8.18.0/src/tool_ipfs.c:204:3: throw: if ‘curl_free’ throws an exception...
curl-8.18.0/src/tool_ipfs.c:204:3: danger: ‘gateway’ leaks here; was allocated at [(9)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/8)
#  202|     /* we need to strdup the URL so that we can call curlx_free() on it later */
#  203|     *url = curlx_strdup(cloneurl);
#  204|->   curl_free(cloneurl);
#  205|     if(!*url)
#  206|       goto clean;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def255]
curl-8.18.0/src/tool_main.c:90:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
curl-8.18.0/src/tool_main.c:93:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_main.c:93:7: branch_false: ...to here
curl-8.18.0/src/tool_main.c:90:10: throw: if ‘fcntl’ throws an exception...
curl-8.18.0/src/tool_main.c:90:10: danger: ‘fd[0]’ leaks here
#   88|   {
#   89|     int fd[2];
#   90|->   while((fcntl(STDIN_FILENO, F_GETFD) == -1) ||
#   91|           (fcntl(STDOUT_FILENO, F_GETFD) == -1) ||
#   92|           (fcntl(STDERR_FILENO, F_GETFD) == -1))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def256]
curl-8.18.0/src/tool_main.c:90:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
curl-8.18.0/src/tool_main.c:93:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_main.c:93:7: branch_false: ...to here
curl-8.18.0/src/tool_main.c:90:10: throw: if ‘fcntl’ throws an exception...
curl-8.18.0/src/tool_main.c:90:10: danger: ‘fd[1]’ leaks here
#   88|   {
#   89|     int fd[2];
#   90|->   while((fcntl(STDIN_FILENO, F_GETFD) == -1) ||
#   91|           (fcntl(STDOUT_FILENO, F_GETFD) == -1) ||
#   92|           (fcntl(STDERR_FILENO, F_GETFD) == -1))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def257]
curl-8.18.0/src/tool_main.c:91:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
curl-8.18.0/src/tool_main.c:93:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_main.c:93:7: branch_false: ...to here
curl-8.18.0/src/tool_main.c:91:10: throw: if ‘fcntl’ throws an exception...
curl-8.18.0/src/tool_main.c:91:10: danger: ‘fd[0]’ leaks here
#   89|     int fd[2];
#   90|     while((fcntl(STDIN_FILENO, F_GETFD) == -1) ||
#   91|->         (fcntl(STDOUT_FILENO, F_GETFD) == -1) ||
#   92|           (fcntl(STDERR_FILENO, F_GETFD) == -1))
#   93|       if(pipe(fd))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def258]
curl-8.18.0/src/tool_main.c:91:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
curl-8.18.0/src/tool_main.c:93:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_main.c:93:7: branch_false: ...to here
curl-8.18.0/src/tool_main.c:91:10: throw: if ‘fcntl’ throws an exception...
curl-8.18.0/src/tool_main.c:91:10: danger: ‘fd[1]’ leaks here
#   89|     int fd[2];
#   90|     while((fcntl(STDIN_FILENO, F_GETFD) == -1) ||
#   91|->         (fcntl(STDOUT_FILENO, F_GETFD) == -1) ||
#   92|           (fcntl(STDERR_FILENO, F_GETFD) == -1))
#   93|       if(pipe(fd))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def259]
curl-8.18.0/src/tool_main.c:92:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
curl-8.18.0/src/tool_main.c:93:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_main.c:93:7: branch_false: ...to here
curl-8.18.0/src/tool_main.c:92:10: throw: if ‘fcntl’ throws an exception...
curl-8.18.0/src/tool_main.c:92:10: danger: ‘fd[0]’ leaks here
#   90|     while((fcntl(STDIN_FILENO, F_GETFD) == -1) ||
#   91|           (fcntl(STDOUT_FILENO, F_GETFD) == -1) ||
#   92|->         (fcntl(STDERR_FILENO, F_GETFD) == -1))
#   93|       if(pipe(fd))
#   94|         return 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def260]
curl-8.18.0/src/tool_main.c:92:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
curl-8.18.0/src/tool_main.c:93:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_main.c:93:7: branch_false: ...to here
curl-8.18.0/src/tool_main.c:92:10: throw: if ‘fcntl’ throws an exception...
curl-8.18.0/src/tool_main.c:92:10: danger: ‘fd[1]’ leaks here
#   90|     while((fcntl(STDIN_FILENO, F_GETFD) == -1) ||
#   91|           (fcntl(STDOUT_FILENO, F_GETFD) == -1) ||
#   92|->         (fcntl(STDERR_FILENO, F_GETFD) == -1))
#   93|       if(pipe(fd))
#   94|         return 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def261]
curl-8.18.0/src/tool_main.c:94:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
curl-8.18.0/src/tool_main.c:93:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_main.c:93:7: branch_false: ...to here
curl-8.18.0/src/tool_main.c:93:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_main.c:94:14: branch_true: ...to here
curl-8.18.0/src/tool_main.c:94:14: danger: ‘fd[0]’ leaks here
#   92|           (fcntl(STDERR_FILENO, F_GETFD) == -1))
#   93|       if(pipe(fd))
#   94|->       return 1;
#   95|     return 0;
#   96|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def262]
curl-8.18.0/src/tool_main.c:94:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
curl-8.18.0/src/tool_main.c:93:7: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_main.c:93:7: branch_false: ...to here
curl-8.18.0/src/tool_main.c:93:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_main.c:94:14: branch_true: ...to here
curl-8.18.0/src/tool_main.c:94:14: danger: ‘fd[1]’ leaks here
#   92|           (fcntl(STDERR_FILENO, F_GETFD) == -1))
#   93|       if(pipe(fd))
#   94|->       return 1;
#   95|     return 0;
#   96|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def263]
curl-8.18.0/src/tool_msgs.c:42:18: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_msgs.c:79:6: enter_function: entry to 'notef'
curl-8.18.0/src/tool_msgs.c:81:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_msgs.c:83:5: branch_true: ...to here
curl-8.18.0/src/tool_msgs.c:83:5: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_msgs.c:84:5: call_function: calling 'voutf' from 'notef'
#   40|     char *ptr;
#   41|     char buffer[1024];
#   42|->   size_t termw = get_terminal_columns();
#   43|     size_t prefw = strlen(prefix);
#   44|     size_t width = termw > prefw ? termw - prefw : SIZE_MAX;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def264]
curl-8.18.0/src/tool_msgs.c:42:18: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_msgs.c:79:6: enter_function: entry to ‘notef’
curl-8.18.0/src/tool_msgs.c:81:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_msgs.c:83:5: branch_true: ...to here
curl-8.18.0/src/tool_msgs.c:83:5: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_msgs.c:84:5: call_function: calling ‘voutf’ from ‘notef’
#   40|     char *ptr;
#   41|     char buffer[1024];
#   42|->   size_t termw = get_terminal_columns();
#   43|     size_t prefw = strlen(prefix);
#   44|     size_t width = termw > prefw ? termw - prefw : SIZE_MAX;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def265]
curl-8.18.0/src/tool_msgs.c:46:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_msgs.c:79:6: enter_function: entry to 'notef'
curl-8.18.0/src/tool_msgs.c:81:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_msgs.c:83:5: branch_true: ...to here
curl-8.18.0/src/tool_msgs.c:83:5: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_msgs.c:84:5: call_function: calling 'voutf' from 'notef'
#   44|     size_t width = termw > prefw ? termw - prefw : SIZE_MAX;
#   45|     DEBUGASSERT(!strchr(fmt, '\n'));
#   46|->   len = curl_mvsnprintf(buffer, sizeof(buffer), fmt, ap);
#   47|     ptr = buffer;
#   48|     while(len > 0) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def266]
curl-8.18.0/src/tool_msgs.c:46:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_msgs.c:79:6: enter_function: entry to ‘notef’
curl-8.18.0/src/tool_msgs.c:81:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_msgs.c:83:5: branch_true: ...to here
curl-8.18.0/src/tool_msgs.c:83:5: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_msgs.c:84:5: call_function: calling ‘voutf’ from ‘notef’
#   44|     size_t width = termw > prefw ? termw - prefw : SIZE_MAX;
#   45|     DEBUGASSERT(!strchr(fmt, '\n'));
#   46|->   len = curl_mvsnprintf(buffer, sizeof(buffer), fmt, ap);
#   47|     ptr = buffer;
#   48|     while(len > 0) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def267]
curl-8.18.0/src/tool_msgs.c:114:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_msgs.c:109:5: branch_true: following 'true' branch (when 'fmt' is non-NULL)...
curl-8.18.0/src/tool_msgs.c:111:5: branch_true: ...to here
curl-8.18.0/src/tool_msgs.c:111:5: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_msgs.c:114:5: throw: if 'curl_mvfprintf' throws an exception...
curl-8.18.0/src/tool_msgs.c:114:5: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  112|       DEBUGASSERT(!strchr(fmt, '\n'));
#  113|       fputs("curl: ", tool_stderr); /* prefix it */
#  114|->     curl_mvfprintf(tool_stderr, fmt, ap);
#  115|       va_end(ap);
#  116|       fputs("\n", tool_stderr); /* newline it */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def268]
curl-8.18.0/src/tool_msgs.c:114:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_msgs.c:109:5: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
curl-8.18.0/src/tool_msgs.c:111:5: branch_true: ...to here
curl-8.18.0/src/tool_msgs.c:111:5: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_msgs.c:114:5: throw: if ‘curl_mvfprintf’ throws an exception...
curl-8.18.0/src/tool_msgs.c:114:5: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  112|       DEBUGASSERT(!strchr(fmt, '\n'));
#  113|       fputs("curl: ", tool_stderr); /* prefix it */
#  114|->     curl_mvfprintf(tool_stderr, fmt, ap);
#  115|       va_end(ap);
#  116|       fputs("\n", tool_stderr); /* newline it */

Error: COMPILER_WARNING (CWE-704): [#def269]
curl-8.18.0/src/tool_operhlp.c: scope_hint: In function 'add_file_name_to_url'
curl-8.18.0/src/tool_operhlp.c:119:21: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
#  119 |       char *file2 = strrchr(filep ? filep : filename, '\\');
#      |                     ^~~~~~~
#  117|            side of the rightmost slash and backslash. */
#  118|         const char *filep = strrchr(filename, '/');
#  119|->       char *file2 = strrchr(filep ? filep : filename, '\\');
#  120|         char *encfile;
#  121|   

Error: COMPILER_WARNING (CWE-704): [#def270]
curl-8.18.0/src/tool_operhlp.c:119:21: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
#  117|            side of the rightmost slash and backslash. */
#  118|         const char *filep = strrchr(filename, '/');
#  119|->       char *file2 = strrchr(filep ? filep : filename, '\\');
#  120|         char *encfile;
#  121|   

Error: COMPILER_WARNING (CWE-704): [#def271]
curl-8.18.0/src/tool_operhlp.c: scope_hint: In function ‘add_file_name_to_url’
curl-8.18.0/src/tool_operhlp.c:119:21: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  119 |       char *file2 = strrchr(filep ? filep : filename, '\\');
#      |                     ^~~~~~~
#  117|            side of the rightmost slash and backslash. */
#  118|         const char *filep = strrchr(filename, '/');
#  119|->       char *file2 = strrchr(filep ? filep : filename, '\\');
#  120|         char *encfile;
#  121|   

Error: COMPILER_WARNING (CWE-704): [#def272]
curl-8.18.0/src/tool_operhlp.c:119:21: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  117|            side of the rightmost slash and backslash. */
#  118|         const char *filep = strrchr(filename, '/');
#  119|->       char *file2 = strrchr(filep ? filep : filename, '\\');
#  120|         char *encfile;
#  121|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def273]
curl-8.18.0/src/tool_parsecfg.c:130:5: warning[-Wanalyzer-file-leak]: leak of FILE 'file'
curl-8.18.0/src/tool_parsecfg.c:90:5: branch_true: following 'true' branch (when 'filename' is NULL)...
curl-8.18.0/src/tool_parsecfg.c:92:20: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:93:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_parsecfg.c:94:14: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:94:14: acquire_resource: opened here
curl-8.18.0/src/tool_parsecfg.c:95:9: branch_false: following 'false' branch...
curl-8.18.0/src/tool_parsecfg.c:129:10: branch_false: ...to here
curl-8.18.0/src/tool_parsecfg.c:130:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/src/tool_parsecfg.c:130:5: danger: 'file' leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  128|       struct dynbuf pbuf;
#  129|       bool fileerror = FALSE;
#  130|->     curlx_dyn_init(&buf, MAX_CONFIG_LINE_LENGTH);
#  131|       curlx_dyn_init(&pbuf, MAX_CONFIG_LINE_LENGTH);
#  132|       DEBUGASSERT(filename);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def274]
curl-8.18.0/src/tool_parsecfg.c:130:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘file’
curl-8.18.0/src/tool_parsecfg.c:90:5: branch_true: following ‘true’ branch (when ‘filename’ is NULL)...
curl-8.18.0/src/tool_parsecfg.c:92:20: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:93:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_parsecfg.c:94:14: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:94:14: acquire_resource: opened here
curl-8.18.0/src/tool_parsecfg.c:95:9: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_parsecfg.c:129:10: branch_false: ...to here
curl-8.18.0/src/tool_parsecfg.c:130:5: throw: if ‘curlx_dyn_init’ throws an exception...
curl-8.18.0/src/tool_parsecfg.c:130:5: danger: ‘file’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  128|       struct dynbuf pbuf;
#  129|       bool fileerror = FALSE;
#  130|->     curlx_dyn_init(&buf, MAX_CONFIG_LINE_LENGTH);
#  131|       curlx_dyn_init(&pbuf, MAX_CONFIG_LINE_LENGTH);
#  132|       DEBUGASSERT(filename);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
curl-8.18.0/src/tool_parsecfg.c:130:5: warning[-Wanalyzer-malloc-leak]: leak of 'file'
curl-8.18.0/src/tool_parsecfg.c:90:5: branch_true: following 'true' branch (when 'filename' is NULL)...
curl-8.18.0/src/tool_parsecfg.c:92:20: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:93:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_parsecfg.c:94:14: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:94:14: acquire_memory: allocated here
curl-8.18.0/src/tool_parsecfg.c:95:9: branch_false: following 'false' branch...
curl-8.18.0/src/tool_parsecfg.c:129:10: branch_false: ...to here
curl-8.18.0/src/tool_parsecfg.c:130:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/src/tool_parsecfg.c:130:5: danger: 'file' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  128|       struct dynbuf pbuf;
#  129|       bool fileerror = FALSE;
#  130|->     curlx_dyn_init(&buf, MAX_CONFIG_LINE_LENGTH);
#  131|       curlx_dyn_init(&pbuf, MAX_CONFIG_LINE_LENGTH);
#  132|       DEBUGASSERT(filename);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
curl-8.18.0/src/tool_parsecfg.c:130:5: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
curl-8.18.0/src/tool_parsecfg.c:90:5: branch_true: following ‘true’ branch (when ‘filename’ is NULL)...
curl-8.18.0/src/tool_parsecfg.c:92:20: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:93:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_parsecfg.c:94:14: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:94:14: acquire_memory: allocated here
curl-8.18.0/src/tool_parsecfg.c:95:9: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_parsecfg.c:129:10: branch_false: ...to here
curl-8.18.0/src/tool_parsecfg.c:130:5: throw: if ‘curlx_dyn_init’ throws an exception...
curl-8.18.0/src/tool_parsecfg.c:130:5: danger: ‘file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  128|       struct dynbuf pbuf;
#  129|       bool fileerror = FALSE;
#  130|->     curlx_dyn_init(&buf, MAX_CONFIG_LINE_LENGTH);
#  131|       curlx_dyn_init(&pbuf, MAX_CONFIG_LINE_LENGTH);
#  132|       DEBUGASSERT(filename);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def277]
curl-8.18.0/src/tool_parsecfg.c:131:5: warning[-Wanalyzer-file-leak]: leak of FILE 'file'
curl-8.18.0/src/tool_parsecfg.c:90:5: branch_true: following 'true' branch (when 'filename' is NULL)...
curl-8.18.0/src/tool_parsecfg.c:92:20: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:93:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_parsecfg.c:94:14: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:94:14: acquire_resource: opened here
curl-8.18.0/src/tool_parsecfg.c:95:9: branch_false: following 'false' branch...
curl-8.18.0/src/tool_parsecfg.c:129:10: branch_false: ...to here
curl-8.18.0/src/tool_parsecfg.c:131:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/src/tool_parsecfg.c:131:5: danger: 'file' leaks here; was opened at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  129|       bool fileerror = FALSE;
#  130|       curlx_dyn_init(&buf, MAX_CONFIG_LINE_LENGTH);
#  131|->     curlx_dyn_init(&pbuf, MAX_CONFIG_LINE_LENGTH);
#  132|       DEBUGASSERT(filename);
#  133|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def278]
curl-8.18.0/src/tool_parsecfg.c:131:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘file’
curl-8.18.0/src/tool_parsecfg.c:90:5: branch_true: following ‘true’ branch (when ‘filename’ is NULL)...
curl-8.18.0/src/tool_parsecfg.c:92:20: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:93:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_parsecfg.c:94:14: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:94:14: acquire_resource: opened here
curl-8.18.0/src/tool_parsecfg.c:95:9: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_parsecfg.c:129:10: branch_false: ...to here
curl-8.18.0/src/tool_parsecfg.c:131:5: throw: if ‘curlx_dyn_init’ throws an exception...
curl-8.18.0/src/tool_parsecfg.c:131:5: danger: ‘file’ leaks here; was opened at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  129|       bool fileerror = FALSE;
#  130|       curlx_dyn_init(&buf, MAX_CONFIG_LINE_LENGTH);
#  131|->     curlx_dyn_init(&pbuf, MAX_CONFIG_LINE_LENGTH);
#  132|       DEBUGASSERT(filename);
#  133|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def279]
curl-8.18.0/src/tool_parsecfg.c:131:5: warning[-Wanalyzer-malloc-leak]: leak of 'file'
curl-8.18.0/src/tool_parsecfg.c:90:5: branch_true: following 'true' branch (when 'filename' is NULL)...
curl-8.18.0/src/tool_parsecfg.c:92:20: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:93:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_parsecfg.c:94:14: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:94:14: acquire_memory: allocated here
curl-8.18.0/src/tool_parsecfg.c:95:9: branch_false: following 'false' branch...
curl-8.18.0/src/tool_parsecfg.c:129:10: branch_false: ...to here
curl-8.18.0/src/tool_parsecfg.c:131:5: throw: if 'curlx_dyn_init' throws an exception...
curl-8.18.0/src/tool_parsecfg.c:131:5: danger: 'file' leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  129|       bool fileerror = FALSE;
#  130|       curlx_dyn_init(&buf, MAX_CONFIG_LINE_LENGTH);
#  131|->     curlx_dyn_init(&pbuf, MAX_CONFIG_LINE_LENGTH);
#  132|       DEBUGASSERT(filename);
#  133|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
curl-8.18.0/src/tool_parsecfg.c:131:5: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
curl-8.18.0/src/tool_parsecfg.c:90:5: branch_true: following ‘true’ branch (when ‘filename’ is NULL)...
curl-8.18.0/src/tool_parsecfg.c:92:20: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:93:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_parsecfg.c:94:14: branch_true: ...to here
curl-8.18.0/src/tool_parsecfg.c:94:14: acquire_memory: allocated here
curl-8.18.0/src/tool_parsecfg.c:95:9: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_parsecfg.c:129:10: branch_false: ...to here
curl-8.18.0/src/tool_parsecfg.c:131:5: throw: if ‘curlx_dyn_init’ throws an exception...
curl-8.18.0/src/tool_parsecfg.c:131:5: danger: ‘file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  129|       bool fileerror = FALSE;
#  130|       curlx_dyn_init(&buf, MAX_CONFIG_LINE_LENGTH);
#  131|->     curlx_dyn_init(&pbuf, MAX_CONFIG_LINE_LENGTH);
#  132|       DEBUGASSERT(filename);
#  133|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def281]
curl-8.18.0/src/tool_setopt.c:187:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to 'tool_setopt_str'
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following 'false' branch (when 'tag != 10015')...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling 'c_escape' from 'tool_setopt_str'
#  185|     struct dynbuf escaped;
#  186|   
#  187|->   curlx_dyn_init(&escaped, 4 * MAX_STRING_LENGTH_OUTPUT + 3);
#  188|   
#  189|     if(len == ZERO_TERMINATED)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def282]
curl-8.18.0/src/tool_setopt.c:187:3: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to ‘tool_setopt_str’
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following ‘false’ branch (when ‘tag != 10015’)...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling ‘c_escape’ from ‘tool_setopt_str’
#  185|     struct dynbuf escaped;
#  186|   
#  187|->   curlx_dyn_init(&escaped, 4 * MAX_STRING_LENGTH_OUTPUT + 3);
#  188|   
#  189|     if(len == ZERO_TERMINATED)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def283]
curl-8.18.0/src/tool_setopt.c:198:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to 'tool_setopt_str'
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following 'false' branch (when 'tag != 10015')...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling 'c_escape' from 'tool_setopt_str'
#  196|     }
#  197|   
#  198|->   result = curlx_dyn_addn(&escaped, STRCONST(""));
#  199|     for(s = str; !result && len; s++, len--) {
#  200|       /* escape question marks as well, to prevent generating accidental

Error: GCC_ANALYZER_WARNING (CWE-404): [#def284]
curl-8.18.0/src/tool_setopt.c:198:12: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to ‘tool_setopt_str’
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following ‘false’ branch (when ‘tag != 10015’)...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling ‘c_escape’ from ‘tool_setopt_str’
#  196|     }
#  197|   
#  198|->   result = curlx_dyn_addn(&escaped, STRCONST(""));
#  199|     for(s = str; !result && len; s++, len--) {
#  200|       /* escape question marks as well, to prevent generating accidental

Error: GCC_ANALYZER_WARNING (CWE-404): [#def285]
curl-8.18.0/src/tool_setopt.c:209:14: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to 'tool_setopt_str'
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following 'false' branch (when 'tag != 10015')...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling 'c_escape' from 'tool_setopt_str'
#  207|         continue;
#  208|   
#  209|->     result = curlx_dyn_addn(&escaped, str, s - str);
#  210|       str = s + 1;
#  211|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def286]
curl-8.18.0/src/tool_setopt.c:209:14: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to ‘tool_setopt_str’
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following ‘false’ branch (when ‘tag != 10015’)...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling ‘c_escape’ from ‘tool_setopt_str’
#  207|         continue;
#  208|   
#  209|->     result = curlx_dyn_addn(&escaped, str, s - str);
#  210|       str = s + 1;
#  211|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def287]
curl-8.18.0/src/tool_setopt.c:214:18: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to 'tool_setopt_str'
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following 'false' branch (when 'tag != 10015')...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling 'c_escape' from 'tool_setopt_str'
#  212|       if(!result) {
#  213|         if(p && *p)
#  214|->         result = curlx_dyn_addn(&escaped, to + 2 * (p - from), 2);
#  215|         else {
#  216|           result = curlx_dyn_addf(&escaped,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def288]
curl-8.18.0/src/tool_setopt.c:214:18: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to ‘tool_setopt_str’
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following ‘false’ branch (when ‘tag != 10015’)...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling ‘c_escape’ from ‘tool_setopt_str’
#  212|       if(!result) {
#  213|         if(p && *p)
#  214|->         result = curlx_dyn_addn(&escaped, to + 2 * (p - from), 2);
#  215|         else {
#  216|           result = curlx_dyn_addf(&escaped,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def289]
curl-8.18.0/src/tool_setopt.c:216:18: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to 'tool_setopt_str'
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following 'false' branch (when 'tag != 10015')...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling 'c_escape' from 'tool_setopt_str'
#  214|           result = curlx_dyn_addn(&escaped, to + 2 * (p - from), 2);
#  215|         else {
#  216|->         result = curlx_dyn_addf(&escaped,
#  217|                                   /* Octal escape to avoid >2 digit hex. */
#  218|                                   (len > 1 && ISXDIGIT(s[1])) ?

Error: GCC_ANALYZER_WARNING (CWE-404): [#def290]
curl-8.18.0/src/tool_setopt.c:216:18: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to ‘tool_setopt_str’
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following ‘false’ branch (when ‘tag != 10015’)...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling ‘c_escape’ from ‘tool_setopt_str’
#  214|           result = curlx_dyn_addn(&escaped, to + 2 * (p - from), 2);
#  215|         else {
#  216|->         result = curlx_dyn_addf(&escaped,
#  217|                                   /* Octal escape to avoid >2 digit hex. */
#  218|                                   (len > 1 && ISXDIGIT(s[1])) ?

Error: GCC_ANALYZER_WARNING (CWE-404): [#def291]
curl-8.18.0/src/tool_setopt.c:226:14: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to 'tool_setopt_str'
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following 'false' branch (when 'tag != 10015')...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling 'c_escape' from 'tool_setopt_str'
#  224|   
#  225|     if(!result)
#  226|->     result = curlx_dyn_addn(&escaped, str, s - str);
#  227|   
#  228|     if(!result)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def292]
curl-8.18.0/src/tool_setopt.c:226:14: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to ‘tool_setopt_str’
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following ‘false’ branch (when ‘tag != 10015’)...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling ‘c_escape’ from ‘tool_setopt_str’
#  224|   
#  225|     if(!result)
#  226|->     result = curlx_dyn_addn(&escaped, str, s - str);
#  227|   
#  228|     if(!result)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def293]
curl-8.18.0/src/tool_setopt.c:229:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to 'tool_setopt_str'
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following 'false' branch (when 'tag != 10015')...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling 'c_escape' from 'tool_setopt_str'
#  227|   
#  228|     if(!result)
#  229|->     (void)!curlx_dyn_addn(&escaped, "...", cutoff);
#  230|   
#  231|     return curlx_dyn_ptr(&escaped);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def294]
curl-8.18.0/src/tool_setopt.c:229:12: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_setopt.c:662:10: enter_function: entry to ‘tool_setopt_str’
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_false: following ‘false’ branch (when ‘tag != 10015’)...
curl-8.18.0/src/tool_setopt.c:684:15: branch_false: ...to here
curl-8.18.0/src/tool_setopt.c:684:15: call_function: calling ‘c_escape’ from ‘tool_setopt_str’
#  227|   
#  228|     if(!result)
#  229|->     (void)!curlx_dyn_addn(&escaped, "...", cutoff);
#  230|   
#  231|     return curlx_dyn_ptr(&escaped);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def295]
curl-8.18.0/src/tool_setopt.c:647:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_setopt.c:643:3: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_setopt.c:647:12: throw: if 'curl_easy_setopt' throws an exception...
curl-8.18.0/src/tool_setopt.c:647:12: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  645|     pval = va_arg(arg, void *);
#  646|   
#  647|->   result = curl_easy_setopt(curl, tag, pval);
#  648|     if(global->libcurl && pval && !result) {
#  649|       /* we only use this if --libcurl was used */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def296]
curl-8.18.0/src/tool_setopt.c:647:12: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_setopt.c:643:3: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_setopt.c:647:12: throw: if ‘curl_easy_setopt’ throws an exception...
curl-8.18.0/src/tool_setopt.c:647:12: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  645|     pval = va_arg(arg, void *);
#  646|   
#  647|->   result = curl_easy_setopt(curl, tag, pval);
#  648|     if(global->libcurl && pval && !result) {
#  649|       /* we only use this if --libcurl was used */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def297]
curl-8.18.0/src/tool_setopt.c:652:14: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_setopt.c:643:3: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_setopt.c:648:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_setopt.c:652:14: throw: if 'easysrc_addf' throws an exception...
curl-8.18.0/src/tool_setopt.c:652:14: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  650|       const char *remark = (tag >= CURLOPTTYPE_FUNCTIONPOINT) ?
#  651|         "function" : "object";
#  652|->     result = easysrc_addf(&easysrc_toohard,
#  653|                             "%s was set to a%s %s pointer", name,
#  654|                             (*remark == 'o' ? "n" : ""), remark);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def298]
curl-8.18.0/src/tool_setopt.c:652:14: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_setopt.c:643:3: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_setopt.c:648:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_setopt.c:652:14: throw: if ‘easysrc_addf’ throws an exception...
curl-8.18.0/src/tool_setopt.c:652:14: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  650|       const char *remark = (tag >= CURLOPTTYPE_FUNCTIONPOINT) ?
#  651|         "function" : "object";
#  652|->     result = easysrc_addf(&easysrc_toohard,
#  653|                             "%s was set to a%s %s pointer", name,
#  654|                             (*remark == 'o' ? "n" : ""), remark);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def299]
curl-8.18.0/src/tool_setopt.c:677:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_setopt.c:677:12: throw: if 'curl_easy_setopt' throws an exception...
curl-8.18.0/src/tool_setopt.c:677:12: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  675|     str = va_arg(arg, char *);
#  676|   
#  677|->   result = curl_easy_setopt(curl, tag, str);
#  678|     if(global->libcurl && str && !result) {
#  679|       /* we only use this if --libcurl was used */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def300]
curl-8.18.0/src/tool_setopt.c:677:12: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_setopt.c:677:12: throw: if ‘curl_easy_setopt’ throws an exception...
curl-8.18.0/src/tool_setopt.c:677:12: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  675|     str = va_arg(arg, char *);
#  676|   
#  677|->   result = curl_easy_setopt(curl, tag, str);
#  678|     if(global->libcurl && str && !result) {
#  679|       /* we only use this if --libcurl was used */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def301]
curl-8.18.0/src/tool_setopt.c:683:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: 'va_start' called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_true: following 'true' branch (when 'tag == 10015')...
curl-8.18.0/src/tool_setopt.c:683:27: branch_true: ...to here
curl-8.18.0/src/tool_setopt.c:683:13: throw: if 'curlx_dyn_len' throws an exception...
curl-8.18.0/src/tool_setopt.c:683:13: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  681|       char *escaped;
#  682|       if(tag == CURLOPT_POSTFIELDS)
#  683|->       len = curlx_dyn_len(&config->postdata);
#  684|       escaped = c_escape(str, len);
#  685|       if(escaped) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def302]
curl-8.18.0/src/tool_setopt.c:683:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
curl-8.18.0/src/tool_setopt.c:673:3: acquire_resource: ‘va_start’ called here
curl-8.18.0/src/tool_setopt.c:678:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_setopt.c:682:7: branch_true: following ‘true’ branch (when ‘tag == 10015’)...
curl-8.18.0/src/tool_setopt.c:683:27: branch_true: ...to here
curl-8.18.0/src/tool_setopt.c:683:13: throw: if ‘curlx_dyn_len’ throws an exception...
curl-8.18.0/src/tool_setopt.c:683:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  681|       char *escaped;
#  682|       if(tag == CURLOPT_POSTFIELDS)
#  683|->       len = curlx_dyn_len(&config->postdata);
#  684|       escaped = c_escape(str, len);
#  685|       if(escaped) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def303]
curl-8.18.0/src/tool_ssls.c:41:12: warning[-Wanalyzer-file-leak]: leak of FILE 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to 'tool_ssls_save'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_save'
#   39|     CURLcode result = CURLE_OK;
#   40|   
#   41|->   *peasy = curl_easy_init();
#   42|     if(!*peasy)
#   43|       return CURLE_OUT_OF_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def304]
curl-8.18.0/src/tool_ssls.c:41:12: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r")'
curl-8.18.0/src/tool_ssls.c:55:10: enter_function: entry to 'tool_ssls_load'
curl-8.18.0/src/tool_ssls.c:69:8: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:75:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_load'
#   39|     CURLcode result = CURLE_OK;
#   40|   
#   41|->   *peasy = curl_easy_init();
#   42|     if(!*peasy)
#   43|       return CURLE_OUT_OF_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def305]
curl-8.18.0/src/tool_ssls.c:41:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to ‘tool_ssls_save’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_save’
#   39|     CURLcode result = CURLE_OK;
#   40|   
#   41|->   *peasy = curl_easy_init();
#   42|     if(!*peasy)
#   43|       return CURLE_OUT_OF_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def306]
curl-8.18.0/src/tool_ssls.c:41:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
curl-8.18.0/src/tool_ssls.c:55:10: enter_function: entry to ‘tool_ssls_load’
curl-8.18.0/src/tool_ssls.c:69:8: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:75:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_load’
#   39|     CURLcode result = CURLE_OK;
#   40|   
#   41|->   *peasy = curl_easy_init();
#   42|     if(!*peasy)
#   43|       return CURLE_OUT_OF_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
curl-8.18.0/src/tool_ssls.c:41:12: warning[-Wanalyzer-malloc-leak]: leak of 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to 'tool_ssls_save'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_save'
#   39|     CURLcode result = CURLE_OK;
#   40|   
#   41|->   *peasy = curl_easy_init();
#   42|     if(!*peasy)
#   43|       return CURLE_OUT_OF_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def308]
curl-8.18.0/src/tool_ssls.c:41:12: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r")'
curl-8.18.0/src/tool_ssls.c:55:10: enter_function: entry to 'tool_ssls_load'
curl-8.18.0/src/tool_ssls.c:69:8: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:75:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_load'
#   39|     CURLcode result = CURLE_OK;
#   40|   
#   41|->   *peasy = curl_easy_init();
#   42|     if(!*peasy)
#   43|       return CURLE_OUT_OF_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
curl-8.18.0/src/tool_ssls.c:41:12: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to ‘tool_ssls_save’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_save’
#   39|     CURLcode result = CURLE_OK;
#   40|   
#   41|->   *peasy = curl_easy_init();
#   42|     if(!*peasy)
#   43|       return CURLE_OUT_OF_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def310]
curl-8.18.0/src/tool_ssls.c:41:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
curl-8.18.0/src/tool_ssls.c:55:10: enter_function: entry to ‘tool_ssls_load’
curl-8.18.0/src/tool_ssls.c:69:8: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:75:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_load’
#   39|     CURLcode result = CURLE_OK;
#   40|   
#   41|->   *peasy = curl_easy_init();
#   42|     if(!*peasy)
#   43|       return CURLE_OUT_OF_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def311]
curl-8.18.0/src/tool_ssls.c:45:12: warning[-Wanalyzer-file-leak]: leak of FILE 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to 'tool_ssls_save'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_save'
#   43|       return CURLE_OUT_OF_MEMORY;
#   44|   
#   45|->   result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|     if(!result && (global->tracetype != TRACE_NONE)) {
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def312]
curl-8.18.0/src/tool_ssls.c:45:12: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r")'
curl-8.18.0/src/tool_ssls.c:55:10: enter_function: entry to 'tool_ssls_load'
curl-8.18.0/src/tool_ssls.c:69:8: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:75:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_load'
#   43|       return CURLE_OUT_OF_MEMORY;
#   44|   
#   45|->   result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|     if(!result && (global->tracetype != TRACE_NONE)) {
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def313]
curl-8.18.0/src/tool_ssls.c:45:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to ‘tool_ssls_save’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_save’
#   43|       return CURLE_OUT_OF_MEMORY;
#   44|   
#   45|->   result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|     if(!result && (global->tracetype != TRACE_NONE)) {
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def314]
curl-8.18.0/src/tool_ssls.c:45:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
curl-8.18.0/src/tool_ssls.c:55:10: enter_function: entry to ‘tool_ssls_load’
curl-8.18.0/src/tool_ssls.c:69:8: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:75:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_load’
#   43|       return CURLE_OUT_OF_MEMORY;
#   44|   
#   45|->   result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|     if(!result && (global->tracetype != TRACE_NONE)) {
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def315]
curl-8.18.0/src/tool_ssls.c:45:12: warning[-Wanalyzer-malloc-leak]: leak of 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to 'tool_ssls_save'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_save'
#   43|       return CURLE_OUT_OF_MEMORY;
#   44|   
#   45|->   result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|     if(!result && (global->tracetype != TRACE_NONE)) {
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
curl-8.18.0/src/tool_ssls.c:45:12: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r")'
curl-8.18.0/src/tool_ssls.c:55:10: enter_function: entry to 'tool_ssls_load'
curl-8.18.0/src/tool_ssls.c:69:8: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:75:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_load'
#   43|       return CURLE_OUT_OF_MEMORY;
#   44|   
#   45|->   result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|     if(!result && (global->tracetype != TRACE_NONE)) {
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def317]
curl-8.18.0/src/tool_ssls.c:45:12: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to ‘tool_ssls_save’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_save’
#   43|       return CURLE_OUT_OF_MEMORY;
#   44|   
#   45|->   result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|     if(!result && (global->tracetype != TRACE_NONE)) {
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def318]
curl-8.18.0/src/tool_ssls.c:45:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
curl-8.18.0/src/tool_ssls.c:55:10: enter_function: entry to ‘tool_ssls_load’
curl-8.18.0/src/tool_ssls.c:69:8: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:75:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_load’
#   43|       return CURLE_OUT_OF_MEMORY;
#   44|   
#   45|->   result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|     if(!result && (global->tracetype != TRACE_NONE)) {
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def319]
curl-8.18.0/src/tool_ssls.c:46:24: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r")'
curl-8.18.0/src/tool_ssls.c:55:10: enter_function: entry to 'tool_ssls_load'
curl-8.18.0/src/tool_ssls.c:69:8: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:75:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_load'
#   44|   
#   45|     result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|->   if(!result && (global->tracetype != TRACE_NONE)) {
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
#   48|       if(!result)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def320]
curl-8.18.0/src/tool_ssls.c:46:24: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
curl-8.18.0/src/tool_ssls.c:55:10: enter_function: entry to ‘tool_ssls_load’
curl-8.18.0/src/tool_ssls.c:69:8: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:75:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_load’
#   44|   
#   45|     result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|->   if(!result && (global->tracetype != TRACE_NONE)) {
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
#   48|       if(!result)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def321]
curl-8.18.0/src/tool_ssls.c:46:24: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r")'
curl-8.18.0/src/tool_ssls.c:55:10: enter_function: entry to 'tool_ssls_load'
curl-8.18.0/src/tool_ssls.c:69:8: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:75:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_load'
#   44|   
#   45|     result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|->   if(!result && (global->tracetype != TRACE_NONE)) {
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
#   48|       if(!result)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
curl-8.18.0/src/tool_ssls.c:46:24: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
curl-8.18.0/src/tool_ssls.c:55:10: enter_function: entry to ‘tool_ssls_load’
curl-8.18.0/src/tool_ssls.c:69:8: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:75:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_load’
#   44|   
#   45|     result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|->   if(!result && (global->tracetype != TRACE_NONE)) {
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
#   48|       if(!result)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def323]
curl-8.18.0/src/tool_ssls.c:47:14: warning[-Wanalyzer-file-leak]: leak of FILE 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to 'tool_ssls_save'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_save'
#   45|     result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|     if(!result && (global->tracetype != TRACE_NONE)) {
#   47|->     result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
#   48|       if(!result)
#   49|         result = my_setopt_ptr(*peasy, CURLOPT_DEBUGDATA, config);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def324]
curl-8.18.0/src/tool_ssls.c:47:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to ‘tool_ssls_save’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_save’
#   45|     result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|     if(!result && (global->tracetype != TRACE_NONE)) {
#   47|->     result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
#   48|       if(!result)
#   49|         result = my_setopt_ptr(*peasy, CURLOPT_DEBUGDATA, config);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def325]
curl-8.18.0/src/tool_ssls.c:47:14: warning[-Wanalyzer-malloc-leak]: leak of 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to 'tool_ssls_save'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_save'
#   45|     result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|     if(!result && (global->tracetype != TRACE_NONE)) {
#   47|->     result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
#   48|       if(!result)
#   49|         result = my_setopt_ptr(*peasy, CURLOPT_DEBUGDATA, config);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def326]
curl-8.18.0/src/tool_ssls.c:47:14: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to ‘tool_ssls_save’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_save’
#   45|     result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
#   46|     if(!result && (global->tracetype != TRACE_NONE)) {
#   47|->     result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
#   48|       if(!result)
#   49|         result = my_setopt_ptr(*peasy, CURLOPT_DEBUGDATA, config);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def327]
curl-8.18.0/src/tool_ssls.c:49:16: warning[-Wanalyzer-file-leak]: leak of FILE 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to 'tool_ssls_save'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_save'
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
#   48|       if(!result)
#   49|->       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGDATA, config);
#   50|       my_setopt_long(*peasy, CURLOPT_VERBOSE, 1L);
#   51|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def328]
curl-8.18.0/src/tool_ssls.c:49:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to ‘tool_ssls_save’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_save’
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
#   48|       if(!result)
#   49|->       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGDATA, config);
#   50|       my_setopt_long(*peasy, CURLOPT_VERBOSE, 1L);
#   51|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def329]
curl-8.18.0/src/tool_ssls.c:49:16: warning[-Wanalyzer-malloc-leak]: leak of 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to 'tool_ssls_save'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_save'
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
#   48|       if(!result)
#   49|->       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGDATA, config);
#   50|       my_setopt_long(*peasy, CURLOPT_VERBOSE, 1L);
#   51|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def330]
curl-8.18.0/src/tool_ssls.c:49:16: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to ‘tool_ssls_save’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_save’
#   47|       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
#   48|       if(!result)
#   49|->       result = my_setopt_ptr(*peasy, CURLOPT_DEBUGDATA, config);
#   50|       my_setopt_long(*peasy, CURLOPT_VERBOSE, 1L);
#   51|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def331]
curl-8.18.0/src/tool_ssls.c:50:5: warning[-Wanalyzer-file-leak]: leak of FILE 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to 'tool_ssls_save'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_save'
#   48|       if(!result)
#   49|         result = my_setopt_ptr(*peasy, CURLOPT_DEBUGDATA, config);
#   50|->     my_setopt_long(*peasy, CURLOPT_VERBOSE, 1L);
#   51|     }
#   52|     return result;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def332]
curl-8.18.0/src/tool_ssls.c:50:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to ‘tool_ssls_save’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_save’
#   48|       if(!result)
#   49|         result = my_setopt_ptr(*peasy, CURLOPT_DEBUGDATA, config);
#   50|->     my_setopt_long(*peasy, CURLOPT_VERBOSE, 1L);
#   51|     }
#   52|     return result;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def333]
curl-8.18.0/src/tool_ssls.c:50:5: warning[-Wanalyzer-malloc-leak]: leak of 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to 'tool_ssls_save'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling 'tool_ssls_easy' from 'tool_ssls_save'
#   48|       if(!result)
#   49|         result = my_setopt_ptr(*peasy, CURLOPT_DEBUGDATA, config);
#   50|->     my_setopt_long(*peasy, CURLOPT_VERBOSE, 1L);
#   51|     }
#   52|     return result;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def334]
curl-8.18.0/src/tool_ssls.c:50:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:185:10: enter_function: entry to ‘tool_ssls_save’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:199:7: call_function: calling ‘tool_ssls_easy’ from ‘tool_ssls_save’
#   48|       if(!result)
#   49|         result = my_setopt_ptr(*peasy, CURLOPT_DEBUGDATA, config);
#   50|->     my_setopt_long(*peasy, CURLOPT_VERBOSE, 1L);
#   51|     }
#   52|     return result;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def335]
curl-8.18.0/src/tool_ssls.c:122:6: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r")'
curl-8.18.0/src/tool_ssls.c:69:8: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:76:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ssls.c:77:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:122:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ssls.c:123:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:123:5: throw: if 'curl_easy_cleanup' throws an exception...
curl-8.18.0/src/tool_ssls.c:122:6: danger: 'fopen(filename, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  120|   
#  121|   out:
#  122|->   if(easy)
#  123|       curl_easy_cleanup(easy);
#  124|     if(fp)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def336]
curl-8.18.0/src/tool_ssls.c:122:6: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
curl-8.18.0/src/tool_ssls.c:69:8: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:76:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ssls.c:77:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:122:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ssls.c:123:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:123:5: throw: if ‘curl_easy_cleanup’ throws an exception...
curl-8.18.0/src/tool_ssls.c:122:6: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  120|   
#  121|   out:
#  122|->   if(easy)
#  123|       curl_easy_cleanup(easy);
#  124|     if(fp)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def337]
curl-8.18.0/src/tool_ssls.c:122:6: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r")'
curl-8.18.0/src/tool_ssls.c:69:8: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:76:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ssls.c:77:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:122:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ssls.c:123:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:123:5: throw: if 'curl_easy_cleanup' throws an exception...
curl-8.18.0/src/tool_ssls.c:122:6: danger: 'fopen(filename, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  120|   
#  121|   out:
#  122|->   if(easy)
#  123|       curl_easy_cleanup(easy);
#  124|     if(fp)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def338]
curl-8.18.0/src/tool_ssls.c:122:6: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
curl-8.18.0/src/tool_ssls.c:69:8: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:70:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:75:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:76:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ssls.c:77:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:122:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ssls.c:123:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:123:5: throw: if ‘curl_easy_cleanup’ throws an exception...
curl-8.18.0/src/tool_ssls.c:122:6: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  120|   
#  121|   out:
#  122|->   if(easy)
#  123|       curl_easy_cleanup(easy);
#  124|     if(fp)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def339]
curl-8.18.0/src/tool_ssls.c:203:7: warning[-Wanalyzer-file-leak]: leak of FILE 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:200:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:203:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:203:7: throw: if 'curl_easy_ssls_export' throws an exception...
curl-8.18.0/src/tool_ssls.c:203:7: danger: 'ctx.fp' leaks here; was opened at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  201|       goto out;
#  202|   
#  203|->   r = curl_easy_ssls_export(easy, tool_ssls_exp, &ctx);
#  204|   
#  205|   out:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def340]
curl-8.18.0/src/tool_ssls.c:203:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:200:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:203:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:203:7: throw: if ‘curl_easy_ssls_export’ throws an exception...
curl-8.18.0/src/tool_ssls.c:203:7: danger: ‘ctx.fp’ leaks here; was opened at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  201|       goto out;
#  202|   
#  203|->   r = curl_easy_ssls_export(easy, tool_ssls_exp, &ctx);
#  204|   
#  205|   out:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
curl-8.18.0/src/tool_ssls.c:203:7: warning[-Wanalyzer-malloc-leak]: leak of 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:200:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:203:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:203:7: throw: if 'curl_easy_ssls_export' throws an exception...
curl-8.18.0/src/tool_ssls.c:203:7: danger: 'ctx.fp' leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
#  201|       goto out;
#  202|   
#  203|->   r = curl_easy_ssls_export(easy, tool_ssls_exp, &ctx);
#  204|   
#  205|   out:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
curl-8.18.0/src/tool_ssls.c:203:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:200:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:203:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:203:7: throw: if ‘curl_easy_ssls_export’ throws an exception...
curl-8.18.0/src/tool_ssls.c:203:7: danger: ‘ctx.fp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
#  201|       goto out;
#  202|   
#  203|->   r = curl_easy_ssls_export(easy, tool_ssls_exp, &ctx);
#  204|   
#  205|   out:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def343]
curl-8.18.0/src/tool_ssls.c:207:5: warning[-Wanalyzer-file-leak]: leak of FILE 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:200:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ssls.c:201:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:206:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ssls.c:207:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:207:5: throw: if 'curl_easy_cleanup' throws an exception...
curl-8.18.0/src/tool_ssls.c:207:5: danger: 'ctx.fp' leaks here; was opened at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  205|   out:
#  206|     if(easy)
#  207|->     curl_easy_cleanup(easy);
#  208|     if(ctx.fp)
#  209|       curlx_fclose(ctx.fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def344]
curl-8.18.0/src/tool_ssls.c:207:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_resource: opened here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:200:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ssls.c:201:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:206:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ssls.c:207:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:207:5: throw: if ‘curl_easy_cleanup’ throws an exception...
curl-8.18.0/src/tool_ssls.c:207:5: danger: ‘ctx.fp’ leaks here; was opened at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  205|   out:
#  206|     if(easy)
#  207|->     curl_easy_cleanup(easy);
#  208|     if(ctx.fp)
#  209|       curlx_fclose(ctx.fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def345]
curl-8.18.0/src/tool_ssls.c:207:5: warning[-Wanalyzer-malloc-leak]: leak of 'ctx.fp'
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following 'false' branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:200:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ssls.c:201:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:206:5: branch_true: following 'true' branch...
curl-8.18.0/src/tool_ssls.c:207:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:207:5: throw: if 'curl_easy_cleanup' throws an exception...
curl-8.18.0/src/tool_ssls.c:207:5: danger: 'ctx.fp' leaks here; was allocated at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
#  205|   out:
#  206|     if(easy)
#  207|->     curl_easy_cleanup(easy);
#  208|     if(ctx.fp)
#  209|       curlx_fclose(ctx.fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def346]
curl-8.18.0/src/tool_ssls.c:207:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.fp’
curl-8.18.0/src/tool_ssls.c:193:12: acquire_memory: allocated here
curl-8.18.0/src/tool_ssls.c:194:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_ssls.c:199:7: branch_false: ...to here
curl-8.18.0/src/tool_ssls.c:200:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ssls.c:201:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:206:5: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_ssls.c:207:5: branch_true: ...to here
curl-8.18.0/src/tool_ssls.c:207:5: throw: if ‘curl_easy_cleanup’ throws an exception...
curl-8.18.0/src/tool_ssls.c:207:5: danger: ‘ctx.fp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
#  205|   out:
#  206|     if(easy)
#  207|->     curl_easy_cleanup(easy);
#  208|     if(ctx.fp)
#  209|       curlx_fclose(ctx.fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def347]
curl-8.18.0/src/tool_urlglob.c:156:20: warning[-Wanalyzer-malloc-leak]: leak of 'elem'
curl-8.18.0/src/tool_urlglob.c:134:9: branch_false: following 'false' branch (when 'size <= 99999')...
curl-8.18.0/src/tool_urlglob.c:137:9: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:137:9: branch_true: following 'true' branch (when 'palloc == 0')...
curl-8.18.0/src/tool_urlglob.c:139:16: branch_true: ...to here
curl-8.18.0/src/tool_urlglob.c:139:16: acquire_memory: allocated here
curl-8.18.0/src/tool_urlglob.c:151:9: branch_false: following 'false' branch (when 'elem' is non-NULL)...
curl-8.18.0/src/tool_urlglob.c:156:20: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:156:20: throw: if 'curlx_dyn_ptr' throws an exception...
curl-8.18.0/src/tool_urlglob.c:156:20: danger: 'elem' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  154|         }
#  155|   
#  156|->       elem[size] = curlx_strdup(curlx_dyn_ptr(&glob->buf) ?
#  157|                                   curlx_dyn_ptr(&glob->buf) : "");
#  158|         if(!elem[size]) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def348]
curl-8.18.0/src/tool_urlglob.c:156:20: warning[-Wanalyzer-malloc-leak]: leak of ‘elem’
curl-8.18.0/src/tool_urlglob.c:134:9: branch_false: following ‘false’ branch (when ‘size <= 99999’)...
curl-8.18.0/src/tool_urlglob.c:137:9: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:137:9: branch_true: following ‘true’ branch (when ‘palloc == 0’)...
curl-8.18.0/src/tool_urlglob.c:139:16: branch_true: ...to here
curl-8.18.0/src/tool_urlglob.c:139:16: acquire_memory: allocated here
curl-8.18.0/src/tool_urlglob.c:151:9: branch_false: following ‘false’ branch (when ‘elem’ is non-NULL)...
curl-8.18.0/src/tool_urlglob.c:156:20: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:156:20: throw: if ‘curlx_dyn_ptr’ throws an exception...
curl-8.18.0/src/tool_urlglob.c:156:20: danger: ‘elem’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  154|         }
#  155|   
#  156|->       elem[size] = curlx_strdup(curlx_dyn_ptr(&glob->buf) ?
#  157|                                   curlx_dyn_ptr(&glob->buf) : "");
#  158|         if(!elem[size]) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def349]
curl-8.18.0/src/tool_urlglob.c:163:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
curl-8.18.0/src/tool_urlglob.c:134:9: branch_false: following 'false' branch (when 'size <= 99999')...
curl-8.18.0/src/tool_urlglob.c:137:9: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:137:9: branch_true: following 'true' branch (when 'palloc == 0')...
curl-8.18.0/src/tool_urlglob.c:139:16: branch_true: ...to here
curl-8.18.0/src/tool_urlglob.c:151:9: branch_false: following 'false' branch (when 'elem' is non-NULL)...
curl-8.18.0/src/tool_urlglob.c:156:20: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:156:20: acquire_memory: allocated here
curl-8.18.0/src/tool_urlglob.c:158:9: branch_false: following 'false' branch...
curl-8.18.0/src/tool_urlglob.c:162:7: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:163:7: throw: if 'curlx_dyn_reset' throws an exception...
curl-8.18.0/src/tool_urlglob.c:163:7: danger: '<unknown>' leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  161|         }
#  162|         ++size;
#  163|->       curlx_dyn_reset(&glob->buf);
#  164|   
#  165|         ++pattern;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def350]
curl-8.18.0/src/tool_urlglob.c:163:7: warning[-Wanalyzer-malloc-leak]: leak of 'elem'
curl-8.18.0/src/tool_urlglob.c:134:9: branch_false: following 'false' branch (when 'size <= 99999')...
curl-8.18.0/src/tool_urlglob.c:137:9: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:137:9: branch_true: following 'true' branch (when 'palloc == 0')...
curl-8.18.0/src/tool_urlglob.c:139:16: branch_true: ...to here
curl-8.18.0/src/tool_urlglob.c:139:16: acquire_memory: allocated here
curl-8.18.0/src/tool_urlglob.c:151:9: branch_false: following 'false' branch (when 'elem' is non-NULL)...
curl-8.18.0/src/tool_urlglob.c:156:20: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:158:9: branch_false: following 'false' branch...
curl-8.18.0/src/tool_urlglob.c:162:7: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:163:7: throw: if 'curlx_dyn_reset' throws an exception...
curl-8.18.0/src/tool_urlglob.c:163:7: danger: 'elem' leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  161|         }
#  162|         ++size;
#  163|->       curlx_dyn_reset(&glob->buf);
#  164|   
#  165|         ++pattern;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def351]
curl-8.18.0/src/tool_urlglob.c:163:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
curl-8.18.0/src/tool_urlglob.c:134:9: branch_false: following ‘false’ branch (when ‘size <= 99999’)...
curl-8.18.0/src/tool_urlglob.c:137:9: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:137:9: branch_true: following ‘true’ branch (when ‘palloc == 0’)...
curl-8.18.0/src/tool_urlglob.c:139:16: branch_true: ...to here
curl-8.18.0/src/tool_urlglob.c:151:9: branch_false: following ‘false’ branch (when ‘elem’ is non-NULL)...
curl-8.18.0/src/tool_urlglob.c:156:20: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:156:20: acquire_memory: allocated here
curl-8.18.0/src/tool_urlglob.c:158:9: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_urlglob.c:162:7: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:163:7: throw: if ‘curlx_dyn_reset’ throws an exception...
curl-8.18.0/src/tool_urlglob.c:163:7: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  161|         }
#  162|         ++size;
#  163|->       curlx_dyn_reset(&glob->buf);
#  164|   
#  165|         ++pattern;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def352]
curl-8.18.0/src/tool_urlglob.c:163:7: warning[-Wanalyzer-malloc-leak]: leak of ‘elem’
curl-8.18.0/src/tool_urlglob.c:134:9: branch_false: following ‘false’ branch (when ‘size <= 99999’)...
curl-8.18.0/src/tool_urlglob.c:137:9: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:137:9: branch_true: following ‘true’ branch (when ‘palloc == 0’)...
curl-8.18.0/src/tool_urlglob.c:139:16: branch_true: ...to here
curl-8.18.0/src/tool_urlglob.c:139:16: acquire_memory: allocated here
curl-8.18.0/src/tool_urlglob.c:151:9: branch_false: following ‘false’ branch (when ‘elem’ is non-NULL)...
curl-8.18.0/src/tool_urlglob.c:156:20: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:158:9: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_urlglob.c:162:7: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:163:7: throw: if ‘curlx_dyn_reset’ throws an exception...
curl-8.18.0/src/tool_urlglob.c:163:7: danger: ‘elem’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  161|         }
#  162|         ++size;
#  163|->       curlx_dyn_reset(&glob->buf);
#  164|   
#  165|         ++pattern;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def353]
curl-8.18.0/src/tool_urlglob.c:183:10: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
curl-8.18.0/src/tool_urlglob.c:134:9: branch_false: following 'false' branch (when 'size <= 99999')...
curl-8.18.0/src/tool_urlglob.c:137:9: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:137:9: branch_true: following 'true' branch (when 'palloc == 0')...
curl-8.18.0/src/tool_urlglob.c:139:16: branch_true: ...to here
curl-8.18.0/src/tool_urlglob.c:151:9: branch_false: following 'false' branch (when 'elem' is non-NULL)...
curl-8.18.0/src/tool_urlglob.c:156:20: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:156:20: acquire_memory: allocated here
curl-8.18.0/src/tool_urlglob.c:158:9: branch_false: following 'false' branch...
curl-8.18.0/src/tool_urlglob.c:162:7: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:166:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_urlglob.c:167:11: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:183:10: throw: if 'curlx_dyn_addn' throws an exception...
curl-8.18.0/src/tool_urlglob.c:183:10: danger: '<unknown>' leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  181|       default:
#  182|         /* copy character to set element */
#  183|->       if(curlx_dyn_addn(&glob->buf, pattern++, 1)) {
#  184|           result = CURLE_OUT_OF_MEMORY;
#  185|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def354]
curl-8.18.0/src/tool_urlglob.c:183:10: warning[-Wanalyzer-malloc-leak]: leak of 'elem'
curl-8.18.0/src/tool_urlglob.c:134:9: branch_false: following 'false' branch (when 'size <= 99999')...
curl-8.18.0/src/tool_urlglob.c:137:9: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:137:9: branch_true: following 'true' branch (when 'palloc == 0')...
curl-8.18.0/src/tool_urlglob.c:139:16: branch_true: ...to here
curl-8.18.0/src/tool_urlglob.c:139:16: acquire_memory: allocated here
curl-8.18.0/src/tool_urlglob.c:151:9: branch_false: following 'false' branch (when 'elem' is non-NULL)...
curl-8.18.0/src/tool_urlglob.c:156:20: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:158:9: branch_false: following 'false' branch...
curl-8.18.0/src/tool_urlglob.c:162:7: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:166:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_urlglob.c:167:11: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:183:10: throw: if 'curlx_dyn_addn' throws an exception...
curl-8.18.0/src/tool_urlglob.c:183:10: danger: 'elem' leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  181|       default:
#  182|         /* copy character to set element */
#  183|->       if(curlx_dyn_addn(&glob->buf, pattern++, 1)) {
#  184|           result = CURLE_OUT_OF_MEMORY;
#  185|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
curl-8.18.0/src/tool_urlglob.c:183:10: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
curl-8.18.0/src/tool_urlglob.c:134:9: branch_false: following ‘false’ branch (when ‘size <= 99999’)...
curl-8.18.0/src/tool_urlglob.c:137:9: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:137:9: branch_true: following ‘true’ branch (when ‘palloc == 0’)...
curl-8.18.0/src/tool_urlglob.c:139:16: branch_true: ...to here
curl-8.18.0/src/tool_urlglob.c:151:9: branch_false: following ‘false’ branch (when ‘elem’ is non-NULL)...
curl-8.18.0/src/tool_urlglob.c:156:20: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:156:20: acquire_memory: allocated here
curl-8.18.0/src/tool_urlglob.c:158:9: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_urlglob.c:162:7: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:166:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_urlglob.c:167:11: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:183:10: throw: if ‘curlx_dyn_addn’ throws an exception...
curl-8.18.0/src/tool_urlglob.c:183:10: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  181|       default:
#  182|         /* copy character to set element */
#  183|->       if(curlx_dyn_addn(&glob->buf, pattern++, 1)) {
#  184|           result = CURLE_OUT_OF_MEMORY;
#  185|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
curl-8.18.0/src/tool_urlglob.c:183:10: warning[-Wanalyzer-malloc-leak]: leak of ‘elem’
curl-8.18.0/src/tool_urlglob.c:134:9: branch_false: following ‘false’ branch (when ‘size <= 99999’)...
curl-8.18.0/src/tool_urlglob.c:137:9: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:137:9: branch_true: following ‘true’ branch (when ‘palloc == 0’)...
curl-8.18.0/src/tool_urlglob.c:139:16: branch_true: ...to here
curl-8.18.0/src/tool_urlglob.c:139:16: acquire_memory: allocated here
curl-8.18.0/src/tool_urlglob.c:151:9: branch_false: following ‘false’ branch (when ‘elem’ is non-NULL)...
curl-8.18.0/src/tool_urlglob.c:156:20: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:158:9: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_urlglob.c:162:7: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:166:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_urlglob.c:167:11: branch_false: ...to here
curl-8.18.0/src/tool_urlglob.c:183:10: throw: if ‘curlx_dyn_addn’ throws an exception...
curl-8.18.0/src/tool_urlglob.c:183:10: danger: ‘elem’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  181|       default:
#  182|         /* copy character to set element */
#  183|->       if(curlx_dyn_addn(&glob->buf, pattern++, 1)) {
#  184|           result = CURLE_OUT_OF_MEMORY;
#  185|           goto error;

Error: COMPILER_WARNING (CWE-704): [#def357]
curl-8.18.0/src/tool_urlglob.c: scope_hint: In function 'peek_ipv6'
curl-8.18.0/src/tool_urlglob.c:355:17: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
#  355 |   char *endbr = strchr(str, ']');
#      |                 ^~~~~~
#  353|     char hostname[MAX_IP6LEN];
#  354|     CURLU *u;
#  355|->   char *endbr = strchr(str, ']');
#  356|     size_t hlen;
#  357|     CURLUcode rc;

Error: COMPILER_WARNING (CWE-704): [#def358]
curl-8.18.0/src/tool_urlglob.c:355:17: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
#  353|     char hostname[MAX_IP6LEN];
#  354|     CURLU *u;
#  355|->   char *endbr = strchr(str, ']');
#  356|     size_t hlen;
#  357|     CURLUcode rc;

Error: COMPILER_WARNING (CWE-704): [#def359]
curl-8.18.0/src/tool_urlglob.c: scope_hint: In function ‘peek_ipv6’
curl-8.18.0/src/tool_urlglob.c:355:17: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  355 |   char *endbr = strchr(str, ']');
#      |                 ^~~~~~
#  353|     char hostname[MAX_IP6LEN];
#  354|     CURLU *u;
#  355|->   char *endbr = strchr(str, ']');
#  356|     size_t hlen;
#  357|     CURLUcode rc;

Error: COMPILER_WARNING (CWE-704): [#def360]
curl-8.18.0/src/tool_urlglob.c:355:17: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  353|     char hostname[MAX_IP6LEN];
#  354|     CURLU *u;
#  355|->   char *endbr = strchr(str, ']');
#  356|     size_t hlen;
#  357|     CURLUcode rc;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def361]
curl-8.18.0/src/tool_writeout.c:711:25: warning[-Wanalyzer-file-leak]: leak of FILE 'stream'
curl-8.18.0/src/tool_writeout.c:723:6: enter_function: entry to 'ourWriteOut'
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following 'false' branch (when 'writeinfo' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following 'true' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following 'true' branch (when 'flen <= 511')...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_resource: opened here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following 'false' branch (when 'fclose_stream == 0')...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:809:11: call_function: calling 'output_header' from 'ourWriteOut'
#  709|         }
#  710|         else {
#  711|->         if(CURLHE_OK == curl_easy_header(per->curl, hname, 0,
#  712|                                            CURLH_HEADER, -1, &header))
#  713|             fputs(header->value, stream);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def362]
curl-8.18.0/src/tool_writeout.c:711:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘stream’
curl-8.18.0/src/tool_writeout.c:723:6: enter_function: entry to ‘ourWriteOut’
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following ‘false’ branch (when ‘writeinfo’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following ‘true’ branch (when ‘flen <= 511’)...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_resource: opened here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following ‘false’ branch (when ‘fclose_stream == 0’)...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:809:11: call_function: calling ‘output_header’ from ‘ourWriteOut’
#  709|         }
#  710|         else {
#  711|->         if(CURLHE_OK == curl_easy_header(per->curl, hname, 0,
#  712|                                            CURLH_HEADER, -1, &header))
#  713|             fputs(header->value, stream);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def363]
curl-8.18.0/src/tool_writeout.c:711:25: warning[-Wanalyzer-malloc-leak]: leak of 'stream'
curl-8.18.0/src/tool_writeout.c:723:6: enter_function: entry to 'ourWriteOut'
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following 'false' branch (when 'writeinfo' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following 'true' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following 'true' branch (when 'flen <= 511')...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_memory: allocated here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following 'false' branch (when 'fclose_stream == 0')...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:809:11: call_function: calling 'output_header' from 'ourWriteOut'
#  709|         }
#  710|         else {
#  711|->         if(CURLHE_OK == curl_easy_header(per->curl, hname, 0,
#  712|                                            CURLH_HEADER, -1, &header))
#  713|             fputs(header->value, stream);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def364]
curl-8.18.0/src/tool_writeout.c:711:25: warning[-Wanalyzer-malloc-leak]: leak of ‘stream’
curl-8.18.0/src/tool_writeout.c:723:6: enter_function: entry to ‘ourWriteOut’
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following ‘false’ branch (when ‘writeinfo’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following ‘true’ branch (when ‘flen <= 511’)...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_memory: allocated here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following ‘false’ branch (when ‘fclose_stream == 0’)...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:809:11: call_function: calling ‘output_header’ from ‘ourWriteOut’
#  709|         }
#  710|         else {
#  711|->         if(CURLHE_OK == curl_easy_header(per->curl, hname, 0,
#  712|                                            CURLH_HEADER, -1, &header))
#  713|             fputs(header->value, stream);

Error: COMPILER_WARNING (CWE-704): [#def365]
curl-8.18.0/src/tool_writeout.c: scope_hint: In function 'ourWriteOut'
curl-8.18.0/src/tool_writeout.c:751:15: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  751 |           end = strchr(ptr, '}');
#      |               ^
#  749|             struct writeoutvar *wv = NULL;
#  750|             struct writeoutvar find = { 0 };
#  751|->           end = strchr(ptr, '}');
#  752|             ptr += 2; /* pass the % and the { */
#  753|             if(!end) {

Error: COMPILER_WARNING (CWE-704): [#def366]
curl-8.18.0/src/tool_writeout.c:751:15: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  749|             struct writeoutvar *wv = NULL;
#  750|             struct writeoutvar find = { 0 };
#  751|->           end = strchr(ptr, '}');
#  752|             ptr += 2; /* pass the % and the { */
#  753|             if(!end) {

Error: COMPILER_WARNING (CWE-704): [#def367]
curl-8.18.0/src/tool_writeout.c: scope_hint: In function ‘ourWriteOut’
curl-8.18.0/src/tool_writeout.c:751:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  751 |           end = strchr(ptr, '}');
#      |               ^
#  749|             struct writeoutvar *wv = NULL;
#  750|             struct writeoutvar find = { 0 };
#  751|->           end = strchr(ptr, '}');
#  752|             ptr += 2; /* pass the % and the { */
#  753|             if(!end) {

Error: COMPILER_WARNING (CWE-704): [#def368]
curl-8.18.0/src/tool_writeout.c:751:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  749|             struct writeoutvar *wv = NULL;
#  750|             struct writeoutvar find = { 0 };
#  751|->           end = strchr(ptr, '}');
#  752|             ptr += 2; /* pass the % and the { */
#  753|             if(!end) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def369]
curl-8.18.0/src/tool_writeout.c:759:11: warning[-Wanalyzer-file-leak]: leak of FILE 'stream'
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following 'false' branch (when 'writeinfo' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following 'true' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following 'true' branch (when 'flen <= 511')...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_resource: opened here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following 'false' branch (when 'fclose_stream == 0')...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following 'false' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:759:11: throw: if 'curlx_dyn_reset' throws an exception...
curl-8.18.0/src/tool_writeout.c:759:11: danger: 'stream' leaks here; was opened at [(22)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/21)
#  757|             vlen = end - ptr;
#  758|   
#  759|->           curlx_dyn_reset(&name);
#  760|             if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|               find.name = curlx_dyn_ptr(&name);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def370]
curl-8.18.0/src/tool_writeout.c:759:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘stream’
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following ‘false’ branch (when ‘writeinfo’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following ‘true’ branch (when ‘flen <= 511’)...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_resource: opened here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following ‘false’ branch (when ‘fclose_stream == 0’)...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following ‘false’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:759:11: throw: if ‘curlx_dyn_reset’ throws an exception...
curl-8.18.0/src/tool_writeout.c:759:11: danger: ‘stream’ leaks here; was opened at [(22)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/21)
#  757|             vlen = end - ptr;
#  758|   
#  759|->           curlx_dyn_reset(&name);
#  760|             if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|               find.name = curlx_dyn_ptr(&name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def371]
curl-8.18.0/src/tool_writeout.c:759:11: warning[-Wanalyzer-malloc-leak]: leak of 'stream'
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following 'false' branch (when 'writeinfo' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following 'true' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following 'true' branch (when 'flen <= 511')...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_memory: allocated here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following 'false' branch (when 'fclose_stream == 0')...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following 'false' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:759:11: throw: if 'curlx_dyn_reset' throws an exception...
curl-8.18.0/src/tool_writeout.c:759:11: danger: 'stream' leaks here; was allocated at [(22)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/21)
#  757|             vlen = end - ptr;
#  758|   
#  759|->           curlx_dyn_reset(&name);
#  760|             if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|               find.name = curlx_dyn_ptr(&name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def372]
curl-8.18.0/src/tool_writeout.c:759:11: warning[-Wanalyzer-malloc-leak]: leak of ‘stream’
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following ‘false’ branch (when ‘writeinfo’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following ‘true’ branch (when ‘flen <= 511’)...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_memory: allocated here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following ‘false’ branch (when ‘fclose_stream == 0’)...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following ‘false’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:759:11: throw: if ‘curlx_dyn_reset’ throws an exception...
curl-8.18.0/src/tool_writeout.c:759:11: danger: ‘stream’ leaks here; was allocated at [(22)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/21)
#  757|             vlen = end - ptr;
#  758|   
#  759|->           curlx_dyn_reset(&name);
#  760|             if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|               find.name = curlx_dyn_ptr(&name);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def373]
curl-8.18.0/src/tool_writeout.c:760:15: warning[-Wanalyzer-file-leak]: leak of FILE 'stream'
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following 'false' branch (when 'writeinfo' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following 'true' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following 'true' branch (when 'flen <= 511')...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_resource: opened here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following 'false' branch (when 'fclose_stream == 0')...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following 'false' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:760:15: throw: if 'curlx_dyn_addn' throws an exception...
curl-8.18.0/src/tool_writeout.c:760:15: danger: 'stream' leaks here; was opened at [(22)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/21)
#  758|   
#  759|             curlx_dyn_reset(&name);
#  760|->           if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|               find.name = curlx_dyn_ptr(&name);
#  762|               wv = bsearch(&find,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def374]
curl-8.18.0/src/tool_writeout.c:760:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘stream’
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following ‘false’ branch (when ‘writeinfo’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following ‘true’ branch (when ‘flen <= 511’)...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_resource: opened here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following ‘false’ branch (when ‘fclose_stream == 0’)...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following ‘false’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:760:15: throw: if ‘curlx_dyn_addn’ throws an exception...
curl-8.18.0/src/tool_writeout.c:760:15: danger: ‘stream’ leaks here; was opened at [(22)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/21)
#  758|   
#  759|             curlx_dyn_reset(&name);
#  760|->           if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|               find.name = curlx_dyn_ptr(&name);
#  762|               wv = bsearch(&find,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def375]
curl-8.18.0/src/tool_writeout.c:760:15: warning[-Wanalyzer-malloc-leak]: leak of 'stream'
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following 'false' branch (when 'writeinfo' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following 'true' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following 'true' branch (when 'flen <= 511')...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_memory: allocated here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following 'false' branch (when 'fclose_stream == 0')...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following 'false' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:760:15: throw: if 'curlx_dyn_addn' throws an exception...
curl-8.18.0/src/tool_writeout.c:760:15: danger: 'stream' leaks here; was allocated at [(22)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/21)
#  758|   
#  759|             curlx_dyn_reset(&name);
#  760|->           if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|               find.name = curlx_dyn_ptr(&name);
#  762|               wv = bsearch(&find,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def376]
curl-8.18.0/src/tool_writeout.c:760:15: warning[-Wanalyzer-malloc-leak]: leak of ‘stream’
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following ‘false’ branch (when ‘writeinfo’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following ‘true’ branch (when ‘flen <= 511’)...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_memory: allocated here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following ‘false’ branch (when ‘fclose_stream == 0’)...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following ‘false’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:760:15: throw: if ‘curlx_dyn_addn’ throws an exception...
curl-8.18.0/src/tool_writeout.c:760:15: danger: ‘stream’ leaks here; was allocated at [(22)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/21)
#  758|   
#  759|             curlx_dyn_reset(&name);
#  760|->           if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|               find.name = curlx_dyn_ptr(&name);
#  762|               wv = bsearch(&find,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def377]
curl-8.18.0/src/tool_writeout.c:761:25: warning[-Wanalyzer-file-leak]: leak of FILE 'stream'
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following 'false' branch (when 'writeinfo' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following 'true' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following 'true' branch (when 'flen <= 511')...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_resource: opened here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following 'false' branch (when 'fclose_stream == 0')...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following 'false' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:760:13: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:761:25: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:761:25: throw: if 'curlx_dyn_ptr' throws an exception...
curl-8.18.0/src/tool_writeout.c:761:25: danger: 'stream' leaks here; was opened at [(22)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/21)
#  759|             curlx_dyn_reset(&name);
#  760|             if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|->             find.name = curlx_dyn_ptr(&name);
#  762|               wv = bsearch(&find,
#  763|                            variables, CURL_ARRAYSIZE(variables),

Error: GCC_ANALYZER_WARNING (CWE-775): [#def378]
curl-8.18.0/src/tool_writeout.c:761:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘stream’
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following ‘false’ branch (when ‘writeinfo’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following ‘true’ branch (when ‘flen <= 511’)...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_resource: opened here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following ‘false’ branch (when ‘fclose_stream == 0’)...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following ‘false’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:760:13: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:761:25: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:761:25: throw: if ‘curlx_dyn_ptr’ throws an exception...
curl-8.18.0/src/tool_writeout.c:761:25: danger: ‘stream’ leaks here; was opened at [(22)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/21)
#  759|             curlx_dyn_reset(&name);
#  760|             if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|->             find.name = curlx_dyn_ptr(&name);
#  762|               wv = bsearch(&find,
#  763|                            variables, CURL_ARRAYSIZE(variables),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def379]
curl-8.18.0/src/tool_writeout.c:761:25: warning[-Wanalyzer-malloc-leak]: leak of 'stream'
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following 'false' branch (when 'writeinfo' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following 'true' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following 'true' branch (when 'flen <= 511')...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_memory: allocated here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following 'false' branch (when 'fclose_stream == 0')...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following 'false' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:760:13: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:761:25: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:761:25: throw: if 'curlx_dyn_ptr' throws an exception...
curl-8.18.0/src/tool_writeout.c:761:25: danger: 'stream' leaks here; was allocated at [(22)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/21)
#  759|             curlx_dyn_reset(&name);
#  760|             if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|->             find.name = curlx_dyn_ptr(&name);
#  762|               wv = bsearch(&find,
#  763|                            variables, CURL_ARRAYSIZE(variables),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def380]
curl-8.18.0/src/tool_writeout.c:761:25: warning[-Wanalyzer-malloc-leak]: leak of ‘stream’
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following ‘false’ branch (when ‘writeinfo’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following ‘true’ branch (when ‘flen <= 511’)...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_memory: allocated here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following ‘false’ branch (when ‘fclose_stream == 0’)...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following ‘false’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:760:13: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:761:25: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:761:25: throw: if ‘curlx_dyn_ptr’ throws an exception...
curl-8.18.0/src/tool_writeout.c:761:25: danger: ‘stream’ leaks here; was allocated at [(22)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/21)
#  759|             curlx_dyn_reset(&name);
#  760|             if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|->             find.name = curlx_dyn_ptr(&name);
#  762|               wv = bsearch(&find,
#  763|                            variables, CURL_ARRAYSIZE(variables),

Error: COMPILER_WARNING (CWE-704): [#def381]
curl-8.18.0/src/tool_writeout.c:762:16: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  762 |             wv = bsearch(&find,
#      |                ^
#  760|             if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|               find.name = curlx_dyn_ptr(&name);
#  762|->             wv = bsearch(&find,
#  763|                            variables, CURL_ARRAYSIZE(variables),
#  764|                            sizeof(variables[0]), matchvar);

Error: COMPILER_WARNING (CWE-704): [#def382]
curl-8.18.0/src/tool_writeout.c:762:16: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  760|             if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|               find.name = curlx_dyn_ptr(&name);
#  762|->             wv = bsearch(&find,
#  763|                            variables, CURL_ARRAYSIZE(variables),
#  764|                            sizeof(variables[0]), matchvar);

Error: COMPILER_WARNING (CWE-704): [#def383]
curl-8.18.0/src/tool_writeout.c:762:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  762 |             wv = bsearch(&find,
#      |                ^
#  760|             if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|               find.name = curlx_dyn_ptr(&name);
#  762|->             wv = bsearch(&find,
#  763|                            variables, CURL_ARRAYSIZE(variables),
#  764|                            sizeof(variables[0]), matchvar);

Error: COMPILER_WARNING (CWE-704): [#def384]
curl-8.18.0/src/tool_writeout.c:762:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  760|             if(!curlx_dyn_addn(&name, ptr, vlen)) {
#  761|               find.name = curlx_dyn_ptr(&name);
#  762|->             wv = bsearch(&find,
#  763|                            variables, CURL_ARRAYSIZE(variables),
#  764|                            sizeof(variables[0]), matchvar);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def385]
curl-8.18.0/src/tool_writeout.c:796:21: warning[-Wanalyzer-file-leak]: leak of FILE 'stream'
curl-8.18.0/src/tool_writeout.c:723:6: enter_function: entry to 'ourWriteOut'
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following 'false' branch (when 'writeinfo' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following 'true' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following 'true' branch (when 'flen <= 511')...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_resource: opened here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following 'false' branch (when 'fclose_stream == 0')...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following 'false' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:760:13: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:761:25: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:762:18: call_function: inlined call to 'bsearch' from 'ourWriteOut'
curl-8.18.0/src/tool_writeout.c:768:13: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:769:20: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:796:21: throw: if the called function throws an exception...
curl-8.18.0/src/tool_writeout.c:796:21: danger: 'stream' leaks here; was opened at [(23)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/22)
#  794|                 break;
#  795|               default:
#  796|->               (void)wv->writefunc(stream, wv, per, per_result, false);
#  797|                 break;
#  798|               }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def386]
curl-8.18.0/src/tool_writeout.c:796:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘stream’
curl-8.18.0/src/tool_writeout.c:723:6: enter_function: entry to ‘ourWriteOut’
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following ‘false’ branch (when ‘writeinfo’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following ‘true’ branch (when ‘flen <= 511’)...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_resource: opened here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following ‘false’ branch (when ‘fclose_stream == 0’)...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following ‘false’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:760:13: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:761:25: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:762:18: call_function: inlined call to ‘bsearch’ from ‘ourWriteOut’
curl-8.18.0/src/tool_writeout.c:768:13: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:769:20: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:796:21: throw: if the called function throws an exception...
curl-8.18.0/src/tool_writeout.c:796:21: danger: ‘stream’ leaks here; was opened at [(23)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/22)
#  794|                 break;
#  795|               default:
#  796|->               (void)wv->writefunc(stream, wv, per, per_result, false);
#  797|                 break;
#  798|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def387]
curl-8.18.0/src/tool_writeout.c:796:21: warning[-Wanalyzer-malloc-leak]: leak of 'stream'
curl-8.18.0/src/tool_writeout.c:723:6: enter_function: entry to 'ourWriteOut'
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following 'false' branch (when 'writeinfo' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following 'false' branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following 'true' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following 'true' branch (when 'flen <= 511')...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_memory: allocated here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following 'false' branch (when 'fclose_stream == 0')...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following 'false' branch (when 'done == 0')...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following 'false' branch (when 'end' is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:760:13: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:761:25: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:762:18: call_function: inlined call to 'bsearch' from 'ourWriteOut'
curl-8.18.0/src/tool_writeout.c:768:13: branch_true: following 'true' branch...
curl-8.18.0/src/tool_writeout.c:769:20: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:796:21: throw: if the called function throws an exception...
curl-8.18.0/src/tool_writeout.c:796:21: danger: 'stream' leaks here; was allocated at [(23)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/22)
#  794|                 break;
#  795|               default:
#  796|->               (void)wv->writefunc(stream, wv, per, per_result, false);
#  797|                 break;
#  798|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def388]
curl-8.18.0/src/tool_writeout.c:796:21: warning[-Wanalyzer-malloc-leak]: leak of ‘stream’
curl-8.18.0/src/tool_writeout.c:723:6: enter_function: entry to ‘ourWriteOut’
curl-8.18.0/src/tool_writeout.c:733:5: branch_false: following ‘false’ branch (when ‘writeinfo’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:736:3: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:738:7: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:748:11: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:807:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:807:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:811:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:811:16: branch_false: following ‘false’ branch...
curl-8.18.0/src/tool_writeout.c:814:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:814:16: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:816:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:822:13: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:824:27: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:825:15: branch_true: following ‘true’ branch (when ‘flen <= 511’)...
curl-8.18.0/src/tool_writeout.c:827:15: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:829:25: acquire_memory: allocated here
curl-8.18.0/src/tool_writeout.c:831:17: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:833:19: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:833:19: branch_false: following ‘false’ branch (when ‘fclose_stream == 0’)...
curl-8.18.0/src/tool_writeout.c:839:19: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:737:9: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:737:9: branch_false: following ‘false’ branch (when ‘done == 0’)...
curl-8.18.0/src/tool_writeout.c:738:7: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:753:13: branch_false: following ‘false’ branch (when ‘end’ is non-NULL)...
curl-8.18.0/src/tool_writeout.c:757:18: branch_false: ...to here
curl-8.18.0/src/tool_writeout.c:760:13: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:761:25: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:762:18: call_function: inlined call to ‘bsearch’ from ‘ourWriteOut’
curl-8.18.0/src/tool_writeout.c:768:13: branch_true: following ‘true’ branch...
curl-8.18.0/src/tool_writeout.c:769:20: branch_true: ...to here
curl-8.18.0/src/tool_writeout.c:796:21: throw: if the called function throws an exception...
curl-8.18.0/src/tool_writeout.c:796:21: danger: ‘stream’ leaks here; was allocated at [(23)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/22)
#  794|                 break;
#  795|               default:
#  796|->               (void)wv->writefunc(stream, wv, per, per_result, false);
#  797|                 break;
#  798|               }

Error: COMPILER_WARNING (CWE-704): [#def389]
curl-8.18.0/src/tool_writeout.c:821:15: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  821 |           end = strchr(ptr, '}');
#      |               ^
#  819|               ptr += 2;
#  820|             }
#  821|->           end = strchr(ptr, '}');
#  822|             if(end) {
#  823|               char fname[512]; /* holds the longest filename */

Error: COMPILER_WARNING (CWE-704): [#def390]
curl-8.18.0/src/tool_writeout.c:821:15: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  819|               ptr += 2;
#  820|             }
#  821|->           end = strchr(ptr, '}');
#  822|             if(end) {
#  823|               char fname[512]; /* holds the longest filename */

Error: COMPILER_WARNING (CWE-704): [#def391]
curl-8.18.0/src/tool_writeout.c:821:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  821 |           end = strchr(ptr, '}');
#      |               ^
#  819|               ptr += 2;
#  820|             }
#  821|->           end = strchr(ptr, '}');
#  822|             if(end) {
#  823|               char fname[512]; /* holds the longest filename */

Error: COMPILER_WARNING (CWE-704): [#def392]
curl-8.18.0/src/tool_writeout.c:821:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  819|               ptr += 2;
#  820|             }
#  821|->           end = strchr(ptr, '}');
#  822|             if(end) {
#  823|               char fname[512]; /* holds the longest filename */

Error: COMPILER_WARNING (CWE-704): [#def393]
curl-8.18.0/src/var.c: scope_hint: In function 'varexpand'
curl-8.18.0/src/var.c:216:10: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  216 |     envp = strstr(line, "{{");
#      |          ^
#  214|     curlx_dyn_init(out, MAX_EXPAND_CONTENT);
#  215|     do {
#  216|->     envp = strstr(line, "{{");
#  217|       if((envp > line) && envp[-1] == '\\') {
#  218|         /* preceding backslash, we want this verbatim */

Error: COMPILER_WARNING (CWE-704): [#def394]
curl-8.18.0/src/var.c:216:10: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  214|     curlx_dyn_init(out, MAX_EXPAND_CONTENT);
#  215|     do {
#  216|->     envp = strstr(line, "{{");
#  217|       if((envp > line) && envp[-1] == '\\') {
#  218|         /* preceding backslash, we want this verbatim */

Error: COMPILER_WARNING (CWE-704): [#def395]
curl-8.18.0/src/var.c: scope_hint: In function ‘varexpand’
curl-8.18.0/src/var.c:216:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  216 |     envp = strstr(line, "{{");
#      |          ^
#  214|     curlx_dyn_init(out, MAX_EXPAND_CONTENT);
#  215|     do {
#  216|->     envp = strstr(line, "{{");
#  217|       if((envp > line) && envp[-1] == '\\') {
#  218|         /* preceding backslash, we want this verbatim */

Error: COMPILER_WARNING (CWE-704): [#def396]
curl-8.18.0/src/var.c:216:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  214|     curlx_dyn_init(out, MAX_EXPAND_CONTENT);
#  215|     do {
#  216|->     envp = strstr(line, "{{");
#  217|       if((envp > line) && envp[-1] == '\\') {
#  218|         /* preceding backslash, we want this verbatim */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def397]
curl-8.18.0/src/var.c:217:25: warning[-Wanalyzer-null-dereference]: dereference of NULL 'envp'
curl-8.18.0/src/var.c:217:7: branch_true: following 'true' branch (when 'line < envp')...
curl-8.18.0/src/var.c:217:25: branch_true: ...to here
curl-8.18.0/src/var.c:217:25: danger: dereference of NULL 'envp'
#  215|     do {
#  216|       envp = strstr(line, "{{");
#  217|->     if((envp > line) && envp[-1] == '\\') {
#  218|         /* preceding backslash, we want this verbatim */
#  219|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def398]
curl-8.18.0/src/var.c:217:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘envp’
curl-8.18.0/src/var.c:217:7: branch_true: following ‘true’ branch (when ‘line < envp’)...
curl-8.18.0/src/var.c:217:25: branch_true: ...to here
curl-8.18.0/src/var.c:217:25: danger: dereference of NULL ‘envp’
#  215|     do {
#  216|       envp = strstr(line, "{{");
#  217|->     if((envp > line) && envp[-1] == '\\') {
#  218|         /* preceding backslash, we want this verbatim */
#  219|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def399]
curl-8.18.0/src/var.c:360:40: warning[-Wanalyzer-malloc-leak]: leak of 'p'
curl-8.18.0/src/var.c:352:5: branch_false: following 'false' branch...
curl-8.18.0/src/var.c:355:7: branch_false: ...to here
curl-8.18.0/src/var.c:355:7: acquire_memory: allocated here
curl-8.18.0/src/var.c:356:5: branch_true: following 'true' branch (when 'p' is non-NULL)...
curl-8.18.0/src/var.c:357:12: branch_true: ...to here
curl-8.18.0/src/var.c:360:18: branch_false: following 'false' branch (when 'contalloc == 0')...
curl-8.18.0/src/var.c:360:40: branch_false: ...to here
curl-8.18.0/src/var.c:360:40: throw: if 'memdup0' throws an exception...
curl-8.18.0/src/var.c:360:40: danger: 'p' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  358|       /* the null termination byte is already present from above */
#  359|   
#  360|->     p->content = contalloc ? content : memdup0(content, clen);
#  361|       if(p->content) {
#  362|         p->clen = clen;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def400]
curl-8.18.0/src/var.c:360:40: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
curl-8.18.0/src/var.c:352:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/var.c:355:7: branch_false: ...to here
curl-8.18.0/src/var.c:355:7: acquire_memory: allocated here
curl-8.18.0/src/var.c:356:5: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
curl-8.18.0/src/var.c:357:12: branch_true: ...to here
curl-8.18.0/src/var.c:360:18: branch_false: following ‘false’ branch (when ‘contalloc == 0’)...
curl-8.18.0/src/var.c:360:40: branch_false: ...to here
curl-8.18.0/src/var.c:360:40: throw: if ‘memdup0’ throws an exception...
curl-8.18.0/src/var.c:360:40: danger: ‘p’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  358|       /* the null termination byte is already present from above */
#  359|   
#  360|->     p->content = contalloc ? content : memdup0(content, clen);
#  361|       if(p->content) {
#  362|         p->clen = clen;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def401]
curl-8.18.0/src/var.c:458:13: warning[-Wanalyzer-file-leak]: leak of FILE 'file'
curl-8.18.0/src/var.c:398:5: branch_false: following 'false' branch...
curl-8.18.0/src/var.c:402:5: branch_false: ...to here
curl-8.18.0/src/var.c:437:5: branch_false: following 'false' branch...
curl-8.18.0/src/var.c:439:11: branch_false: ...to here
curl-8.18.0/src/var.c:439:10: branch_true: following 'true' branch...
curl-8.18.0/src/var.c:443:5: branch_true: ...to here
curl-8.18.0/src/var.c:446:7: branch_false: following 'false' branch (when the strings are non-equal)...
curl-8.18.0/src/var.c:449:14: branch_false: ...to here
curl-8.18.0/src/var.c:449:14: acquire_resource: opened here
curl-8.18.0/src/var.c:450:9: branch_false: following 'false' branch...
curl-8.18.0/src/var.c:458:13: branch_false: ...to here
curl-8.18.0/src/var.c:458:13: throw: if 'file2memory_range' throws an exception...
curl-8.18.0/src/var.c:458:13: danger: 'file' leaks here; was opened at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  456|       }
#  457|       if(!err) {
#  458|->       err = file2memory_range(&content, &clen, file, startoffset, endoffset);
#  459|         /* in case of out of memory, this should fail the entire operation */
#  460|         if(clen)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def402]
curl-8.18.0/src/var.c:458:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘file’
curl-8.18.0/src/var.c:398:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/var.c:402:5: branch_false: ...to here
curl-8.18.0/src/var.c:437:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/var.c:439:11: branch_false: ...to here
curl-8.18.0/src/var.c:439:10: branch_true: following ‘true’ branch...
curl-8.18.0/src/var.c:443:5: branch_true: ...to here
curl-8.18.0/src/var.c:446:7: branch_false: following ‘false’ branch (when the strings are non-equal)...
curl-8.18.0/src/var.c:449:14: branch_false: ...to here
curl-8.18.0/src/var.c:449:14: acquire_resource: opened here
curl-8.18.0/src/var.c:450:9: branch_false: following ‘false’ branch...
curl-8.18.0/src/var.c:458:13: branch_false: ...to here
curl-8.18.0/src/var.c:458:13: throw: if ‘file2memory_range’ throws an exception...
curl-8.18.0/src/var.c:458:13: danger: ‘file’ leaks here; was opened at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  456|       }
#  457|       if(!err) {
#  458|->       err = file2memory_range(&content, &clen, file, startoffset, endoffset);
#  459|         /* in case of out of memory, this should fail the entire operation */
#  460|         if(clen)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def403]
curl-8.18.0/src/var.c:458:13: warning[-Wanalyzer-malloc-leak]: leak of 'file'
curl-8.18.0/src/var.c:398:5: branch_false: following 'false' branch...
curl-8.18.0/src/var.c:402:5: branch_false: ...to here
curl-8.18.0/src/var.c:437:5: branch_false: following 'false' branch...
curl-8.18.0/src/var.c:439:11: branch_false: ...to here
curl-8.18.0/src/var.c:439:10: branch_true: following 'true' branch...
curl-8.18.0/src/var.c:443:5: branch_true: ...to here
curl-8.18.0/src/var.c:446:7: branch_false: following 'false' branch (when the strings are non-equal)...
curl-8.18.0/src/var.c:449:14: branch_false: ...to here
curl-8.18.0/src/var.c:449:14: acquire_memory: allocated here
curl-8.18.0/src/var.c:450:9: branch_false: following 'false' branch...
curl-8.18.0/src/var.c:458:13: branch_false: ...to here
curl-8.18.0/src/var.c:458:13: throw: if 'file2memory_range' throws an exception...
curl-8.18.0/src/var.c:458:13: danger: 'file' leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
#  456|       }
#  457|       if(!err) {
#  458|->       err = file2memory_range(&content, &clen, file, startoffset, endoffset);
#  459|         /* in case of out of memory, this should fail the entire operation */
#  460|         if(clen)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def404]
curl-8.18.0/src/var.c:458:13: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
curl-8.18.0/src/var.c:398:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/var.c:402:5: branch_false: ...to here
curl-8.18.0/src/var.c:437:5: branch_false: following ‘false’ branch...
curl-8.18.0/src/var.c:439:11: branch_false: ...to here
curl-8.18.0/src/var.c:439:10: branch_true: following ‘true’ branch...
curl-8.18.0/src/var.c:443:5: branch_true: ...to here
curl-8.18.0/src/var.c:446:7: branch_false: following ‘false’ branch (when the strings are non-equal)...
curl-8.18.0/src/var.c:449:14: branch_false: ...to here
curl-8.18.0/src/var.c:449:14: acquire_memory: allocated here
curl-8.18.0/src/var.c:450:9: branch_false: following ‘false’ branch...
curl-8.18.0/src/var.c:458:13: branch_false: ...to here
curl-8.18.0/src/var.c:458:13: throw: if ‘file2memory_range’ throws an exception...
curl-8.18.0/src/var.c:458:13: danger: ‘file’ leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
#  456|       }
#  457|       if(!err) {
#  458|->       err = file2memory_range(&content, &clen, file, startoffset, endoffset);
#  459|         /* in case of out of memory, this should fail the entire operation */
#  460|         if(clen)

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-129.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namecurl-8.18.0-1.fc44
store-results-to/tmp/tmp3em2bcj2/curl-8.18.0-1.fc44.tar.xz
time-created2026-01-08 15:48:26
time-finished2026-01-08 15:53:22
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp3em2bcj2/curl-8.18.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp3em2bcj2/curl-8.18.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9