librepo-1.20.0-4.fc44

List of Findings

Error: COMPILER_WARNING (CWE-252): [#def1]
librepo-1.20.0/examples/c/download_repos_parallel.c: scope_hint: In function ‘main’
librepo-1.20.0/examples/c/download_repos_parallel.c:74:5: warning[-Wunused-result]: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’
#   74 |     system("rm -rf " DESTDIR);
#      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
#   72|     struct stat buffer;
#   73|     if (stat(DESTDIR, &buffer) == 0) {
#   74|->     system("rm -rf " DESTDIR);
#   75|     }
#   76|     mkdir(DESTDIR, 0777);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
librepo-1.20.0/librepo/cleanup.h:39:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(baseurl, "repodata/repomd.xml", 0), 0)’
librepo-1.20.0/librepo/yum.c:1207:1: enter_function: entry to ‘lr_yum_use_local_load_base’
librepo-1.20.0/librepo/yum.c:1246:10: acquire_resource: opened here
librepo-1.20.0/librepo/yum.c:1247:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/yum.c:1255:5: branch_false: ...to here
librepo-1.20.0/librepo/yum.c:1218:28: call_function: inlined call to ‘lr_local_fd_close’ from ‘lr_yum_use_local_load_base’
#   37|       if (fildes < 0)
#   38|           return;
#   39|->     close(fildes);
#   40|   }
#   41|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def3]
librepo-1.20.0/librepo/cleanup.h:65:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘tmp_err’
librepo-1.20.0/tests/test_repoconf.c:184:34: call_function: inlined call to ‘lr_local_free_error’ from ‘repoconf_assert_set_boolean’
#   63|   LR_DEFINE_CLEANUP_FUNCTION0(GChecksum*, lr_local_checksum_free, g_checksum_free)
#   64|   LR_DEFINE_CLEANUP_FUNCTION0(GDir*, lr_local_dir_close, g_dir_close)
#   65|-> LR_DEFINE_CLEANUP_FUNCTION0(GError*, lr_local_free_error, g_error_free)
#   66|   LR_DEFINE_CLEANUP_FUNCTION0(GHashTable*, lr_local_hashtable_unref, g_hash_table_unref)
#   67|   #if GLIB_CHECK_VERSION(2, 32, 0)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def4]
librepo-1.20.0/librepo/cleanup.h:65:1: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/tests/test_repoconf.c:209:1: enter_function: entry to ‘repoconf_assert_set_strv’
librepo-1.20.0/tests/test_repoconf.c:219:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/tests/test_repoconf.c:220:41: branch_true: following ‘true’ branch (when ‘s’ is non-NULL)...
librepo-1.20.0/tests/test_repoconf.c:221:9: branch_true: ...to here
librepo-1.20.0/tests/test_repoconf.c:215:34: call_function: inlined call to ‘lr_local_free_error’ from ‘repoconf_assert_set_strv’
 branch_false: ...to here
librepo-1.20.0/tests/test_repoconf.c:215:34: call_function: inlined call to ‘lr_local_free_error’ from ‘repoconf_assert_set_strv’
#   63|   LR_DEFINE_CLEANUP_FUNCTION0(GChecksum*, lr_local_checksum_free, g_checksum_free)
#   64|   LR_DEFINE_CLEANUP_FUNCTION0(GDir*, lr_local_dir_close, g_dir_close)
#   65|-> LR_DEFINE_CLEANUP_FUNCTION0(GError*, lr_local_free_error, g_error_free)
#   66|   LR_DEFINE_CLEANUP_FUNCTION0(GHashTable*, lr_local_hashtable_unref, g_hash_table_unref)
#   67|   #if GLIB_CHECK_VERSION(2, 32, 0)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def5]
librepo-1.20.0/librepo/cleanup.h:77:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘strv’
librepo-1.20.0/tests/test_repoconf.c:153:32: call_function: inlined call to ‘lr_local_strfreev’ from ‘repoconf_assert_strv_eq’
#   75|   LR_DEFINE_CLEANUP_FUNCTIONt(GString*, lr_local_free_string, g_string_free)
#   76|   
#   77|-> LR_DEFINE_CLEANUP_FUNCTION(char**, lr_local_strfreev, g_strfreev)
#   78|   LR_DEFINE_CLEANUP_FUNCTION(GList*, lr_local_free_list, g_list_free)
#   79|   LR_DEFINE_CLEANUP_FUNCTION(GSList*, lr_local_free_slist, g_slist_free)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
librepo-1.20.0/librepo/cleanup.h:89:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(localpath, "metalink.xml", 0), 0)’
librepo-1.20.0/librepo/handle.c:1126:1: enter_function: entry to ‘lr_handle_prepare_metalink’
librepo-1.20.0/librepo/handle.c:1128:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1129:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1129:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1135:8: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1138:15: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1141:15: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1141:15: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1145:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1146:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:1147:18: acquire_resource: opened here
librepo-1.20.0/librepo/handle.c:1148:16: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1143:31: call_function: inlined call to ‘lr_local_free’ from ‘lr_handle_prepare_metalink’
#   87|   lr_local_free(void *v)
#   88|   {
#   89|->     g_free(*(void **)v);
#   90|   }
#   91|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
librepo-1.20.0/librepo/cleanup.h:89:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(localpath, "mirrorlist", 0), 0)’
librepo-1.20.0/librepo/handle.c:1010:1: enter_function: entry to ‘lr_handle_prepare_mirrorlist’
librepo-1.20.0/librepo/handle.c:1012:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1018:8: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1021:15: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1024:15: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1024:15: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1028:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1029:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:1030:18: acquire_resource: opened here
librepo-1.20.0/librepo/handle.c:1031:16: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1026:31: call_function: inlined call to ‘lr_local_free’ from ‘lr_handle_prepare_mirrorlist’
#   87|   lr_local_free(void *v)
#   88|   {
#   89|->     g_free(*(void **)v);
#   90|   }
#   91|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def8]
librepo-1.20.0/librepo/cleanup.h:89:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:716:17: call_function: calling ‘lr_key_file_get_string_list’ from ‘lr_yum_repoconf_getinfo’
#   87|   lr_local_free(void *v)
#   88|   {
#   89|->     g_free(*(void **)v);
#   90|   }
#   91|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
librepo-1.20.0/librepo/downloader.c:1086:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(cf, 0)’
librepo-1.20.0/librepo/downloader.c:1058:7: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/downloader.c:1059:9: branch_true: ...to here
librepo-1.20.0/librepo/downloader.c:1074:38: branch_true: following ‘true’ branch (when ‘file’ is non-NULL)...
librepo-1.20.0/librepo/downloader.c:1075:19: branch_true: ...to here
librepo-1.20.0/librepo/downloader.c:1078:16: branch_false: following ‘false’ branch (when the strings are non-equal)...
librepo-1.20.0/librepo/downloader.c:1081:26: branch_false: ...to here
librepo-1.20.0/librepo/downloader.c:1081:26: acquire_resource: opened here
librepo-1.20.0/librepo/downloader.c:1082:16: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/downloader.c:1086:60: branch_false: ...to here
librepo-1.20.0/librepo/downloader.c:1086:16: danger: ‘open(cf, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 1084|                   continue;
# 1085|               }
# 1086|->             if(lr_zck_valid_header(target->target, (char *)file->data, chk_fd,
# 1087|                                      &tmp_err)) {
# 1088|                   g_debug("%s: Found file with same header at %s", __func__,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def10]
librepo-1.20.0/librepo/downloader.c:1231:31: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(cf, 0)’
librepo-1.20.0/librepo/downloader.c:1191:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/downloader.c:1202:7: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/downloader.c:1203:9: branch_true: ...to here
librepo-1.20.0/librepo/downloader.c:1218:38: branch_true: following ‘true’ branch (when ‘file’ is non-NULL)...
librepo-1.20.0/librepo/downloader.c:1219:19: branch_true: ...to here
librepo-1.20.0/librepo/downloader.c:1222:16: branch_false: following ‘false’ branch (when the strings are non-equal)...
librepo-1.20.0/librepo/downloader.c:1225:26: branch_false: ...to here
librepo-1.20.0/librepo/downloader.c:1225:26: acquire_resource: opened here
librepo-1.20.0/librepo/downloader.c:1226:16: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/downloader.c:1231:31: branch_false: ...to here
librepo-1.20.0/librepo/downloader.c:1231:31: danger: ‘open(cf, 0)’ leaks here; was opened at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
# 1229|               }
# 1230|   
# 1231|->             zckCtx *zck_src = zck_create();
# 1232|               if(!zck_init_read(zck_src, chk_fd)) {
# 1233|                   zck_free(&zck_src);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def11]
librepo-1.20.0/librepo/downloader.c:1232:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(cf, 0)’
librepo-1.20.0/librepo/downloader.c:1191:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/downloader.c:1202:7: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/downloader.c:1203:9: branch_true: ...to here
librepo-1.20.0/librepo/downloader.c:1218:38: branch_true: following ‘true’ branch (when ‘file’ is non-NULL)...
librepo-1.20.0/librepo/downloader.c:1219:19: branch_true: ...to here
librepo-1.20.0/librepo/downloader.c:1222:16: branch_false: following ‘false’ branch (when the strings are non-equal)...
librepo-1.20.0/librepo/downloader.c:1225:26: branch_false: ...to here
librepo-1.20.0/librepo/downloader.c:1225:26: acquire_resource: opened here
librepo-1.20.0/librepo/downloader.c:1226:16: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/downloader.c:1231:31: branch_false: ...to here
librepo-1.20.0/librepo/downloader.c:1232:17: danger: ‘open(cf, 0)’ leaks here; was opened at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
# 1230|   
# 1231|               zckCtx *zck_src = zck_create();
# 1232|->             if(!zck_init_read(zck_src, chk_fd)) {
# 1233|                   zck_free(&zck_src);
# 1234|                   close(chk_fd);

Error: COMPILER_WARNING (CWE-477): [#def12]
librepo-1.20.0/librepo/downloader.c: scope_hint: In function ‘prepare_next_transfer’
librepo-1.20.0/librepo/downloader.c:1634:9: warning[-Wdeprecated-declarations]: ‘CURLOPT_PROGRESSFUNCTION’ is deprecated: since 7.32.0. Use CURLOPT_XFERINFOFUNCTION
# 1634 |         c_rc = curl_easy_setopt(h, CURLOPT_PROGRESSFUNCTION, lr_progresscb) ||
#      |         ^~~~
librepo-1.20.0/librepo/downloader.c:37: included_from: Included from here.
/usr/include/curl/curl.h:1333:3: note: declared here
# 1333 |   CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
#      |   ^~~~~~~~~~~~~~~~~
# 1632|       target->cb_return_code = LR_CB_OK;
# 1633|       if (target->target->progresscb) {
# 1634|->         c_rc = curl_easy_setopt(h, CURLOPT_PROGRESSFUNCTION, lr_progresscb) ||
# 1635|                  curl_easy_setopt(h, CURLOPT_NOPROGRESS, 0) ||
# 1636|                  curl_easy_setopt(h, CURLOPT_PROGRESSDATA, target);

Error: COMPILER_WARNING (CWE-477): [#def13]
librepo-1.20.0/librepo/downloader.c:1634:9: warning[-Wdeprecated-declarations]: ‘CURLOPT_PROGRESSFUNCTION’ is deprecated: since 7.32.0. Use CURLOPT_XFERINFOFUNCTION
# 1632|       target->cb_return_code = LR_CB_OK;
# 1633|       if (target->target->progresscb) {
# 1634|->         c_rc = curl_easy_setopt(h, CURLOPT_PROGRESSFUNCTION, lr_progresscb) ||
# 1635|                  curl_easy_setopt(h, CURLOPT_NOPROGRESS, 0) ||
# 1636|                  curl_easy_setopt(h, CURLOPT_PROGRESSDATA, target);

Error: COMPILER_WARNING (CWE-9001): [#def14]
librepo-1.20.0/librepo/downloader.c: scope_hint: In function ‘prepare_next_transfer’
librepo-1.20.0/librepo/downloader.c:1635:16: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
# 1635 |                curl_easy_setopt(h, CURLOPT_NOPROGRESS, 0) ||
#      |                ^
# 1633|       if (target->target->progresscb) {
# 1634|           c_rc = curl_easy_setopt(h, CURLOPT_PROGRESSFUNCTION, lr_progresscb) ||
# 1635|->                curl_easy_setopt(h, CURLOPT_NOPROGRESS, 0) ||
# 1636|                  curl_easy_setopt(h, CURLOPT_PROGRESSDATA, target);
# 1637|           assert(c_rc == CURLE_OK);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def15]
librepo-1.20.0/librepo/downloadtarget.c:178:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/downloadtarget.c:169:5: branch_false: following ‘false’ branch (when ‘target’ is non-NULL)...
librepo-1.20.0/librepo/downloadtarget.c:170:5: branch_false: ...to here
librepo-1.20.0/librepo/downloadtarget.c:170:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/downloadtarget.c:172:8: branch_false: ...to here
librepo-1.20.0/librepo/downloadtarget.c:172:8: branch_true: following ‘true’ branch (when ‘format’ is non-NULL)...
librepo-1.20.0/librepo/downloadtarget.c:175:16: branch_true: ...to here
librepo-1.20.0/librepo/downloadtarget.c:177:9: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/downloadtarget.c:178:15: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  176|   
#  177|           va_start(vl, format);
#  178|->         ret = g_vasprintf(&message, format, vl);
#  179|           va_end(vl);
#  180|   

Error: COMPILER_WARNING (CWE-9001): [#def16]
librepo-1.20.0/librepo/fastestmirror.c:360:20: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  360 |         curlcode = curl_easy_setopt(curlh, CURLOPT_CONNECT_ONLY, 1);
#      |                    ^~~~~~~~~~~~~~~~
#  358|           }
#  359|   
#  360|->         curlcode = curl_easy_setopt(curlh, CURLOPT_CONNECT_ONLY, 1);
#  361|           if (curlcode != CURLE_OK) {
#  362|               g_set_error(err, LR_FASTESTMIRROR_ERROR, LRE_CURL,

Error: COMPILER_WARNING (CWE-9001): [#def17]
librepo-1.20.0/librepo/fastestmirror.c:360:20: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  358|           }
#  359|   
#  360|->         curlcode = curl_easy_setopt(curlh, CURLOPT_CONNECT_ONLY, 1);
#  361|           if (curlcode != CURLE_OK) {
#  362|               g_set_error(err, LR_FASTESTMIRROR_ERROR, LRE_CURL,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def18]
librepo-1.20.0/librepo/gpg_rpm.c:130:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘creat(path, 420)’
librepo-1.20.0/librepo/gpg_rpm.c:146:1: enter_function: entry to ‘write_memory_to_file’
librepo-1.20.0/librepo/gpg_rpm.c:147:20: acquire_resource: opened here
librepo-1.20.0/librepo/gpg_rpm.c:148:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/gpg_rpm.c:154:25: branch_false: ...to here
librepo-1.20.0/librepo/gpg_rpm.c:154:25: call_function: calling ‘write_memory_to_file_fd’ from ‘write_memory_to_file’
#  128|   static ssize_t
#  129|   write_memory_to_file_fd(int fd, const guint8 * buf, size_t len, GError **err) {
#  130|->     const ssize_t ret = write(fd, buf, len);
#  131|       if (ret == -1) {
#  132|           const gchar * errstr = g_strerror(errno);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def19]
librepo-1.20.0/librepo/gpg_rpm.c:133:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘creat(path, 420)’
librepo-1.20.0/librepo/gpg_rpm.c:146:1: enter_function: entry to ‘write_memory_to_file’
librepo-1.20.0/librepo/gpg_rpm.c:147:20: acquire_resource: opened here
librepo-1.20.0/librepo/gpg_rpm.c:148:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/gpg_rpm.c:154:25: branch_false: ...to here
librepo-1.20.0/librepo/gpg_rpm.c:154:25: call_function: calling ‘write_memory_to_file_fd’ from ‘write_memory_to_file’
#  131|       if (ret == -1) {
#  132|           const gchar * errstr = g_strerror(errno);
#  133|->         g_debug("%s: Error writing to file descriptor %i: %s", __func__, fd, errstr);
#  134|           g_set_error(err, LR_GPG_ERROR, LRE_IO, "Error writing to file descriptor %i: %s", fd, errstr);
#  135|           return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def20]
librepo-1.20.0/librepo/gpg_rpm.c:138:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘creat(path, 420)’
librepo-1.20.0/librepo/gpg_rpm.c:146:1: enter_function: entry to ‘write_memory_to_file’
librepo-1.20.0/librepo/gpg_rpm.c:147:20: acquire_resource: opened here
librepo-1.20.0/librepo/gpg_rpm.c:148:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/gpg_rpm.c:154:25: branch_false: ...to here
librepo-1.20.0/librepo/gpg_rpm.c:154:25: call_function: calling ‘write_memory_to_file_fd’ from ‘write_memory_to_file’
#  136|       }
#  137|       if (ret != len) {
#  138|->         g_debug("%s: Requested to write %li octets, but written %li.", __func__, (long)len, (long)ret);
#  139|           g_set_error(err, LR_GPG_ERROR, LRE_IO, "Requested to write %li octets, but written %li", (long)len, (long)ret);
#  140|           return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
librepo-1.20.0/librepo/gpg_rpm.c:139:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘creat(path, 420)’
librepo-1.20.0/librepo/gpg_rpm.c:146:1: enter_function: entry to ‘write_memory_to_file’
librepo-1.20.0/librepo/gpg_rpm.c:147:20: acquire_resource: opened here
librepo-1.20.0/librepo/gpg_rpm.c:148:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/gpg_rpm.c:154:25: branch_false: ...to here
librepo-1.20.0/librepo/gpg_rpm.c:154:25: call_function: calling ‘write_memory_to_file_fd’ from ‘write_memory_to_file’
#  137|       if (ret != len) {
#  138|           g_debug("%s: Requested to write %li octets, but written %li.", __func__, (long)len, (long)ret);
#  139|->         g_set_error(err, LR_GPG_ERROR, LRE_IO, "Requested to write %li octets, but written %li", (long)len, (long)ret);
#  140|           return -1;
#  141|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
librepo-1.20.0/librepo/gpg_rpm.c:169:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pkts’
librepo-1.20.0/librepo/gpg_rpm.c:522:1: enter_function: entry to ‘check_signature’
librepo-1.20.0/librepo/gpg_rpm.c:526:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/gpg_rpm.c:553:9: branch_false: ...to here
librepo-1.20.0/librepo/gpg_rpm.c:554:16: acquire_memory: allocated here
librepo-1.20.0/librepo/gpg_rpm.c:559:9: call_function: calling ‘lr_pgpPrtParams2_with_gerror’ from ‘check_signature’
#  167|       retval =
#  168|   #ifdef HAVE_PGPPRTPARAMS2
#  169|->         pgpPrtParams2(pkts, pktlen, pkttype, ret, &message);
#  170|   #else
#  171|           pgpPrtParams(pkts, pktlen, pkttype, ret);

Error: CPPCHECK_WARNING (CWE-476): [#def23]
librepo-1.20.0/librepo/gpg_rpm.c:555: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pkts
#  553|           pkts_len = sig_buf_len;
#  554|           pkts = malloc(sig_buf_len);
#  555|->         memcpy(pkts, sig_buf, sig_buf_len);
#  556|       }
#  557|   

Error: COMPILER_WARNING (CWE-9001): [#def24]
librepo-1.20.0/librepo/handle.c: scope_hint: In function ‘lr_get_curl_handle’
librepo-1.20.0/librepo/handle.c:65:9: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#   65 |     if (curl_easy_setopt(h, CURLOPT_FOLLOWLOCATION, 1) != CURLE_OK)
#      |         ^
#   63|           return NULL;
#   64|   
#   65|->     if (curl_easy_setopt(h, CURLOPT_FOLLOWLOCATION, 1) != CURLE_OK)
#   66|           goto err;
#   67|       if (curl_easy_setopt(h, CURLOPT_MAXREDIRS, 6) != CURLE_OK)

Error: COMPILER_WARNING (CWE-9001): [#def25]
librepo-1.20.0/librepo/handle.c:67:9: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#   67 |     if (curl_easy_setopt(h, CURLOPT_MAXREDIRS, 6) != CURLE_OK)
#      |         ^
#   65|       if (curl_easy_setopt(h, CURLOPT_FOLLOWLOCATION, 1) != CURLE_OK)
#   66|           goto err;
#   67|->     if (curl_easy_setopt(h, CURLOPT_MAXREDIRS, 6) != CURLE_OK)
#   68|           goto err;
#   69|       if (curl_easy_setopt(h, CURLOPT_CONNECTTIMEOUT, LRO_CONNECTTIMEOUT_DEFAULT) != CURLE_OK)

Error: COMPILER_WARNING (CWE-9001): [#def26]
librepo-1.20.0/librepo/handle.c:75:9: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#   75 |     if (curl_easy_setopt(h, CURLOPT_SSL_VERIFYHOST, 2) != CURLE_OK)
#      |         ^
#   73|       if (curl_easy_setopt(h, CURLOPT_LOW_SPEED_LIMIT, LRO_LOWSPEEDLIMIT_DEFAULT) != CURLE_OK)
#   74|           goto err;
#   75|->     if (curl_easy_setopt(h, CURLOPT_SSL_VERIFYHOST, 2) != CURLE_OK)
#   76|           goto err;
#   77|       if (curl_easy_setopt(h, CURLOPT_SSL_VERIFYPEER, 1) != CURLE_OK)

Error: COMPILER_WARNING (CWE-9001): [#def27]
librepo-1.20.0/librepo/handle.c:77:9: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#   77 |     if (curl_easy_setopt(h, CURLOPT_SSL_VERIFYPEER, 1) != CURLE_OK)
#      |         ^
#   75|       if (curl_easy_setopt(h, CURLOPT_SSL_VERIFYHOST, 2) != CURLE_OK)
#   76|           goto err;
#   77|->     if (curl_easy_setopt(h, CURLOPT_SSL_VERIFYPEER, 1) != CURLE_OK)
#   78|           goto err;
#   79|       if (curl_easy_setopt(h, CURLOPT_SSL_VERIFYSTATUS, 0) != CURLE_OK)

Error: COMPILER_WARNING (CWE-9001): [#def28]
librepo-1.20.0/librepo/handle.c:79:9: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#   79 |     if (curl_easy_setopt(h, CURLOPT_SSL_VERIFYSTATUS, 0) != CURLE_OK)
#      |         ^
#   77|       if (curl_easy_setopt(h, CURLOPT_SSL_VERIFYPEER, 1) != CURLE_OK)
#   78|           goto err;
#   79|->     if (curl_easy_setopt(h, CURLOPT_SSL_VERIFYSTATUS, 0) != CURLE_OK)
#   80|           goto err;
#   81|       if (curl_easy_setopt(h, CURLOPT_FTP_USE_EPSV, LRO_FTPUSEEPSV_DEFAULT) != CURLE_OK)

Error: COMPILER_WARNING (CWE-9001): [#def29]
librepo-1.20.0/librepo/handle.c:83:9: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#   83 |     if (curl_easy_setopt(h, CURLOPT_FILETIME, 0) != CURLE_OK)
#      |         ^
#   81|       if (curl_easy_setopt(h, CURLOPT_FTP_USE_EPSV, LRO_FTPUSEEPSV_DEFAULT) != CURLE_OK)
#   82|           goto err;
#   83|->     if (curl_easy_setopt(h, CURLOPT_FILETIME, 0) != CURLE_OK)
#   84|           goto err;
#   85|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def30]
librepo-1.20.0/librepo/handle.c:99:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:316:1: enter_function: entry to ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:575:9: call_function: calling ‘lr_handle_free_list’ from ‘lr_handle_setopt’
#   97|           return;
#   98|       for (int x=0; (*list)[x]; x++)
#   99|->         lr_free((*list)[x]);
#  100|       lr_free(*list);
#  101|       *list = NULL;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def31]
librepo-1.20.0/librepo/handle.c:100:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:316:1: enter_function: entry to ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:575:9: call_function: calling ‘lr_handle_free_list’ from ‘lr_handle_setopt’
#   98|       for (int x=0; (*list)[x]; x++)
#   99|           lr_free((*list)[x]);
#  100|->     lr_free(*list);
#  101|       *list = NULL;
#  102|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def32]
librepo-1.20.0/librepo/handle.c:239:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:316:1: enter_function: entry to ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:392:9: call_function: calling ‘lr_handle_remote_sources_changed’ from ‘lr_handle_setopt’
#  237|   
#  238|       // Internal mirrorlist is no more valid
#  239|->     lr_lrmirrorlist_free(handle->internal_mirrorlist);
#  240|       handle->internal_mirrorlist = NULL;
#  241|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def33]
librepo-1.20.0/librepo/handle.c:243:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:316:1: enter_function: entry to ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:392:9: call_function: calling ‘lr_handle_remote_sources_changed’ from ‘lr_handle_setopt’
#  241|   
#  242|       // Mirrors reported via mirrors are no more valid too
#  243|->     lr_lrmirrorlist_free(handle->mirrors);
#  244|       handle->mirrors = NULL;
#  245|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def34]
librepo-1.20.0/librepo/handle.c:247:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:316:1: enter_function: entry to ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:544:12: branch_true: following ‘true’ branch (when ‘option == 1’)...
librepo-1.20.0/librepo/handle.c:545:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:546:13: call_function: calling ‘lr_handle_remote_sources_changed’ from ‘lr_handle_setopt’
#  245|   
#  246|       if (type == LR_REMOTESOURCE_URLS) {
#  247|->         lr_lrmirrorlist_free(handle->urls_mirrors);
#  248|           handle->urls_mirrors = NULL;
#  249|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def35]
librepo-1.20.0/librepo/handle.c:252:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:316:1: enter_function: entry to ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:375:9: call_function: calling ‘lr_handle_remote_sources_changed’ from ‘lr_handle_setopt’
#  250|   
#  251|       if (type == LR_REMOTESOURCE_MIRRORLIST) {
#  252|->         lr_lrmirrorlist_free(handle->mirrorlist_mirrors);
#  253|           handle->mirrorlist_mirrors = NULL;
#  254|           if (handle->mirrorlist_fd != -1)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def36]
librepo-1.20.0/librepo/handle.c:255:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:316:1: enter_function: entry to ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:375:9: call_function: calling ‘lr_handle_remote_sources_changed’ from ‘lr_handle_setopt’
#  253|           handle->mirrorlist_mirrors = NULL;
#  254|           if (handle->mirrorlist_fd != -1)
#  255|->             close(handle->mirrorlist_fd);
#  256|           handle->mirrorlist_fd = -1;
#  257|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def37]
librepo-1.20.0/librepo/handle.c:260:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:316:1: enter_function: entry to ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:382:9: call_function: calling ‘lr_handle_remote_sources_changed’ from ‘lr_handle_setopt’
#  258|   
#  259|       if (type == LR_REMOTESOURCE_METALINK) {
#  260|->         lr_lrmirrorlist_free(handle->metalink_mirrors);
#  261|           handle->metalink_mirrors = NULL;
#  262|           if (handle->metalink_fd != -1)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def38]
librepo-1.20.0/librepo/handle.c:349:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:349:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/2)
#  347|       case LRO_MIRRORLIST:
#  348|           // DEPRECATED!
#  349|->         g_warning("WARNING! Deprecated LRO_MIRRORLIST used");
#  350|           if (handle->mirrorlist) lr_free(handle->mirrorlist);
#  351|           handle->mirrorlist = g_strdup(va_arg(arg, char *));

Error: GCC_ANALYZER_WARNING (CWE-404): [#def39]
librepo-1.20.0/librepo/handle.c:350:33: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:350:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:350:33: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:350:33: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/2)
#  348|           // DEPRECATED!
#  349|           g_warning("WARNING! Deprecated LRO_MIRRORLIST used");
#  350|->         if (handle->mirrorlist) lr_free(handle->mirrorlist);
#  351|           handle->mirrorlist = g_strdup(va_arg(arg, char *));
#  352|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def40]
librepo-1.20.0/librepo/handle.c:354:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:316:1: enter_function: entry to ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:353:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:354:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:354:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(4)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/3)
#  352|   
#  353|           if (handle->mirrorlisturl)
#  354|->             lr_free(handle->mirrorlisturl);
#  355|           handle->mirrorlisturl = NULL;
#  356|           if (handle->metalinkurl)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def41]
librepo-1.20.0/librepo/handle.c:357:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:316:1: enter_function: entry to ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:353:12: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:355:9: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:356:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:357:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:357:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(4)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/3)
#  355|           handle->mirrorlisturl = NULL;
#  356|           if (handle->metalinkurl)
#  357|->             lr_free(handle->metalinkurl);
#  358|           handle->metalinkurl = NULL;
#  359|           lr_handle_remote_sources_changed(handle, LR_REMOTESOURCE_MIRRORLIST);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def42]
librepo-1.20.0/librepo/handle.c:373:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:372:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:373:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:373:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/2)
#  371|       case LRO_MIRRORLISTURL:
#  372|           if (handle->mirrorlisturl)
#  373|->             lr_free(handle->mirrorlisturl);
#  374|           handle->mirrorlisturl = g_strdup(va_arg(arg, char *));
#  375|           lr_handle_remote_sources_changed(handle, LR_REMOTESOURCE_MIRRORLIST);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def43]
librepo-1.20.0/librepo/handle.c:380:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:379:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:380:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:380:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/2)
#  378|       case LRO_METALINKURL:
#  379|           if (handle->metalinkurl)
#  380|->             lr_free(handle->metalinkurl);
#  381|           handle->metalinkurl = g_strdup(va_arg(arg, char *));
#  382|           lr_handle_remote_sources_changed(handle, LR_REMOTESOURCE_METALINK);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def44]
librepo-1.20.0/librepo/handle.c:387:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:386:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:387:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:387:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/2)
#  385|       case LRO_ONETIMEFLAG:
#  386|           if (handle->onetimeflag)
#  387|->             lr_free(handle->onetimeflag);
#  388|           handle->onetimeflag = g_strdup(va_arg(arg, char *));
#  389|           break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def45]
librepo-1.20.0/librepo/handle.c:439:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
 branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:439:13: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:439:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/2)
#  437|           }
#  438|           if (curl_proxy == -1) {
#  439|->             g_set_error(err, LR_HANDLE_ERROR, LRE_BADOPTARG,
#  440|                       "Bad LRO_PROXYTYPE value");
#  441|               ret = FALSE;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def46]
librepo-1.20.0/librepo/handle.c:473:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:472:12: branch_true: following ‘true’ branch (when ‘val_gint64 < 0’)...
librepo-1.20.0/librepo/handle.c:473:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:473:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/2)
#  471|           val_gint64 = va_arg(arg, gint64);
#  472|           if (val_gint64 < 0) {
#  473|->             g_set_error(err, LR_HANDLE_ERROR, LRE_BADOPTARG,
#  474|                           "Bad value of LRO_MAXSPEED");
#  475|               ret = FALSE;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def47]
librepo-1.20.0/librepo/handle.c:478:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:472:12: branch_false: following ‘false’ branch (when ‘val_gint64 >= 0’)...
librepo-1.20.0/librepo/handle.c:477:19: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:477:19: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:478:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/2)
#  476|               break;
#  477|           } else if (val_gint64 != 0 && val_gint64 < handle->lowspeedlimit) {
#  478|->             g_set_error(err, LR_HANDLE_ERROR, LRE_BADOPTARG,
#  479|                           "LRO_MAXSPEED (%"G_GINT64_FORMAT") is lower than "
#  480|                           "LRO_LOWSPEEDLIMIT (%ld)", val_gint64,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def48]
librepo-1.20.0/librepo/handle.c:489:30: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:489:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:489:30: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:489:30: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/2)
#  487|   
#  488|       case LRO_DESTDIR:
#  489|->         if (handle->destdir) lr_free(handle->destdir);
#  490|           handle->destdir = g_strdup(va_arg(arg, char *));
#  491|           break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def49]
librepo-1.20.0/librepo/handle.c:496:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:495:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:496:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:496:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/2)
#  494|           handle->repotype = va_arg(arg, LrRepotype);
#  495|           if (handle->repotype != LR_YUMREPO) {
#  496|->             g_set_error(err, LR_HANDLE_ERROR, LRE_BADOPTARG,
#  497|                           "Bad value of LRO_REPOTYPE");
#  498|               ret = FALSE;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def50]
librepo-1.20.0/librepo/handle.c:516:32: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:516:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:516:32: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:516:32: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/2)
#  514|       case LRO_USERAGENT: {
#  515|           char *useragent = va_arg(arg, char *);
#  516|->         if (handle->useragent) lr_free(handle->useragent);
#  517|           handle->useragent = g_strdup(useragent);
#  518|           c_rc = curl_easy_setopt(c_h, CURLOPT_USERAGENT, useragent);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def51]
librepo-1.20.0/librepo/handle.c:568:24: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:316:1: enter_function: entry to ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:544:12: branch_true: following ‘true’ branch (when ‘option == 1’)...
librepo-1.20.0/librepo/handle.c:545:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:546:13: call_function: calling ‘lr_handle_remote_sources_changed’ from ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:546:13: return_function: returning to ‘lr_handle_setopt’ from ‘lr_handle_remote_sources_changed’
librepo-1.20.0/librepo/handle.c:553:9: call_function: calling ‘lr_handle_free_list’ from ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:553:9: return_function: returning to ‘lr_handle_setopt’ from ‘lr_handle_free_list’
librepo-1.20.0/librepo/handle.c:554:12: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)...
 branch_false: ...to here
librepo-1.20.0/librepo/handle.c:562:12: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:568:24: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:568:24: danger: missing call to ‘va_end’ to match ‘va_start’ at [(4)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/3)
#  566|   
#  567|           // Copy the list
#  568|->         *handle_list = lr_strv_dup(list);
#  569|           break;
#  570|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def52]
librepo-1.20.0/librepo/handle.c:576:30: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:316:1: enter_function: entry to ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:575:9: call_function: calling ‘lr_handle_free_list’ from ‘lr_handle_setopt’
librepo-1.20.0/librepo/handle.c:575:9: return_function: returning to ‘lr_handle_setopt’ from ‘lr_handle_free_list’
librepo-1.20.0/librepo/handle.c:576:30: danger: missing call to ‘va_end’ to match ‘va_start’ at [(4)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/3)
#  574|           char **list = va_arg(arg, char **);
#  575|           lr_handle_free_list(&handle->httpheader);
#  576|->         handle->httpheader = lr_strv_dup(list);
#  577|           break;
#  578|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def53]
librepo-1.20.0/librepo/handle.c:588:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:587:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:588:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:588:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/2)
#  586|   
#  587|           if (handle->maxmirrortries < LRO_MAXMIRRORTRIES_MIN) {
#  588|->             g_set_error(err, LR_HANDLE_ERROR, LRE_BADOPTARG,
#  589|                       "Value of LRO_MAXMIRRORTRIES is too low (use value > %ld)",
#  590|                       LRO_MAXMIRRORTRIES_MIN);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def54]
librepo-1.20.0/librepo/handle.c:603:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:601:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:603:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:603:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/62/codeFlows/0/threadFlows/0/locations/2)
#  601|           if (val_long < LRO_MAXPARALLELDOWNLOADS_MIN ||
#  602|               val_long > LRO_MAXPARALLELDOWNLOADS_MAX) {
#  603|->             g_set_error(err, LR_HANDLE_ERROR, LRE_BADOPTARG,
#  604|                           "Bad value of LRO_MAXPARALLELDOWNLOADS.");
#  605|               ret = FALSE;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def55]
librepo-1.20.0/librepo/handle.c:616:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:615:12: branch_true: following ‘true’ branch (when ‘val_long <= 0’)...
librepo-1.20.0/librepo/handle.c:616:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:616:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/64/codeFlows/0/threadFlows/0/locations/2)
#  614|   
#  615|           if (val_long < LRO_MAXDOWNLOADSPERMIRROR_MIN) {
#  616|->             g_set_error(err, LR_HANDLE_ERROR, LRE_BADOPTARG,
#  617|                           "Value of LRO_MAXDOWNLOADSPERMIRROR is too low.");
#  618|               ret = FALSE;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def56]
librepo-1.20.0/librepo/handle.c:627:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:627:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/2)
#  625|       case LRO_YUMSLIST: {
#  626|           LrUrlVars *vars = va_arg(arg, LrUrlVars *);
#  627|->         lr_urlvars_free(handle->yumslist);
#  628|           handle->yumslist = vars;
#  629|           break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def57]
librepo-1.20.0/librepo/handle.c:634:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:634:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/2)
#  632|       case LRO_VARSUB: {
#  633|           LrUrlVars *vars = va_arg(arg, LrUrlVars *);
#  634|->         lr_urlvars_free(handle->urlvars);
#  635|           handle->urlvars = vars;
#  636|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def58]
librepo-1.20.0/librepo/handle.c:653:41: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:653:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:653:41: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:653:41: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/2)
#  651|       case LRO_FASTESTMIRRORCACHE: {
#  652|           char *fastestmirrorcache = va_arg(arg, char *);
#  653|->         if (handle->fastestmirrorcache) lr_free(handle->fastestmirrorcache);
#  654|           handle->fastestmirrorcache = g_strdup(fastestmirrorcache);
#  655|           break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def59]
librepo-1.20.0/librepo/handle.c:662:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:661:12: branch_true: following ‘true’ branch (when ‘val_long < 0’)...
librepo-1.20.0/librepo/handle.c:662:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:662:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/2)
#  660|   
#  661|           if (val_long < LRO_FASTESTMIRRORMAXAGE_MIN) {
#  662|->             g_set_error(err, LR_HANDLE_ERROR, LRE_BADOPTARG,
#  663|                           "Value of LRO_FASTESTMIRRORMAXAGE is too low.");
#  664|               ret = FALSE;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def60]
librepo-1.20.0/librepo/handle.c:683:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:682:12: branch_true: following ‘true’ branch (when ‘val_long < 0’)...
librepo-1.20.0/librepo/handle.c:683:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:683:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/2)
#  681|   
#  682|           if (val_long < LRO_LOWSPEEDTIME_MIN) {
#  683|->             g_set_error(err, LR_HANDLE_ERROR, LRE_BADOPTARG,
#  684|                           "Value of LRO_LOWSPEEDTIME is too low.");
#  685|               ret = FALSE;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def61]
librepo-1.20.0/librepo/handle.c:697:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:696:12: branch_true: following ‘true’ branch (when ‘val_long < 0’)...
librepo-1.20.0/librepo/handle.c:697:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:697:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/73/codeFlows/0/threadFlows/0/locations/2)
#  695|   
#  696|           if (val_long < LRO_LOWSPEEDLIMIT_MIN) {
#  697|->             g_set_error(err, LR_HANDLE_ERROR, LRE_BADOPTARG,
#  698|                           "Value of LRO_LOWSPEEDLIMIT is too low.");
#  699|               ret = FALSE;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def62]
librepo-1.20.0/librepo/handle.c:701:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:696:12: branch_false: following ‘false’ branch (when ‘val_long >= 0’)...
librepo-1.20.0/librepo/handle.c:700:20: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:700:19: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:701:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/75/codeFlows/0/threadFlows/0/locations/2)
#  699|               ret = FALSE;
#  700|           } else if (handle->maxspeed != 0 && handle->maxspeed < val_long) {
#  701|->             g_set_error(err, LR_HANDLE_ERROR, LRE_BADOPTARG,
#  702|                           "Value of LRO_LOWSPEEDLIMIT (%ld) is higher than "
#  703|                           "LRO_MAXSPEED (%"G_GINT64_FORMAT")",

Error: GCC_ANALYZER_WARNING (CWE-404): [#def63]
librepo-1.20.0/librepo/handle.c:734:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:733:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:734:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:734:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/77/codeFlows/0/threadFlows/0/locations/2)
#  732|       case LRO_SSLCLIENTCERT:
#  733|           if (handle->sslclientcert)
#  734|->             lr_free(handle->sslclientcert);
#  735|           handle->sslclientcert = g_strdup(va_arg(arg, char *));
#  736|           c_rc = curl_easy_setopt(c_h, CURLOPT_SSLCERT, handle->sslclientcert);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def64]
librepo-1.20.0/librepo/handle.c:744:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:743:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:744:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:744:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/78/codeFlows/0/threadFlows/0/locations/2)
#  742|       case LRO_SSLCLIENTKEY:
#  743|           if (handle->sslclientkey)
#  744|->             lr_free(handle->sslclientkey);
#  745|           handle->sslclientkey = g_strdup(va_arg(arg, char *));
#  746|           c_rc = curl_easy_setopt(c_h, CURLOPT_SSLKEY, handle->sslclientkey);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def65]
librepo-1.20.0/librepo/handle.c:754:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:753:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:754:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:754:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/79/codeFlows/0/threadFlows/0/locations/2)
#  752|       case LRO_SSLCACERT:
#  753|           if (handle->sslcacert)
#  754|->             lr_free(handle->sslcacert);
#  755|           handle->sslcacert = g_strdup(va_arg(arg, char *));
#  756|           c_rc = curl_easy_setopt(c_h, CURLOPT_CAINFO, handle->sslcacert);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def66]
librepo-1.20.0/librepo/handle.c:771:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:770:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:771:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:771:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/80/codeFlows/0/threadFlows/0/locations/2)
#  769|       case LRO_PROXY_SSLCLIENTCERT:
#  770|           if (handle->proxy_sslclientcert)
#  771|->             lr_free(handle->proxy_sslclientcert);
#  772|           handle->proxy_sslclientcert = g_strdup(va_arg(arg, char *));
#  773|           c_rc = curl_easy_setopt(c_h, CURLOPT_PROXY_SSLCERT, handle->proxy_sslclientcert);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def67]
librepo-1.20.0/librepo/handle.c:781:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:780:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:781:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:781:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/81/codeFlows/0/threadFlows/0/locations/2)
#  779|       case LRO_PROXY_SSLCLIENTKEY:
#  780|           if (handle->proxy_sslclientkey)
#  781|->             lr_free(handle->proxy_sslclientkey);
#  782|           handle->proxy_sslclientkey = g_strdup(va_arg(arg, char *));
#  783|           c_rc = curl_easy_setopt(c_h, CURLOPT_PROXY_SSLKEY, handle->proxy_sslclientkey);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def68]
librepo-1.20.0/librepo/handle.c:791:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:790:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:791:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:791:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/82/codeFlows/0/threadFlows/0/locations/2)
#  789|       case LRO_PROXY_SSLCACERT:
#  790|           if (handle->proxy_sslcacert)
#  791|->             lr_free(handle->proxy_sslcacert);
#  792|           handle->proxy_sslcacert = g_strdup(va_arg(arg, char *));
#  793|           c_rc = curl_easy_setopt(c_h, CURLOPT_PROXY_CAINFO, handle->proxy_sslcacert);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def69]
librepo-1.20.0/librepo/handle.c:806:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
 branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:806:13: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:806:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/83/codeFlows/0/threadFlows/0/locations/2)
#  804|           }
#  805|           if (type == -1) {
#  806|->             g_set_error(err, LR_HANDLE_ERROR, LRE_BADOPTARG,
#  807|                       "Bad LRO_IPRESOLVE value");
#  808|               ret = FALSE;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def70]
librepo-1.20.0/librepo/handle.c:826:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:826:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/85/codeFlows/0/threadFlows/0/locations/2)
#  824|       case LRO_GNUPGHOMEDIR: {
#  825|           char *gnupghomedir = va_arg(arg, char *);
#  826|->         lr_free(handle->gnupghomedir);
#  827|           handle->gnupghomedir = g_strdup(gnupghomedir);
#  828|           break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def71]
librepo-1.20.0/librepo/handle.c:862:31: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:862:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:862:31: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:862:31: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/86/codeFlows/0/threadFlows/0/locations/2)
#  860|   
#  861|       case LRO_CACHEDIR:
#  862|->         if (handle->cachedir) lr_free(handle->cachedir);
#  863|           handle->cachedir = g_strdup(va_arg(arg, char *));
#  864|           break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def72]
librepo-1.20.0/librepo/handle.c:872:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:872:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/87/codeFlows/0/threadFlows/0/locations/2)
#  870|   
#  871|       default:
#  872|->         g_set_error(err, LR_HANDLE_ERROR, LRE_BADOPTARG,
#  873|                       "Unknown option");
#  874|           ret = FALSE;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def73]
librepo-1.20.0/librepo/handle.c:884:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:880:8: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:882:9: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:882:9: branch_true: following ‘true’ branch (when ‘c_rc == 2’)...
librepo-1.20.0/librepo/handle.c:883:9: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:884:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/89/codeFlows/0/threadFlows/0/locations/2)
#  882|           switch (c_rc) {
#  883|           case CURLE_FAILED_INIT:
#  884|->             g_set_error(err, LR_HANDLE_ERROR, LRE_CURLSETOPT,
#  885|                           "curl_easy_setopt error: %s",
#  886|                           curl_easy_strerror(c_rc));

Error: GCC_ANALYZER_WARNING (CWE-404): [#def74]
librepo-1.20.0/librepo/handle.c:889:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:332:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:338:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:340:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:880:8: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:882:9: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:882:9: branch_false: following ‘false’ branch (when ‘c_rc != 2’)...
librepo-1.20.0/librepo/handle.c:888:9: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:889:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/92/codeFlows/0/threadFlows/0/locations/2)
#  887|               break;
#  888|           default:
#  889|->             g_set_error(err, LR_HANDLE_ERROR, LRE_CURL,
#  890|                           "curl error: %s",
#  891|                           curl_easy_strerror(c_rc));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def75]
librepo-1.20.0/librepo/handle.c:1087:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
librepo-1.20.0/librepo/handle.c:1010:1: enter_function: entry to ‘lr_handle_prepare_mirrorlist’
librepo-1.20.0/librepo/handle.c:1012:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1018:8: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1021:15: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1024:15: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1024:15: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1028:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1029:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:1030:18: acquire_resource: opened here
librepo-1.20.0/librepo/handle.c:1031:16: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1026:31: call_function: inlined call to ‘lr_local_free’ from ‘lr_handle_prepare_mirrorlist’
librepo-1.20.0/librepo/handle.c:1087:5: danger: ‘fd’ leaks here; was opened at [(10)](sarif:/runs/0/results/95/codeFlows/0/threadFlows/0/locations/9)
# 1085|       // Parse the file descriptor content
# 1086|   
# 1087|->     g_debug("%s: Parsing mirrorlist", __func__);
# 1088|   
# 1089|       LrMirrorlist *ml = lr_mirrorlist_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def76]
librepo-1.20.0/librepo/handle.c:1089:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
librepo-1.20.0/librepo/handle.c:1010:1: enter_function: entry to ‘lr_handle_prepare_mirrorlist’
librepo-1.20.0/librepo/handle.c:1012:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1018:8: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1021:15: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1024:15: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1024:15: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1028:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1029:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:1030:18: acquire_resource: opened here
librepo-1.20.0/librepo/handle.c:1031:16: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1026:31: call_function: inlined call to ‘lr_local_free’ from ‘lr_handle_prepare_mirrorlist’
librepo-1.20.0/librepo/handle.c:1089:24: danger: ‘fd’ leaks here; was opened at [(10)](sarif:/runs/0/results/96/codeFlows/0/threadFlows/0/locations/9)
# 1087|       g_debug("%s: Parsing mirrorlist", __func__);
# 1088|   
# 1089|->     LrMirrorlist *ml = lr_mirrorlist_init();
# 1090|       gboolean ret = lr_mirrorlist_parse_file(ml, fd, err);
# 1091|       if (!ret) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def77]
librepo-1.20.0/librepo/handle.c:1090:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
librepo-1.20.0/librepo/handle.c:1010:1: enter_function: entry to ‘lr_handle_prepare_mirrorlist’
librepo-1.20.0/librepo/handle.c:1012:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1018:8: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1021:15: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1024:15: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1024:15: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1028:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1029:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:1030:18: acquire_resource: opened here
librepo-1.20.0/librepo/handle.c:1031:16: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1026:31: call_function: inlined call to ‘lr_local_free’ from ‘lr_handle_prepare_mirrorlist’
librepo-1.20.0/librepo/handle.c:1090:20: danger: ‘fd’ leaks here; was opened at [(10)](sarif:/runs/0/results/97/codeFlows/0/threadFlows/0/locations/9)
# 1088|   
# 1089|       LrMirrorlist *ml = lr_mirrorlist_init();
# 1090|->     gboolean ret = lr_mirrorlist_parse_file(ml, fd, err);
# 1091|       if (!ret) {
# 1092|           g_debug("%s: Error while parsing mirrorlist", __func__);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def78]
librepo-1.20.0/librepo/handle.c:1204:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
librepo-1.20.0/librepo/handle.c:1126:1: enter_function: entry to ‘lr_handle_prepare_metalink’
librepo-1.20.0/librepo/handle.c:1128:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1129:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1129:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1135:8: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1138:15: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1141:15: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1141:15: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1145:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1146:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:1147:18: acquire_resource: opened here
librepo-1.20.0/librepo/handle.c:1148:16: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1143:31: call_function: inlined call to ‘lr_local_free’ from ‘lr_handle_prepare_metalink’
librepo-1.20.0/librepo/handle.c:1204:5: danger: ‘fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/98/codeFlows/0/threadFlows/0/locations/11)
# 1202|       // Parse the file descriptor content
# 1203|   
# 1204|->     g_debug("%s: Parsing metalink.xml", __func__);
# 1205|   
# 1206|       gchar *metalink_file = "";

Error: GCC_ANALYZER_WARNING (CWE-775): [#def79]
librepo-1.20.0/librepo/handle.c:1213:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
librepo-1.20.0/librepo/handle.c:1126:1: enter_function: entry to ‘lr_handle_prepare_metalink’
librepo-1.20.0/librepo/handle.c:1128:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1129:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1129:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1135:8: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1138:15: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1141:15: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1141:15: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1145:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1146:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:1147:18: acquire_resource: opened here
librepo-1.20.0/librepo/handle.c:1148:16: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1143:31: call_function: inlined call to ‘lr_local_free’ from ‘lr_handle_prepare_metalink’
librepo-1.20.0/librepo/handle.c:1208:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1213:22: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1213:22: danger: ‘fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/99/codeFlows/0/threadFlows/0/locations/11)
# 1211|       }
# 1212|   
# 1213|->     LrMetalink *ml = lr_metalink_init();
# 1214|       gboolean ret = lr_metalink_parse_file(ml,
# 1215|                                             fd,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def80]
librepo-1.20.0/librepo/handle.c:1214:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
librepo-1.20.0/librepo/handle.c:1126:1: enter_function: entry to ‘lr_handle_prepare_metalink’
librepo-1.20.0/librepo/handle.c:1128:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1129:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1129:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1135:8: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1138:15: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1141:15: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1141:15: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1145:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/handle.c:1146:13: branch_true: ...to here
librepo-1.20.0/librepo/handle.c:1147:18: acquire_resource: opened here
librepo-1.20.0/librepo/handle.c:1148:16: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1143:31: call_function: inlined call to ‘lr_local_free’ from ‘lr_handle_prepare_metalink’
librepo-1.20.0/librepo/handle.c:1208:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/handle.c:1213:22: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1214:20: danger: ‘fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/100/codeFlows/0/threadFlows/0/locations/11)
# 1212|   
# 1213|       LrMetalink *ml = lr_metalink_init();
# 1214|->     gboolean ret = lr_metalink_parse_file(ml,
# 1215|                                             fd,
# 1216|                                             metalink_file,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def81]
librepo-1.20.0/librepo/handle.c:1597:20: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:1514:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:1520:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1520:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:1592:12: branch_false: following ‘false’ branch (when ‘source_list’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:1597:20: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1597:20: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/101/codeFlows/0/threadFlows/0/locations/2)
# 1595|           }
# 1596|   
# 1597|->         *strlist = lr_strv_dup(source_list);
# 1598|           break;
# 1599|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def82]
librepo-1.20.0/librepo/handle.c:1793:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/handle.c:1514:8: branch_false: following ‘false’ branch (when ‘handle’ is non-NULL)...
librepo-1.20.0/librepo/handle.c:1520:5: branch_false: ...to here
librepo-1.20.0/librepo/handle.c:1520:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/handle.c:1793:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/102/codeFlows/0/threadFlows/0/locations/2)
# 1791|       default:
# 1792|           rc = FALSE;
# 1793|->         g_set_error(err, LR_HANDLE_ERROR, LRE_UNKNOWNOPT,
# 1794|                       "Unknown option");
# 1795|           break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def83]
librepo-1.20.0/librepo/metadata_downloader.c:106:28: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/metadata_downloader.c:466:1: enter_function: entry to ‘append_url_target’
librepo-1.20.0/librepo/metadata_downloader.c:468:8: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/metadata_downloader.c:469:9: branch_true: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:469:9: call_function: calling ‘lr_metadatatarget_append_error’ from ‘append_url_target’
#  104|       va_list valist;
#  105|       va_start(valist, format);
#  106|->     gchar *error_message = g_strdup_vprintf(format, valist);
#  107|       va_end(valist);
#  108|   

Error: CPPCHECK_WARNING (CWE-476): [#def84]
librepo-1.20.0/librepo/metadata_downloader.c:159: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fd_allocated
#  157|   {
#  158|       int *fd_allocated = malloc(sizeof(int));
#  159|->     *fd_allocated = fd;
#  160|       fd_list = g_slist_append(fd_list, fd_allocated);
#  161|       return fd_list;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def85]
librepo-1.20.0/librepo/metadata_downloader.c:159:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fd_allocated’
librepo-1.20.0/librepo/metadata_downloader.c:190:1: enter_function: entry to ‘create_repomd_xml_download_targets’
librepo-1.20.0/librepo/metadata_downloader.c:195:34: branch_true: following ‘true’ branch (when ‘elem’ is non-NULL)...
librepo-1.20.0/librepo/metadata_downloader.c:196:27: branch_true: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:204:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/metadata_downloader.c:206:13: branch_true: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:206:13: call_function: calling ‘fillInvalidationValues’ from ‘create_repomd_xml_download_targets’
#  157|   {
#  158|       int *fd_allocated = malloc(sizeof(int));
#  159|->     *fd_allocated = fd;
#  160|       fd_list = g_slist_append(fd_list, fd_allocated);
#  161|       return fd_list;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
librepo-1.20.0/librepo/metadata_downloader.c:160:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fd_allocated’
librepo-1.20.0/librepo/metadata_downloader.c:190:1: enter_function: entry to ‘create_repomd_xml_download_targets’
librepo-1.20.0/librepo/metadata_downloader.c:195:34: branch_true: following ‘true’ branch (when ‘elem’ is non-NULL)...
librepo-1.20.0/librepo/metadata_downloader.c:196:27: branch_true: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:204:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/metadata_downloader.c:206:13: branch_true: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:206:13: call_function: calling ‘fillInvalidationValues’ from ‘create_repomd_xml_download_targets’
#  158|       int *fd_allocated = malloc(sizeof(int));
#  159|       *fd_allocated = fd;
#  160|->     fd_list = g_slist_append(fd_list, fd_allocated);
#  161|       return fd_list;
#  162|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def87]
librepo-1.20.0/librepo/metadata_downloader.c:333:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘fd’
librepo-1.20.0/librepo/metadata_downloader.c:316:64: branch_true: following ‘true’ branch (when ‘elem’ is non-NULL)...
librepo-1.20.0/librepo/metadata_downloader.c:319:27: branch_true: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:317:42: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/metadata_downloader.c:316:64: branch_true: following ‘true’ branch (when ‘elem’ is non-NULL)...
librepo-1.20.0/librepo/metadata_downloader.c:319:27: branch_true: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:323:12: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/metadata_downloader.c:328:13: branch_false: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:328:12: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/metadata_downloader.c:333:34: branch_false: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:333:34: danger: dereference of NULL ‘fd’
#  331|   
#  332|           gboolean ret;
#  333|->         int fd_value = *((int *) fd->data);
#  334|   
#  335|           if (!target->handle || fd_value == -1) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def88]
librepo-1.20.0/librepo/metadata_downloader.c:371:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘path’
librepo-1.20.0/librepo/metadata_downloader.c:316:64: branch_true: following ‘true’ branch (when ‘elem’ is non-NULL)...
librepo-1.20.0/librepo/metadata_downloader.c:319:27: branch_true: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:317:42: branch_true: following ‘true’ branch (when ‘fd’ is non-NULL)...
librepo-1.20.0/librepo/metadata_downloader.c:317:37: branch_true: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:317:67: branch_false: following ‘false’ branch (when ‘path’ is NULL)...
 branch_false: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:316:64: branch_true: following ‘true’ branch (when ‘elem’ is non-NULL)...
librepo-1.20.0/librepo/metadata_downloader.c:319:27: branch_true: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:323:12: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/metadata_downloader.c:328:13: branch_false: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:328:12: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/metadata_downloader.c:333:34: branch_false: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:335:13: branch_true: following ‘true’ branch (when ‘fd_value == -1’)...
librepo-1.20.0/librepo/metadata_downloader.c:336:13: branch_true: ...to here
librepo-1.20.0/librepo/metadata_downloader.c:371:17: danger: dereference of NULL ‘path’
#  369|               close(fd_value);
#  370|           }
#  371|->         lr_free(path->data);
#  372|           lr_free(fd->data);
#  373|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
librepo-1.20.0/librepo/mirrorlist.c:99:32: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
librepo-1.20.0/librepo/mirrorlist.c:52:1: enter_function: entry to ‘lr_mirrorlist_parse_file’
librepo-1.20.0/librepo/mirrorlist.c:58:5: branch_false: following ‘false’ branch (when ‘mirrorlist’ is non-NULL)...
librepo-1.20.0/librepo/mirrorlist.c:59:5: branch_false: ...to here
librepo-1.20.0/librepo/mirrorlist.c:59:5: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
librepo-1.20.0/librepo/mirrorlist.c:60:5: branch_false: ...to here
librepo-1.20.0/librepo/mirrorlist.c:64:8: branch_false: following ‘false’ branch (when ‘fd_dup != -1’)...
librepo-1.20.0/librepo/mirrorlist.c:70:9: branch_false: ...to here
librepo-1.20.0/librepo/mirrorlist.c:70:9: acquire_memory: allocated here
librepo-1.20.0/librepo/mirrorlist.c:71:8: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
 branch_false: ...to here
librepo-1.20.0/librepo/mirrorlist.c:78:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
librepo-1.20.0/librepo/mirrorlist.c:98:13: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/mirrorlist.c:99:65: call_function: inlined call to ‘g_strdup_inline’ from ‘lr_mirrorlist_parse_file’
librepo-1.20.0/librepo/mirrorlist.c:99:32: danger: ‘f’ leaks here; was allocated at [(8)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/7)
#   97|           /* Append URL */
#   98|           if (p[0] != '\0' && (strstr(p, "://") || p[0] == '/'))
#   99|->             mirrorlist->urls = g_slist_append(mirrorlist->urls, g_strdup(p));
#  100|       }
#  101|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def90]
librepo-1.20.0/librepo/package_downloader.c:315:42: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*packagetarget.local_path, 0)’
librepo-1.20.0/librepo/package_downloader.c:192:8: branch_false: following ‘false’ branch (when ‘targets’ is non-NULL)...
 branch_false: ...to here
librepo-1.20.0/librepo/package_downloader.c:196:34: branch_true: following ‘true’ branch (when ‘elem’ is non-NULL)...
librepo-1.20.0/librepo/package_downloader.c:197:26: branch_true: ...to here
librepo-1.20.0/librepo/package_downloader.c:244:34: branch_true: following ‘true’ branch (when ‘elem’ is non-NULL)...
librepo-1.20.0/librepo/package_downloader.c:246:26: branch_true: ...to here
librepo-1.20.0/librepo/package_downloader.c:301:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/package_downloader.c:302:16: branch_true: ...to here
librepo-1.20.0/librepo/package_downloader.c:301:13: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/package_downloader.c:303:16: branch_true: ...to here
librepo-1.20.0/librepo/package_downloader.c:301:13: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/package_downloader.c:310:29: branch_true: ...to here
librepo-1.20.0/librepo/package_downloader.c:310:24: acquire_resource: opened here
librepo-1.20.0/librepo/package_downloader.c:311:16: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/package_downloader.c:315:42: branch_true: ...to here
librepo-1.20.0/librepo/package_downloader.c:315:42: danger: ‘open(*packagetarget.local_path, 0)’ leaks here; was opened at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  313|                   ret = lr_checksum_fd_cmp(packagetarget->checksum_type,
#  314|                                            fd_r,
#  315|->                                          packagetarget->checksum,
#  316|                                            1,
#  317|                                            &matches,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def91]
librepo-1.20.0/librepo/package_downloader.c:579:42: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*packagetarget.local_path, 0)’
librepo-1.20.0/librepo/package_downloader.c:512:8: branch_false: following ‘false’ branch (when ‘targets’ is non-NULL)...
 branch_false: ...to here
librepo-1.20.0/librepo/package_downloader.c:516:34: branch_true: following ‘true’ branch (when ‘elem’ is non-NULL)...
librepo-1.20.0/librepo/package_downloader.c:517:26: branch_true: ...to here
librepo-1.20.0/librepo/package_downloader.c:522:12: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/package_downloader.c:523:20: branch_false: ...to here
librepo-1.20.0/librepo/package_downloader.c:522:13: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/package_downloader.c:516:40: branch_false: ...to here
librepo-1.20.0/librepo/package_downloader.c:547:34: branch_true: following ‘true’ branch (when ‘elem’ is non-NULL)...
librepo-1.20.0/librepo/package_downloader.c:549:26: branch_true: ...to here
librepo-1.20.0/librepo/package_downloader.c:571:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/package_downloader.c:573:29: branch_true: ...to here
librepo-1.20.0/librepo/package_downloader.c:573:24: acquire_resource: opened here
librepo-1.20.0/librepo/package_downloader.c:574:16: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/package_downloader.c:579:42: branch_true: ...to here
librepo-1.20.0/librepo/package_downloader.c:579:42: danger: ‘open(*packagetarget.local_path, 0)’ leaks here; was opened at [(13)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/12)
#  577|                   ret = lr_checksum_fd_cmp(packagetarget->checksum_type,
#  578|                                            fd_r,
#  579|->                                          packagetarget->checksum,
#  580|                                            1,
#  581|                                            &matches,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def92]
librepo-1.20.0/librepo/python/exception-py.c:54:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/python/exception-py.c:48:5: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/python/exception-py.c:49:5: branch_false: ...to here
librepo-1.20.0/librepo/python/exception-py.c:51:8: branch_true: following ‘true’ branch (when ‘format’ is non-NULL)...
librepo-1.20.0/librepo/python/exception-py.c:53:9: branch_true: ...to here
librepo-1.20.0/librepo/python/exception-py.c:53:9: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/python/exception-py.c:54:15: danger: missing call to ‘va_end’ to match ‘va_start’ at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   52|           // Prepare user message
#   53|           va_start(vl, format);
#   54|->         ret = g_vasprintf(&usr_message, format, vl);
#   55|           va_end(vl);
#   56|   

Error: COMPILER_WARNING (CWE-1164): [#def93]
librepo-1.20.0/librepo/python/globalstate-py.h:60:1: warning[-Wunused-function]: ‘gil_logger_hack_begin’ defined but not used
#   60 | gil_logger_hack_begin(PyThreadState **state)
#      | ^~~~~~~~~~~~~~~~~~~~~
#   58|   
#   59|   static int
#   60|-> gil_logger_hack_begin(PyThreadState **state)
#   61|   {
#   62|       int ret = GIL_HACK_DO_NOT_CLEAR;

Error: COMPILER_WARNING (CWE-1164): [#def94]
librepo-1.20.0/librepo/python/librepomodule.c:35: included_from: Included from here.
librepo-1.20.0/librepo/python/globalstate-py.h:84:1: warning[-Wunused-function]: ‘gil_logger_hack_end’ defined but not used
#   84 | gil_logger_hack_end(int hack_begin_rc)
#      | ^~~~~~~~~~~~~~~~~~~
#   82|   
#   83|   static gboolean
#   84|-> gil_logger_hack_end(int hack_begin_rc)
#   85|   {
#   86|       int ret;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def95]
librepo-1.20.0/librepo/python/logging.c:107:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fn, "a")’
librepo-1.20.0/librepo/python/logging.c:96:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/python/logging.c:100:15: branch_false: ...to here
librepo-1.20.0/librepo/python/logging.c:100:15: acquire_resource: opened here
librepo-1.20.0/librepo/python/logging.c:101:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/python/logging.c:107:25: branch_false: ...to here
librepo-1.20.0/librepo/python/logging.c:107:25: danger: ‘fopen(fn, "a")’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  105|   
#  106|       // Setup user data
#  107|->     LogFileData *data = g_malloc0(sizeof(*data));
#  108|       data->fn = g_strdup(fn);
#  109|       data->f = f;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
librepo-1.20.0/librepo/python/logging.c:107:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fn, "a")’
librepo-1.20.0/librepo/python/logging.c:96:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/python/logging.c:100:15: branch_false: ...to here
librepo-1.20.0/librepo/python/logging.c:100:15: acquire_memory: allocated here
librepo-1.20.0/librepo/python/logging.c:101:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/python/logging.c:107:25: branch_false: ...to here
librepo-1.20.0/librepo/python/logging.c:107:25: danger: ‘fopen(fn, "a")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  105|   
#  106|       // Setup user data
#  107|->     LogFileData *data = g_malloc0(sizeof(*data));
#  108|       data->fn = g_strdup(fn);
#  109|       data->f = f;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def97]
librepo-1.20.0/librepo/python/logging.c:112:24: warning[-Wanalyzer-file-leak]: leak of FILE
librepo-1.20.0/librepo/python/logging.c:90:1: enter_function: entry to ‘py_log_set_file’
librepo-1.20.0/librepo/python/logging.c:96:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/python/logging.c:100:15: branch_false: ...to here
librepo-1.20.0/librepo/python/logging.c:100:15: acquire_resource: opened here
librepo-1.20.0/librepo/python/logging.c:101:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/python/logging.c:107:25: branch_false: ...to here
librepo-1.20.0/librepo/python/logging.c:112:24: danger: leaks here; was opened at [(4)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/3)
#  110|   
#  111|       // Set handler
#  112|->     data->handler_id = g_log_set_handler(LR_LOGDOMAIN,
#  113|                                            G_LOG_LEVEL_DEBUG,
#  114|                                            logfile_func,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
librepo-1.20.0/librepo/python/logging.c:112:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
librepo-1.20.0/librepo/python/logging.c:90:1: enter_function: entry to ‘py_log_set_file’
librepo-1.20.0/librepo/python/logging.c:96:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/python/logging.c:100:15: branch_false: ...to here
librepo-1.20.0/librepo/python/logging.c:100:15: acquire_memory: allocated here
librepo-1.20.0/librepo/python/logging.c:101:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/python/logging.c:107:25: branch_false: ...to here
librepo-1.20.0/librepo/python/logging.c:112:24: danger: ‘<unknown>’ leaks here; was allocated at [(4)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/3)
#  110|   
#  111|       // Set handler
#  112|->     data->handler_id = g_log_set_handler(LR_LOGDOMAIN,
#  113|                                            G_LOG_LEVEL_DEBUG,
#  114|                                            logfile_func,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def99]
librepo-1.20.0/librepo/repoconf.c:320:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:1052:9: call_function: calling ‘lr_key_file_set_ip_resolve’ from ‘lr_yum_repoconf_setopt’
#  318|   {
#  319|       if (resolve_type == LR_IPRESOLVE_WHATEVER)
#  320|->         g_key_file_set_string(keyfile, groupname, key, "whatever");
#  321|       else if (resolve_type == LR_IPRESOLVE_V4)
#  322|           g_key_file_set_string(keyfile, groupname, key, "ipv4");

Error: GCC_ANALYZER_WARNING (CWE-404): [#def100]
librepo-1.20.0/librepo/repoconf.c:322:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:1052:9: call_function: calling ‘lr_key_file_set_ip_resolve’ from ‘lr_yum_repoconf_setopt’
#  320|           g_key_file_set_string(keyfile, groupname, key, "whatever");
#  321|       else if (resolve_type == LR_IPRESOLVE_V4)
#  322|->         g_key_file_set_string(keyfile, groupname, key, "ipv4");
#  323|       else if (resolve_type == LR_IPRESOLVE_V6)
#  324|           g_key_file_set_string(keyfile, groupname, key, "ipv6");

Error: GCC_ANALYZER_WARNING (CWE-404): [#def101]
librepo-1.20.0/librepo/repoconf.c:324:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:1052:9: call_function: calling ‘lr_key_file_set_ip_resolve’ from ‘lr_yum_repoconf_setopt’
#  322|           g_key_file_set_string(keyfile, groupname, key, "ipv4");
#  323|       else if (resolve_type == LR_IPRESOLVE_V6)
#  324|->         g_key_file_set_string(keyfile, groupname, key, "ipv6");
#  325|   }
#  326|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def102]
librepo-1.20.0/librepo/repoconf.c:501:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:944:9: call_function: calling ‘lr_key_file_set_string’ from ‘lr_yum_repoconf_setopt’
#  499|   {
#  500|       if (!str) {
#  501|->         g_key_file_remove_key(keyfile, groupname, key, NULL);
#  502|           return;
#  503|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def103]
librepo-1.20.0/librepo/repoconf.c:505:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:944:9: call_function: calling ‘lr_key_file_set_string’ from ‘lr_yum_repoconf_setopt’
#  503|       }
#  504|   
#  505|->     g_key_file_set_string(keyfile, groupname, key, str);
#  506|   }
#  507|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def104]
librepo-1.20.0/librepo/repoconf.c:517:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:954:9: call_function: calling ‘lr_key_file_set_string_list’ from ‘lr_yum_repoconf_setopt’
#  515|   
#  516|       if (list)
#  517|->         len = g_strv_length((gchar **) list);
#  518|   
#  519|       if (len == 0) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def105]
librepo-1.20.0/librepo/repoconf.c:520:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:954:9: call_function: calling ‘lr_key_file_set_string_list’ from ‘lr_yum_repoconf_setopt’
#  518|   
#  519|       if (len == 0) {
#  520|->         g_key_file_remove_key(keyfile, groupname, key, NULL);
#  521|           return;
#  522|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def106]
librepo-1.20.0/librepo/repoconf.c:524:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:954:9: call_function: calling ‘lr_key_file_set_string_list’ from ‘lr_yum_repoconf_setopt’
#  522|       }
#  523|   
#  524|->     g_key_file_set_string_list(keyfile, groupname, key, (const gchar * const*) list, len);
#  525|   }
#  526|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def107]
librepo-1.20.0/librepo/repoconf.c:706:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:706:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/7)
#  704|       case LR_YRC_NAME:            /*!< (char *) Pretty name of the repo */
#  705|           str = va_arg(arg, char **);
#  706|->         *str = g_key_file_get_string(keyfile, id, "name", &tmp_err);
#  707|           break;
#  708|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def108]
librepo-1.20.0/librepo/repoconf.c:721:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:721:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/7)
#  719|       case LR_YRC_MIRRORLIST:      /*!< (char *) Mirrorlist URL */
#  720|           str = va_arg(arg, char **);
#  721|->         *str = g_key_file_get_string(keyfile, id, "mirrorlist", &tmp_err);
#  722|           break;
#  723|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def109]
librepo-1.20.0/librepo/repoconf.c:726:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:726:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/7)
#  724|       case LR_YRC_METALINK:        /*!< (char *) Metalink URL */
#  725|           str = va_arg(arg, char **);
#  726|->         *str = g_key_file_get_string(keyfile, id, "metalink", &tmp_err);
#  727|           break;
#  728|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def110]
librepo-1.20.0/librepo/repoconf.c:731:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:731:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/7)
#  729|       case LR_YRC_MEDIAID:         /*!< (char *) Media ID */
#  730|           str = va_arg(arg, char **);
#  731|->         *str = g_key_file_get_string(keyfile, id, "mediaid", &tmp_err);
#  732|           break;
#  733|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def111]
librepo-1.20.0/librepo/repoconf.c:761:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:761:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/7)
#  759|       case LR_YRC_PROXY:          /*!< (char *) Proxy address */
#  760|           str = va_arg(arg, char **);
#  761|->         *str = g_key_file_get_string(keyfile, id, "proxy", &tmp_err);
#  762|           break;
#  763|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def112]
librepo-1.20.0/librepo/repoconf.c:766:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:766:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/7)
#  764|       case LR_YRC_PROXY_USERNAME: /*!< (char *) Proxy username */
#  765|           str = va_arg(arg, char **);
#  766|->         *str = g_key_file_get_string(keyfile, id, "proxy_username", &tmp_err);
#  767|           break;
#  768|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def113]
librepo-1.20.0/librepo/repoconf.c:771:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:771:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/7)
#  769|       case LR_YRC_PROXY_PASSWORD: /*!< (char *) Proxy password */
#  770|           str = va_arg(arg, char **);
#  771|->         *str = g_key_file_get_string(keyfile, id, "proxy_password", &tmp_err);
#  772|           break;
#  773|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def114]
librepo-1.20.0/librepo/repoconf.c:776:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:776:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/7)
#  774|       case LR_YRC_USERNAME:       /*!< (char *) Username */
#  775|           str = va_arg(arg, char **);
#  776|->         *str = g_key_file_get_string(keyfile, id, "username", &tmp_err);
#  777|           break;
#  778|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def115]
librepo-1.20.0/librepo/repoconf.c:781:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:781:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/7)
#  779|       case LR_YRC_PASSWORD:       /*!< (char *) Password */
#  780|           str = va_arg(arg, char **);
#  781|->         *str = g_key_file_get_string(keyfile, id, "password", &tmp_err);
#  782|           break;
#  783|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def116]
librepo-1.20.0/librepo/repoconf.c:808:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:808:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/7)
#  806|       case LR_YRC_THROTTLE:       /*!< (char *) Throttle string */
#  807|           str = va_arg(arg, char **);
#  808|->         *str = g_key_file_get_string(keyfile, id, "throttle", &tmp_err);
#  809|           break;
#  810|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def117]
librepo-1.20.0/librepo/repoconf.c:832:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:832:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/7)
#  830|       {
#  831|           gint *num = va_arg(arg, gint *);
#  832|->         *num = g_key_file_get_integer(keyfile, id, "cost", &tmp_err);
#  833|           break;
#  834|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def118]
librepo-1.20.0/librepo/repoconf.c:839:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:839:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/7)
#  837|       {
#  838|           gint *num = va_arg(arg, gint *);
#  839|->         *num = g_key_file_get_integer(keyfile, id, "priority", &tmp_err);
#  840|           break;
#  841|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def119]
librepo-1.20.0/librepo/repoconf.c:845:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:845:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/7)
#  843|       case LR_YRC_SSLCACERT:      /*!< (gchar *) SSL Certification authority cert */
#  844|           str = va_arg(arg, char **);
#  845|->         *str = g_key_file_get_string(keyfile, id, "sslcacert", &tmp_err);
#  846|           break;
#  847|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def120]
librepo-1.20.0/librepo/repoconf.c:855:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:855:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/7)
#  853|       case LR_YRC_SSLCLIENTCERT:  /*!< (gchar *) SSL Client certificate */
#  854|           str = va_arg(arg, char **);
#  855|->         *str = g_key_file_get_string(keyfile, id, "sslclientcert", &tmp_err);
#  856|           break;
#  857|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def121]
librepo-1.20.0/librepo/repoconf.c:860:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:860:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/7)
#  858|       case LR_YRC_SSLCLIENTKEY:   /*!< (gchar *) SSL Client key */
#  859|           str = va_arg(arg, char **);
#  860|->         *str = g_key_file_get_string(keyfile, id, "sslclientkey", &tmp_err);
#  861|           break;
#  862|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def122]
librepo-1.20.0/librepo/repoconf.c:870:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:664:1: enter_function: entry to ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:678:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:685:25: call_function: inlined call to ‘repoconf_keyfile’ from ‘lr_yum_repoconf_getinfo’
librepo-1.20.0/librepo/repoconf.c:689:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:695:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:695:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:870:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(8)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/7)
#  868|       case LR_YRC_FAILOVERMETHOD:   /*!< (gchar *) Failover method */
#  869|           str = va_arg(arg, char **);
#  870|->         *str = g_key_file_get_string(keyfile, id, "failovermethod", &tmp_err);
#  871|           break;
#  872|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def123]
librepo-1.20.0/librepo/repoconf.c:938:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:938:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/6)
#  936|   
#  937|       case LR_YRC_ID:              /*!<  0 (char *) ID (short name) of the repo */
#  938|->         g_set_error(&tmp_err, LR_REPOCONF_ERROR, LRE_BADOPTARG,
#  939|                       "ID is read only option");
#  940|           break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def124]
librepo-1.20.0/librepo/repoconf.c:949:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:949:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/6)
#  947|       case LR_YRC_ENABLED:         /*!<  2 (long 1 or 0) Is repo enabled? */
#  948|           lnum = va_arg(arg, long);
#  949|->         g_key_file_set_boolean(keyfile, id, "enabled", lnum ? TRUE : FALSE);
#  950|           break;
#  951|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def125]
librepo-1.20.0/librepo/repoconf.c:994:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:994:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/6)
#  992|       case LR_YRC_FASTESTMIRROR:   /*!< 11 (long 1 or 0) Fastest mirror determination */
#  993|           lnum = va_arg(arg, long);
#  994|->         g_key_file_set_boolean(keyfile, id, "fastestmirror", lnum);
#  995|           break;
#  996|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def126]
librepo-1.20.0/librepo/repoconf.c:1024:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:1024:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/6)
# 1022|       case LR_YRC_GPGCHECK:        /*!< 17 (long 1 or 0) GPG check for packages */
# 1023|           lnum = va_arg(arg, long);
# 1024|->         g_key_file_set_boolean(keyfile, id, "gpgcheck", (gboolean) lnum);
# 1025|           break;
# 1026|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def127]
librepo-1.20.0/librepo/repoconf.c:1029:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:1029:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/6)
# 1027|       case LR_YRC_REPO_GPGCHECK:   /*!< 18 (long 1 or 0) GPG check for repodata */
# 1028|           lnum = va_arg(arg, long);
# 1029|->         g_key_file_set_boolean(keyfile, id, "repo_gpgcheck", (gboolean) lnum);
# 1030|           break;
# 1031|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def128]
librepo-1.20.0/librepo/repoconf.c:1034:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:1034:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/6)
# 1032|       case LR_YRC_ENABLEGROUPS:    /*!< 19 (long 1 or 0) Use groups */
# 1033|           lnum = va_arg(arg, long);
# 1034|->         g_key_file_set_boolean(keyfile, id, "enablegroups", (gboolean) lnum);
# 1035|           break;
# 1036|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def129]
librepo-1.20.0/librepo/repoconf.c:1040:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:1040:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/6)
# 1038|       {
# 1039|           guint64 val = va_arg(arg, guint64);
# 1040|->         g_key_file_set_uint64(keyfile, id, "bandwidth", val);
# 1041|           break;
# 1042|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def130]
librepo-1.20.0/librepo/repoconf.c:1060:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:1060:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/6)
# 1058|           // TODO: Store value in appropriate units
# 1059|           gint64 val = va_arg(arg, gint64);
# 1060|->         g_key_file_set_int64(keyfile, id, "metadata_expire", val);
# 1061|           break;
# 1062|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def131]
librepo-1.20.0/librepo/repoconf.c:1067:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:1067:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/6)
# 1065|       {
# 1066|           gint val = va_arg(arg, gint);
# 1067|->         g_key_file_set_integer(keyfile, id, "cost", val);
# 1068|           break;
# 1069|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def132]
librepo-1.20.0/librepo/repoconf.c:1074:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:1074:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/6)
# 1072|       {
# 1073|           guint val = va_arg(arg, gint);
# 1074|->         g_key_file_set_integer(keyfile, id, "priority", val);
# 1075|           break;
# 1076|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def133]
librepo-1.20.0/librepo/repoconf.c:1085:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:1085:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/6)
# 1083|       case LR_YRC_SSLVERIFY:       /*!< 27 (long 1 or 0) SSL verification */
# 1084|           lnum = va_arg(arg, long);
# 1085|->         g_key_file_set_boolean(keyfile, id, "sslverify", (gboolean) lnum);
# 1086|           break;
# 1087|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def134]
librepo-1.20.0/librepo/repoconf.c:1110:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/repoconf.c:901:1: enter_function: entry to ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:915:8: branch_false: following ‘false’ branch (when ‘repoconf’ is non-NULL)...
librepo-1.20.0/librepo/repoconf.c:922:31: call_function: inlined call to ‘repoconf_repofile’ from ‘lr_yum_repoconf_setopt’
librepo-1.20.0/librepo/repoconf.c:927:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoconf.c:933:5: branch_false: ...to here
librepo-1.20.0/librepo/repoconf.c:933:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/repoconf.c:1110:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/6)
# 1108|       case LR_YRC_SKIP_IF_UNAVAILABLE: /*!< 32 (long 1 or 0) Skip if unavailable */
# 1109|           lnum = va_arg(arg, long);
# 1110|->         g_key_file_set_boolean(keyfile, id, "skip_if_unavailable", (gboolean) lnum);
# 1111|           break;
# 1112|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def135]
librepo-1.20.0/librepo/repoutil_yum.c:112:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 0)’
librepo-1.20.0/librepo/repoutil_yum.c:90:5: branch_false: following ‘false’ branch (when ‘in_path’ is non-NULL)...
librepo-1.20.0/librepo/repoutil_yum.c:91:5: branch_false: ...to here
librepo-1.20.0/librepo/repoutil_yum.c:93:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoutil_yum.c:99:9: branch_false: ...to here
librepo-1.20.0/librepo/repoutil_yum.c:104:10: acquire_resource: opened here
librepo-1.20.0/librepo/repoutil_yum.c:105:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoutil_yum.c:112:5: branch_false: ...to here
librepo-1.20.0/librepo/repoutil_yum.c:112:5: danger: ‘open(path, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  110|       }
#  111|   
#  112|->     g_free(path);
#  113|   
#  114|       ret = lr_yum_repomd_parse_file(repomd, fd, NULL, NULL, err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def136]
librepo-1.20.0/librepo/repoutil_yum.c:114:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 0)’
librepo-1.20.0/librepo/repoutil_yum.c:90:5: branch_false: following ‘false’ branch (when ‘in_path’ is non-NULL)...
librepo-1.20.0/librepo/repoutil_yum.c:91:5: branch_false: ...to here
librepo-1.20.0/librepo/repoutil_yum.c:93:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoutil_yum.c:99:9: branch_false: ...to here
librepo-1.20.0/librepo/repoutil_yum.c:104:10: acquire_resource: opened here
librepo-1.20.0/librepo/repoutil_yum.c:105:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/repoutil_yum.c:112:5: branch_false: ...to here
librepo-1.20.0/librepo/repoutil_yum.c:114:11: danger: ‘open(path, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  112|       g_free(path);
#  113|   
#  114|->     ret = lr_yum_repomd_parse_file(repomd, fd, NULL, NULL, err);
#  115|       close(fd);
#  116|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def137]
librepo-1.20.0/librepo/result.c:100:19: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/result.c:72:8: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
librepo-1.20.0/librepo/result.c:78:5: branch_false: ...to here
librepo-1.20.0/librepo/result.c:78:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/result.c:99:12: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/result.c:100:19: branch_true: ...to here
librepo-1.20.0/librepo/result.c:100:19: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   98|           gint64 *ts = va_arg(arg, gint64 *);
#   99|           if (result->yum_repomd) {
#  100|->             *ts = lr_yum_repomd_get_highest_timestamp(result->yum_repomd, &tmp_err);
#  101|               if (tmp_err) {
#  102|                   rc = FALSE;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def138]
librepo-1.20.0/librepo/result.c:116:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/result.c:72:8: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
librepo-1.20.0/librepo/result.c:78:5: branch_false: ...to here
librepo-1.20.0/librepo/result.c:78:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/result.c:116:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  114|       default:
#  115|           rc = FALSE;
#  116|->         g_set_error(err, LR_RESULT_ERROR, LRE_UNKNOWNOPT,
#  117|                       "Unknown option");
#  118|           break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def139]
librepo-1.20.0/librepo/xmlparser.c:98:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
librepo-1.20.0/librepo/xmlparser.c:91:5: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)...
librepo-1.20.0/librepo/xmlparser.c:92:5: branch_false: ...to here
librepo-1.20.0/librepo/xmlparser.c:92:5: branch_false: following ‘false’ branch (when ‘msg’ is non-NULL)...
librepo-1.20.0/librepo/xmlparser.c:94:10: branch_false: ...to here
librepo-1.20.0/librepo/xmlparser.c:94:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/xmlparser.c:97:5: branch_false: ...to here
librepo-1.20.0/librepo/xmlparser.c:97:5: acquire_resource: ‘va_start’ called here
librepo-1.20.0/librepo/xmlparser.c:98:5: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   96|   
#   97|       va_start(args, msg);
#   98|->     g_vasprintf(&warn, msg, args);
#   99|       va_end(args);
#  100|   

Error: CPPCHECK_WARNING (CWE-476): [#def140]
librepo-1.20.0/librepo/yum.c:275: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  273|   {
#  274|       CbData *data = calloc(1, sizeof(*data));
#  275|->     data->userdata = userdata;
#  276|       data->cbdata = cbdata;
#  277|       data->progresscb = progresscb;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def141]
librepo-1.20.0/librepo/yum.c:275:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘data’
librepo-1.20.0/librepo/yum.c:595:1: enter_function: entry to ‘lr_yum_download_repomd’
librepo-1.20.0/librepo/yum.c:612:22: call_function: calling ‘cbdata_new’ from ‘lr_yum_download_repomd’
#  273|   {
#  274|       CbData *data = calloc(1, sizeof(*data));
#  275|->     data->userdata = userdata;
#  276|       data->cbdata = cbdata;
#  277|       data->progresscb = progresscb;

Error: CPPCHECK_WARNING (CWE-476): [#def142]
librepo-1.20.0/librepo/yum.c:276: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  274|       CbData *data = calloc(1, sizeof(*data));
#  275|       data->userdata = userdata;
#  276|->     data->cbdata = cbdata;
#  277|       data->progresscb = progresscb;
#  278|       data->hmfcb = hmfcb;

Error: CPPCHECK_WARNING (CWE-476): [#def143]
librepo-1.20.0/librepo/yum.c:277: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  275|       data->userdata = userdata;
#  276|       data->cbdata = cbdata;
#  277|->     data->progresscb = progresscb;
#  278|       data->hmfcb = hmfcb;
#  279|       data->metadata = g_strdup(metadata);

Error: CPPCHECK_WARNING (CWE-476): [#def144]
librepo-1.20.0/librepo/yum.c:278: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  276|       data->cbdata = cbdata;
#  277|       data->progresscb = progresscb;
#  278|->     data->hmfcb = hmfcb;
#  279|       data->metadata = g_strdup(metadata);
#  280|       return data;

Error: CPPCHECK_WARNING (CWE-476): [#def145]
librepo-1.20.0/librepo/yum.c:279: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  277|       data->progresscb = progresscb;
#  278|       data->hmfcb = hmfcb;
#  279|->     data->metadata = g_strdup(metadata);
#  280|       return data;
#  281|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
librepo-1.20.0/librepo/yum.c:618:32: warning[-Wanalyzer-malloc-leak]: leak of ‘cbdata_new(*handle.user_data, 0, *handle.user_cb, *handle.hmfcb, "repomd.xml")’
librepo-1.20.0/librepo/yum.c:595:1: enter_function: entry to ‘lr_yum_download_repomd’
librepo-1.20.0/librepo/yum.c:612:22: call_function: calling ‘cbdata_new’ from ‘lr_yum_download_repomd’
librepo-1.20.0/librepo/yum.c:612:22: return_function: returning to ‘lr_yum_download_repomd’ from ‘cbdata_new’
librepo-1.20.0/librepo/yum.c:618:32: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/yum.c:626:54: branch_true: ...to here
librepo-1.20.0/librepo/yum.c:618:32: branch_true: following ‘true’ branch...
librepo-1.20.0/librepo/yum.c:618:32: branch_true: ...to here
librepo-1.20.0/librepo/yum.c:618:32: danger: ‘cbdata_new(*handle.user_data, 0, *handle.user_cb, *handle.hmfcb, "repomd.xml")’ leaks here; was allocated at [(4)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/3)
#  616|                               "repomd.xml");
#  617|   
#  618|->     LrDownloadTarget *target = lr_downloadtarget_new(handle,
#  619|                                                        "repodata/repomd.xml",
#  620|                                                        NULL,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def147]
librepo-1.20.0/librepo/yum.c:1137:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 0)’
librepo-1.20.0/librepo/yum.c:1093:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/yum.c:1097:8: branch_false: ...to here
librepo-1.20.0/librepo/yum.c:1112:8: branch_false: following ‘false’ branch (when ‘expected_checksum’ is non-NULL)...
librepo-1.20.0/librepo/yum.c:1118:8: branch_false: ...to here
librepo-1.20.0/librepo/yum.c:1118:8: branch_false: following ‘false’ branch (when ‘checksum_type != 0’)...
librepo-1.20.0/librepo/yum.c:1125:10: branch_false: ...to here
librepo-1.20.0/librepo/yum.c:1125:10: acquire_resource: opened here
librepo-1.20.0/librepo/yum.c:1126:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/yum.c:1133:8: branch_false: ...to here
librepo-1.20.0/librepo/yum.c:1133:8: branch_true: following ‘true’ branch (when ‘is_zchunk != 0’)...
librepo-1.20.0/librepo/yum.c:1136:9: branch_true: ...to here
librepo-1.20.0/librepo/yum.c:1137:23: danger: ‘open(path, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
# 1135|           ret = FALSE;
# 1136|           matches = FALSE;
# 1137|->         zckCtx *zck = lr_zck_init_read_base(expected_checksum, checksum_type,
# 1138|                                               rec->size_header, fd, &tmp_err);
# 1139|           if (!tmp_err) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def148]
librepo-1.20.0/librepo/yum.c:1152:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 0)’
librepo-1.20.0/librepo/yum.c:1093:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/yum.c:1097:8: branch_false: ...to here
librepo-1.20.0/librepo/yum.c:1112:8: branch_false: following ‘false’ branch (when ‘expected_checksum’ is non-NULL)...
librepo-1.20.0/librepo/yum.c:1118:8: branch_false: ...to here
librepo-1.20.0/librepo/yum.c:1118:8: branch_false: following ‘false’ branch (when ‘checksum_type != 0’)...
librepo-1.20.0/librepo/yum.c:1125:10: branch_false: ...to here
librepo-1.20.0/librepo/yum.c:1125:10: acquire_resource: opened here
librepo-1.20.0/librepo/yum.c:1126:8: branch_false: following ‘false’ branch...
librepo-1.20.0/librepo/yum.c:1133:8: branch_false: ...to here
librepo-1.20.0/librepo/yum.c:1133:8: branch_false: following ‘false’ branch (when ‘is_zchunk == 0’)...
librepo-1.20.0/librepo/yum.c:1152:15: branch_false: ...to here
librepo-1.20.0/librepo/yum.c:1152:15: danger: ‘open(path, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
# 1150|           #endif /* WITH_ZCHUNK */
# 1151|       } else {
# 1152|->         ret = lr_checksum_fd_cmp(checksum_type,
# 1153|                                    fd,
# 1154|                                    expected_checksum,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def149]
librepo-1.20.0/tests/test_checksum.c:56:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
librepo-1.20.0/tests/test_checksum.c:54:10: acquire_resource: opened here
librepo-1.20.0/tests/test_checksum.c:55:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_checksum.c:55:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:56:16: danger: ‘open(filename, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   54|       fd = open(filename, O_RDONLY);
#   55|       ck_assert_int_ge(fd, 0);
#   56|->     checksum = lr_checksum_fd(ch_type, fd, &tmp_err);
#   57|       ck_assert_ptr_nonnull(checksum);
#   58|       ck_assert_ptr_null(tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def150]
librepo-1.20.0/tests/test_checksum.c:123:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.tmpdir, "/test_checksum_matches", 0), 0)’
librepo-1.20.0/tests/test_checksum.c:110:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_checksum.c:110:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:116:5: branch_true: following ‘true’ branch (when ‘attr_ret == -1’)...
librepo-1.20.0/tests/test_checksum.c:116:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:118:5: branch_true: following ‘true’ branch (when ‘attr_ret == -1’)...
librepo-1.20.0/tests/test_checksum.c:118:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:121:10: acquire_resource: opened here
librepo-1.20.0/tests/test_checksum.c:122:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_checksum.c:122:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:123:20: danger: ‘open(lr_pathconcat(test_globals.tmpdir, "/test_checksum_matches", 0), 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  121|       fd = open(filename, O_RDONLY);
#  122|       ck_assert_int_ge(fd, 0);
#  123|->     checksum_ret = lr_checksum_fd_cmp(LR_CHECKSUM_SHA256,
#  124|                                         fd,
#  125|                                         expected,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def151]
librepo-1.20.0/tests/test_checksum.c:165:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.tmpdir, "/test_checksum_matches", 0), 0)’
librepo-1.20.0/tests/test_checksum.c:110:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_checksum.c:110:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:116:5: branch_true: following ‘true’ branch (when ‘attr_ret == -1’)...
librepo-1.20.0/tests/test_checksum.c:116:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:118:5: branch_true: following ‘true’ branch (when ‘attr_ret == -1’)...
librepo-1.20.0/tests/test_checksum.c:118:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:122:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_checksum.c:122:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:129:5: branch_true: following ‘true’ branch (when ‘_ck_x’ is NULL)...
librepo-1.20.0/tests/test_checksum.c:129:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:130:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_checksum.c:130:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:131:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_checksum.c:131:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:137:8: branch_false: following ‘false’ branch (when ‘attr_ret != -1’)...
librepo-1.20.0/tests/test_checksum.c:146:9: branch_false: ...to here
librepo-1.20.0/tests/test_checksum.c:147:9: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_checksum.c:152:5: branch_true: following ‘true’ branch (when ‘_ck_x == 0’)...
librepo-1.20.0/tests/test_checksum.c:152:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:158:5: branch_true: following ‘true’ branch (when ‘attr_ret != -1’)...
librepo-1.20.0/tests/test_checksum.c:158:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:160:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_checksum.c:163:10: acquire_resource: opened here
librepo-1.20.0/tests/test_checksum.c:164:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_checksum.c:164:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:165:20: danger: ‘open(lr_pathconcat(test_globals.tmpdir, "/test_checksum_matches", 0), 0)’ leaks here; was opened at [(25)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/24)
#  163|       fd = open(filename, O_RDONLY);
#  164|       ck_assert_int_ge(fd, 0);
#  165|->     checksum_ret = lr_checksum_fd_cmp(LR_CHECKSUM_SHA256,
#  166|                                         fd,
#  167|                                         expected,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def152]
librepo-1.20.0/tests/test_checksum.c:212:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.tmpdir, "/test_checksum_value", 0), 0)’
librepo-1.20.0/tests/test_checksum.c:199:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_checksum.c:199:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:205:5: branch_true: following ‘true’ branch (when ‘attr_ret == -1’)...
librepo-1.20.0/tests/test_checksum.c:205:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:207:5: branch_true: following ‘true’ branch (when ‘attr_ret == -1’)...
librepo-1.20.0/tests/test_checksum.c:207:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:210:10: acquire_resource: opened here
librepo-1.20.0/tests/test_checksum.c:211:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_checksum.c:211:5: branch_true: ...to here
librepo-1.20.0/tests/test_checksum.c:212:20: danger: ‘open(lr_pathconcat(test_globals.tmpdir, "/test_checksum_value", 0), 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  210|       fd = open(filename, O_RDONLY);
#  211|       ck_assert_int_ge(fd, 0);
#  212|->     checksum_ret = lr_checksum_fd_compare(LR_CHECKSUM_SHA256,
#  213|                                         fd,
#  214|                                         "",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def153]
librepo-1.20.0/tests/test_gpg.c:139:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(key_path, 0)’
librepo-1.20.0/tests/test_gpg.c:137:18: acquire_resource: opened here
librepo-1.20.0/tests/test_gpg.c:138:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_gpg.c:138:5: branch_true: ...to here
librepo-1.20.0/tests/test_gpg.c:139:11: danger: ‘open(key_path, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  137|       int key_fd = open(key_path, O_RDONLY);
#  138|       ck_assert(key_fd != -1);
#  139|->     ret = lr_gpg_import_key_from_fd(key_fd, tmp_home_path, &tmp_err);
#  140|       ck_assert(ret);
#  141|       ck_assert_ptr_null(tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def154]
librepo-1.20.0/tests/test_metalink.c:51:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_01", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:50:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:51:5: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_01", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   49|                            "metalink_good_01", NULL);
#   50|       fd = open(path, O_RDONLY);
#   51|->     g_free(path);
#   52|       ck_assert_int_ge(fd, 0);
#   53|       ml = lr_metalink_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def155]
librepo-1.20.0/tests/test_metalink.c:53:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_01", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:50:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:52:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:52:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:53:10: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_01", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   51|       g_free(path);
#   52|       ck_assert_int_ge(fd, 0);
#   53|->     ml = lr_metalink_init();
#   54|       ck_assert_ptr_nonnull(ml);
#   55|       ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def156]
librepo-1.20.0/tests/test_metalink.c:55:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_01", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:50:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:52:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:52:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:54:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_metalink.c:54:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:55:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_01", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   53|       ml = lr_metalink_init();
#   54|       ck_assert_ptr_nonnull(ml);
#   55|->     ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);
#   56|       ck_assert(ret);
#   57|       ck_assert_ptr_null(tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def157]
librepo-1.20.0/tests/test_metalink.c:163:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_02", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:162:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:163:5: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_02", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  161|                            "metalink_good_02", NULL);
#  162|       fd = open(path, O_RDONLY);
#  163|->     g_free(path);
#  164|       ck_assert_int_ge(fd, 0);
#  165|       ml = lr_metalink_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def158]
librepo-1.20.0/tests/test_metalink.c:165:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_02", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:162:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:164:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:164:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:165:10: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_02", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  163|       g_free(path);
#  164|       ck_assert_int_ge(fd, 0);
#  165|->     ml = lr_metalink_init();
#  166|       ck_assert_ptr_nonnull(ml);
#  167|       ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def159]
librepo-1.20.0/tests/test_metalink.c:167:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_02", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:162:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:164:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:164:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:166:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_metalink.c:166:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:167:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_02", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  165|       ml = lr_metalink_init();
#  166|       ck_assert_ptr_nonnull(ml);
#  167|->     ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);
#  168|       ck_assert(ret);
#  169|       ck_assert_ptr_null(tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def160]
librepo-1.20.0/tests/test_metalink.c:209:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_03", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:208:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:209:5: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_03", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  207|                            "metalink_good_03", NULL);
#  208|       fd = open(path, O_RDONLY);
#  209|->     g_free(path);
#  210|       ck_assert_int_ge(fd, 0);
#  211|       ml = lr_metalink_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def161]
librepo-1.20.0/tests/test_metalink.c:211:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_03", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:208:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:210:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:210:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:211:10: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_03", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  209|       g_free(path);
#  210|       ck_assert_int_ge(fd, 0);
#  211|->     ml = lr_metalink_init();
#  212|       ck_assert_ptr_nonnull(ml);
#  213|       ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def162]
librepo-1.20.0/tests/test_metalink.c:213:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_03", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:208:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:210:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:210:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:212:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_metalink.c:212:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:213:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_good_03", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  211|       ml = lr_metalink_init();
#  212|       ck_assert_ptr_nonnull(ml);
#  213|->     ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);
#  214|       ck_assert(ret);
#  215|       ck_assert_ptr_null(tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def163]
librepo-1.20.0/tests/test_metalink.c:253:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_bad_01", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:252:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:253:5: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_bad_01", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  251|                            "metalink_bad_01", NULL);
#  252|       fd = open(path, O_RDONLY);
#  253|->     g_free(path);
#  254|       ck_assert_int_ge(fd, 0);
#  255|       ml = lr_metalink_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def164]
librepo-1.20.0/tests/test_metalink.c:255:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_bad_01", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:252:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:254:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:254:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:255:10: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_bad_01", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  253|       g_free(path);
#  254|       ck_assert_int_ge(fd, 0);
#  255|->     ml = lr_metalink_init();
#  256|       ck_assert_ptr_nonnull(ml);
#  257|       int call_counter = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def165]
librepo-1.20.0/tests/test_metalink.c:258:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_bad_01", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:252:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:254:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:254:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:256:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_metalink.c:256:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:258:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_bad_01", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  256|       ck_assert_ptr_nonnull(ml);
#  257|       int call_counter = 0;
#  258|->     ret = lr_metalink_parse_file(ml, fd, REPOMD, warning_cb, &call_counter, &tmp_err);
#  259|       ck_assert(ret);
#  260|       ck_assert_ptr_null(tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def166]
librepo-1.20.0/tests/test_metalink.c:374:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_bad_02", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:373:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:374:5: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_bad_02", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  372|                            "metalink_bad_02", NULL);
#  373|       fd = open(path, O_RDONLY);
#  374|->     g_free(path);
#  375|       ck_assert_int_ge(fd, 0);
#  376|       ml = lr_metalink_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def167]
librepo-1.20.0/tests/test_metalink.c:376:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_bad_02", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:373:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:375:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:375:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:376:10: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_bad_02", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  374|       g_free(path);
#  375|       ck_assert_int_ge(fd, 0);
#  376|->     ml = lr_metalink_init();
#  377|       ck_assert_ptr_nonnull(ml);
#  378|       ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def168]
librepo-1.20.0/tests/test_metalink.c:378:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_bad_02", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:373:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:375:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:375:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:377:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_metalink.c:377:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:378:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_bad_02", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  376|       ml = lr_metalink_init();
#  377|       ck_assert_ptr_nonnull(ml);
#  378|->     ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);
#  379|       ck_assert(ret);
#  380|       ck_assert_ptr_null(tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def169]
librepo-1.20.0/tests/test_metalink.c:398:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_01", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:397:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:398:5: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_01", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  396|                            "metalink_really_bad_01", NULL);
#  397|       fd = open(path, O_RDONLY);
#  398|->     g_free(path);
#  399|       ck_assert_int_ge(fd, 0);
#  400|       ml = lr_metalink_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def170]
librepo-1.20.0/tests/test_metalink.c:400:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_01", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:397:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:399:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:399:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:400:10: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_01", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  398|       g_free(path);
#  399|       ck_assert_int_ge(fd, 0);
#  400|->     ml = lr_metalink_init();
#  401|       ck_assert_ptr_nonnull(ml);
#  402|       ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def171]
librepo-1.20.0/tests/test_metalink.c:402:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_01", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:397:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:399:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:399:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:401:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_metalink.c:401:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:402:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_01", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  400|       ml = lr_metalink_init();
#  401|       ck_assert_ptr_nonnull(ml);
#  402|->     ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);
#  403|       ck_assert(!ret);
#  404|       ck_assert_ptr_nonnull(tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def172]
librepo-1.20.0/tests/test_metalink.c:422:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_02", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:421:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:422:5: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_02", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#  420|                            "metalink_really_bad_02", NULL);
#  421|       fd = open(path, O_RDONLY);
#  422|->     g_free(path);
#  423|       ck_assert_int_ge(fd, 0);
#  424|       ml = lr_metalink_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def173]
librepo-1.20.0/tests/test_metalink.c:424:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_02", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:421:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:423:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:423:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:424:10: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_02", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  422|       g_free(path);
#  423|       ck_assert_int_ge(fd, 0);
#  424|->     ml = lr_metalink_init();
#  425|       ck_assert_ptr_nonnull(ml);
#  426|       ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def174]
librepo-1.20.0/tests/test_metalink.c:426:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_02", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:421:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:423:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:423:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:425:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_metalink.c:425:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:426:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_02", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  424|       ml = lr_metalink_init();
#  425|       ck_assert_ptr_nonnull(ml);
#  426|->     ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);
#  427|       ck_assert(!ret);
#  428|       ck_assert_ptr_nonnull(tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def175]
librepo-1.20.0/tests/test_metalink.c:446:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_03", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:445:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:446:5: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_03", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  444|                            "metalink_really_bad_03", NULL);
#  445|       fd = open(path, O_RDONLY);
#  446|->     g_free(path);
#  447|       ck_assert_int_ge(fd, 0);
#  448|       ml = lr_metalink_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def176]
librepo-1.20.0/tests/test_metalink.c:448:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_03", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:445:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:447:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:447:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:448:10: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_03", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  446|       g_free(path);
#  447|       ck_assert_int_ge(fd, 0);
#  448|->     ml = lr_metalink_init();
#  449|       ck_assert_ptr_nonnull(ml);
#  450|       ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def177]
librepo-1.20.0/tests/test_metalink.c:450:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_03", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:445:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:447:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:447:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:449:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_metalink.c:449:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:450:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_really_bad_03", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  448|       ml = lr_metalink_init();
#  449|       ck_assert_ptr_nonnull(ml);
#  450|->     ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);
#  451|       ck_assert(!ret);
#  452|       ck_assert_ptr_nonnull(tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def178]
librepo-1.20.0/tests/test_metalink.c:473:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_with_alternates", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:472:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:473:5: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_with_alternates", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  471|                            "metalink_with_alternates", NULL);
#  472|       fd = open(path, O_RDONLY);
#  473|->     g_free(path);
#  474|       ck_assert_int_ge(fd, 0);
#  475|       ml = lr_metalink_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def179]
librepo-1.20.0/tests/test_metalink.c:475:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_with_alternates", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:472:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:474:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:474:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:475:10: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_with_alternates", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
#  473|       g_free(path);
#  474|       ck_assert_int_ge(fd, 0);
#  475|->     ml = lr_metalink_init();
#  476|       ck_assert_ptr_nonnull(ml);
#  477|       ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def180]
librepo-1.20.0/tests/test_metalink.c:477:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_with_alternates", 0), 0)’
librepo-1.20.0/tests/test_metalink.c:472:10: acquire_resource: opened here
librepo-1.20.0/tests/test_metalink.c:474:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_metalink.c:474:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:476:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_metalink.c:476:5: branch_true: ...to here
librepo-1.20.0/tests/test_metalink.c:477:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "metalinks", "metalink_with_alternates", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  475|       ml = lr_metalink_init();
#  476|       ck_assert_ptr_nonnull(ml);
#  477|->     ret = lr_metalink_parse_file(ml, fd, REPOMD, NULL, NULL, &tmp_err);
#  478|       ck_assert(ret);
#  479|       ck_assert_ptr_null(tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def181]
librepo-1.20.0/tests/test_mirrorlist.c:38:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_01", 0), 0)’
librepo-1.20.0/tests/test_mirrorlist.c:37:10: acquire_resource: opened here
librepo-1.20.0/tests/test_mirrorlist.c:38:5: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_01", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   36|                            "mirrorlist_01", NULL);
#   37|       fd = open(path, O_RDONLY);
#   38|->     g_free(path);
#   39|       ck_assert_int_ge(fd, 0);
#   40|       ml = lr_mirrorlist_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def182]
librepo-1.20.0/tests/test_mirrorlist.c:40:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_01", 0), 0)’
librepo-1.20.0/tests/test_mirrorlist.c:37:10: acquire_resource: opened here
librepo-1.20.0/tests/test_mirrorlist.c:39:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_mirrorlist.c:39:5: branch_true: ...to here
librepo-1.20.0/tests/test_mirrorlist.c:40:10: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_01", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   38|       g_free(path);
#   39|       ck_assert_int_ge(fd, 0);
#   40|->     ml = lr_mirrorlist_init();
#   41|       ck_assert_ptr_nonnull(ml);
#   42|       ret = lr_mirrorlist_parse_file(ml, fd, &tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def183]
librepo-1.20.0/tests/test_mirrorlist.c:42:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_01", 0), 0)’
librepo-1.20.0/tests/test_mirrorlist.c:37:10: acquire_resource: opened here
librepo-1.20.0/tests/test_mirrorlist.c:39:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_mirrorlist.c:39:5: branch_true: ...to here
librepo-1.20.0/tests/test_mirrorlist.c:41:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_mirrorlist.c:41:5: branch_true: ...to here
librepo-1.20.0/tests/test_mirrorlist.c:42:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_01", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   40|       ml = lr_mirrorlist_init();
#   41|       ck_assert_ptr_nonnull(ml);
#   42|->     ret = lr_mirrorlist_parse_file(ml, fd, &tmp_err);
#   43|       close(fd);
#   44|       ck_assert(ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def184]
librepo-1.20.0/tests/test_mirrorlist.c:71:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_02", 0), 0)’
librepo-1.20.0/tests/test_mirrorlist.c:70:10: acquire_resource: opened here
librepo-1.20.0/tests/test_mirrorlist.c:71:5: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_02", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   69|                            "mirrorlist_02", NULL);
#   70|       fd = open(path, O_RDONLY);
#   71|->     g_free(path);
#   72|       ck_assert_int_ge(fd, 0);
#   73|       ml = lr_mirrorlist_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def185]
librepo-1.20.0/tests/test_mirrorlist.c:73:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_02", 0), 0)’
librepo-1.20.0/tests/test_mirrorlist.c:70:10: acquire_resource: opened here
librepo-1.20.0/tests/test_mirrorlist.c:72:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_mirrorlist.c:72:5: branch_true: ...to here
librepo-1.20.0/tests/test_mirrorlist.c:73:10: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_02", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   71|       g_free(path);
#   72|       ck_assert_int_ge(fd, 0);
#   73|->     ml = lr_mirrorlist_init();
#   74|       ck_assert_ptr_nonnull(ml);
#   75|       ret = lr_mirrorlist_parse_file(ml, fd, &tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def186]
librepo-1.20.0/tests/test_mirrorlist.c:75:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_02", 0), 0)’
librepo-1.20.0/tests/test_mirrorlist.c:70:10: acquire_resource: opened here
librepo-1.20.0/tests/test_mirrorlist.c:72:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_mirrorlist.c:72:5: branch_true: ...to here
librepo-1.20.0/tests/test_mirrorlist.c:74:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_mirrorlist.c:74:5: branch_true: ...to here
librepo-1.20.0/tests/test_mirrorlist.c:75:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_02", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#   73|       ml = lr_mirrorlist_init();
#   74|       ck_assert_ptr_nonnull(ml);
#   75|->     ret = lr_mirrorlist_parse_file(ml, fd, &tmp_err);
#   76|       close(fd);
#   77|       ck_assert(ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def187]
librepo-1.20.0/tests/test_mirrorlist.c:95:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_03", 0), 0)’
librepo-1.20.0/tests/test_mirrorlist.c:94:10: acquire_resource: opened here
librepo-1.20.0/tests/test_mirrorlist.c:95:5: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_03", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#   93|                            "mirrorlist_03", NULL);
#   94|       fd = open(path, O_RDONLY);
#   95|->     g_free(path);
#   96|       ck_assert_int_ge(fd, 0);
#   97|       ml = lr_mirrorlist_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def188]
librepo-1.20.0/tests/test_mirrorlist.c:97:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_03", 0), 0)’
librepo-1.20.0/tests/test_mirrorlist.c:94:10: acquire_resource: opened here
librepo-1.20.0/tests/test_mirrorlist.c:96:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_mirrorlist.c:96:5: branch_true: ...to here
librepo-1.20.0/tests/test_mirrorlist.c:97:10: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_03", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#   95|       g_free(path);
#   96|       ck_assert_int_ge(fd, 0);
#   97|->     ml = lr_mirrorlist_init();
#   98|       ck_assert_ptr_nonnull(ml);
#   99|       ret = lr_mirrorlist_parse_file(ml, fd, &tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def189]
librepo-1.20.0/tests/test_mirrorlist.c:99:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_03", 0), 0)’
librepo-1.20.0/tests/test_mirrorlist.c:94:10: acquire_resource: opened here
librepo-1.20.0/tests/test_mirrorlist.c:96:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_mirrorlist.c:96:5: branch_true: ...to here
librepo-1.20.0/tests/test_mirrorlist.c:98:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_mirrorlist.c:98:5: branch_true: ...to here
librepo-1.20.0/tests/test_mirrorlist.c:99:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "mirrorlists", "mirrorlist_03", 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#   97|       ml = lr_mirrorlist_init();
#   98|       ck_assert_ptr_nonnull(ml);
#   99|->     ret = lr_mirrorlist_parse_file(ml, fd, &tmp_err);
#  100|       close(fd);
#  101|       ck_assert(ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def190]
librepo-1.20.0/tests/test_repo_zck.c:30:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "repo_yum_03/repodata/repomd.xml", 0), 0)’
librepo-1.20.0/tests/test_repo_zck.c:26:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_repo_zck.c:26:5: branch_true: ...to here
librepo-1.20.0/tests/test_repo_zck.c:27:10: acquire_resource: opened here
librepo-1.20.0/tests/test_repo_zck.c:28:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_repo_zck.c:28:5: branch_true: ...to here
librepo-1.20.0/tests/test_repo_zck.c:30:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "repo_yum_03/repodata/repomd.xml", 0), 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   28|       ck_assert_int_ge(fd, 0);
#   29|   
#   30|->     ret = lr_yum_repomd_parse_file(repomd, fd, NULL, NULL, &tmp_err);
#   31|       close(fd);
#   32|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def191]
librepo-1.20.0/tests/test_repomd.c:30:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(lr_pathconcat(test_globals.testdata_dir, "repo_yum_02/repodata/repomd.xml", 0), 0)’
librepo-1.20.0/tests/test_repomd.c:26:5: branch_true: following ‘true’ branch...
librepo-1.20.0/tests/test_repomd.c:26:5: branch_true: ...to here
librepo-1.20.0/tests/test_repomd.c:27:10: acquire_resource: opened here
librepo-1.20.0/tests/test_repomd.c:28:5: branch_true: following ‘true’ branch (when ‘_ck_x >= 0’)...
librepo-1.20.0/tests/test_repomd.c:28:5: branch_true: ...to here
librepo-1.20.0/tests/test_repomd.c:30:11: danger: ‘open(lr_pathconcat(test_globals.testdata_dir, "repo_yum_02/repodata/repomd.xml", 0), 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   28|       ck_assert_int_ge(fd, 0);
#   29|   
#   30|->     ret = lr_yum_repomd_parse_file(repomd, fd, NULL, NULL, &tmp_err);
#   31|       close(fd);
#   32|   

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
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-5.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-gcc-latest-x86_64
project-namelibrepo-1.20.0-4.fc44
store-results-to/tmp/tmppwbq1sgj/librepo-1.20.0-4.fc44.tar.xz
time-created2025-10-28 19:10:19
time-finished2025-10-28 19:12:20
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmppwbq1sgj/librepo-1.20.0-4.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmppwbq1sgj/librepo-1.20.0-4.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9