createrepo_c-1.2.1-3.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
createrepo_c-1.2.1/src/checksum.c:148:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_resource: opened here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:148:10: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  146|   
#  147|       ctx = EVP_MD_CTX_create();
#  148|->     rc = EVP_DigestInit_ex(ctx, ctx_type, NULL);
#  149|       if (!rc) {
#  150|           g_set_error(err, ERR_DOMAIN, CRE_OPENSSL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
createrepo_c-1.2.1/src/checksum.c:148:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_memory: allocated here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:148:10: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  146|   
#  147|       ctx = EVP_MD_CTX_create();
#  148|->     rc = EVP_DigestInit_ex(ctx, ctx_type, NULL);
#  149|       if (!rc) {
#  150|           g_set_error(err, ERR_DOMAIN, CRE_OPENSSL,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
createrepo_c-1.2.1/src/checksum.c:150:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_resource: opened here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:149:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/checksum.c:150:9: branch_true: ...to here
createrepo_c-1.2.1/src/checksum.c:150:9: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  148|       rc = EVP_DigestInit_ex(ctx, ctx_type, NULL);
#  149|       if (!rc) {
#  150|->         g_set_error(err, ERR_DOMAIN, CRE_OPENSSL,
#  151|                       "EVP_DigestInit_ex() failed");
#  152|           EVP_MD_CTX_destroy(ctx);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
createrepo_c-1.2.1/src/checksum.c:150:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_memory: allocated here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:149:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/checksum.c:150:9: branch_true: ...to here
createrepo_c-1.2.1/src/checksum.c:150:9: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  148|       rc = EVP_DigestInit_ex(ctx, ctx_type, NULL);
#  149|       if (!rc) {
#  150|->         g_set_error(err, ERR_DOMAIN, CRE_OPENSSL,
#  151|                       "EVP_DigestInit_ex() failed");
#  152|           EVP_MD_CTX_destroy(ctx);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
createrepo_c-1.2.1/src/checksum.c:158:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_resource: opened here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:149:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:157:12: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/checksum.c:158:14: branch_true: ...to here
createrepo_c-1.2.1/src/checksum.c:158:14: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  156|   
#  157|       while ((readed = fread(buf, 1, BUFFER_SIZE, f)) == BUFFER_SIZE) {
#  158|->         if (!EVP_DigestUpdate(ctx, buf, readed)) {
#  159|               g_set_error(err, ERR_DOMAIN, CRE_OPENSSL,
#  160|                           "EVP_DigestUpdate() failed");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
createrepo_c-1.2.1/src/checksum.c:158:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_memory: allocated here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:149:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:157:12: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/checksum.c:158:14: branch_true: ...to here
createrepo_c-1.2.1/src/checksum.c:158:14: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  156|   
#  157|       while ((readed = fread(buf, 1, BUFFER_SIZE, f)) == BUFFER_SIZE) {
#  158|->         if (!EVP_DigestUpdate(ctx, buf, readed)) {
#  159|               g_set_error(err, ERR_DOMAIN, CRE_OPENSSL,
#  160|                           "EVP_DigestUpdate() failed");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
createrepo_c-1.2.1/src/checksum.c:159:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_resource: opened here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:149:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:157:12: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/checksum.c:158:14: branch_true: ...to here
createrepo_c-1.2.1/src/checksum.c:159:13: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  157|       while ((readed = fread(buf, 1, BUFFER_SIZE, f)) == BUFFER_SIZE) {
#  158|           if (!EVP_DigestUpdate(ctx, buf, readed)) {
#  159|->             g_set_error(err, ERR_DOMAIN, CRE_OPENSSL,
#  160|                           "EVP_DigestUpdate() failed");
#  161|               EVP_MD_CTX_destroy(ctx);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
createrepo_c-1.2.1/src/checksum.c:159:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_memory: allocated here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:149:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:157:12: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/checksum.c:158:14: branch_true: ...to here
createrepo_c-1.2.1/src/checksum.c:159:13: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  157|       while ((readed = fread(buf, 1, BUFFER_SIZE, f)) == BUFFER_SIZE) {
#  158|           if (!EVP_DigestUpdate(ctx, buf, readed)) {
#  159|->             g_set_error(err, ERR_DOMAIN, CRE_OPENSSL,
#  160|                           "EVP_DigestUpdate() failed");
#  161|               EVP_MD_CTX_destroy(ctx);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
createrepo_c-1.2.1/src/checksum.c:168:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_resource: opened here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:149:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:167:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/checksum.c:168:14: branch_true: ...to here
createrepo_c-1.2.1/src/checksum.c:168:14: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  166|   
#  167|       if (feof(f)) {
#  168|->         if (!EVP_DigestUpdate(ctx, buf, readed)) {
#  169|               g_set_error(err, ERR_DOMAIN, CRE_OPENSSL,
#  170|                           "EVP_DigestUpdate() failed");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
createrepo_c-1.2.1/src/checksum.c:168:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_memory: allocated here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:149:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:167:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/checksum.c:168:14: branch_true: ...to here
createrepo_c-1.2.1/src/checksum.c:168:14: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  166|   
#  167|       if (feof(f)) {
#  168|->         if (!EVP_DigestUpdate(ctx, buf, readed)) {
#  169|               g_set_error(err, ERR_DOMAIN, CRE_OPENSSL,
#  170|                           "EVP_DigestUpdate() failed");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def11]
createrepo_c-1.2.1/src/checksum.c:169:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_resource: opened here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:149:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:167:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/checksum.c:168:14: branch_true: ...to here
createrepo_c-1.2.1/src/checksum.c:168:12: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/checksum.c:169:13: branch_true: ...to here
createrepo_c-1.2.1/src/checksum.c:169:13: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  167|       if (feof(f)) {
#  168|           if (!EVP_DigestUpdate(ctx, buf, readed)) {
#  169|->             g_set_error(err, ERR_DOMAIN, CRE_OPENSSL,
#  170|                           "EVP_DigestUpdate() failed");
#  171|               EVP_MD_CTX_destroy(ctx);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
createrepo_c-1.2.1/src/checksum.c:169:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_memory: allocated here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:149:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:167:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/checksum.c:168:14: branch_true: ...to here
createrepo_c-1.2.1/src/checksum.c:168:12: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/checksum.c:169:13: branch_true: ...to here
createrepo_c-1.2.1/src/checksum.c:169:13: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  167|       if (feof(f)) {
#  168|           if (!EVP_DigestUpdate(ctx, buf, readed)) {
#  169|->             g_set_error(err, ERR_DOMAIN, CRE_OPENSSL,
#  170|                           "EVP_DigestUpdate() failed");
#  171|               EVP_MD_CTX_destroy(ctx);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
createrepo_c-1.2.1/src/checksum.c:176:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_resource: opened here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:149:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:167:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:177:66: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:176:9: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#  174|           }
#  175|       } else {
#  176|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
#  177|                       "Error while reading a file: %s", g_strerror(errno));
#  178|           EVP_MD_CTX_destroy(ctx);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
createrepo_c-1.2.1/src/checksum.c:176:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/checksum.c:140:9: acquire_memory: allocated here
createrepo_c-1.2.1/src/checksum.c:141:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:147:11: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:149:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:167:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/checksum.c:177:66: branch_false: ...to here
createrepo_c-1.2.1/src/checksum.c:176:9: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  174|           }
#  175|       } else {
#  176|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
#  177|                       "Error while reading a file: %s", g_strerror(errno));
#  178|           EVP_MD_CTX_destroy(ctx);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def15]
createrepo_c-1.2.1/src/cleanup.h:79:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘g_strndup(in_dst,  strlen(in_dst) - strlen(cr_compression_suffix(cr_detect_compression(in_dst, & tmp_err))))’
createrepo_c-1.2.1/src/misc.c:487:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:494:8: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:494:8: branch_false: following ‘false’ branch (when ‘in_dst’ is non-NULL)...
createrepo_c-1.2.1/src/misc.c:497:16: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:500:15: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:503:12: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:506:19: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:506:19: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:509:61: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:509:35: call_function: inlined call to ‘cr_local_free’ from ‘cr_compress_file_with_stat’
#   77|   CR_DEFINE_CLEANUP_FUNCTION(char**, cr_local_strfreev, g_strfreev)
#   78|   CR_DEFINE_CLEANUP_FUNCTION(GList*, cr_local_free_list, g_list_free)
#   79|-> CR_DEFINE_CLEANUP_FUNCTION(void*, cr_local_free, g_free)
#   80|   CR_DEFINE_CLEANUP_FUNCTION(int, cr_local_file_close, my_close)
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def16]
createrepo_c-1.2.1/src/compression_wrapper.c:424:35: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename,  mode_str)’
createrepo_c-1.2.1/src/compression_wrapper.c:356:8: branch_false: following ‘false’ branch (when ‘comtype != 0’)...
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: following ‘false’ branch (when ‘type != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:377:17: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:415:23: acquire_resource: opened here
createrepo_c-1.2.1/src/compression_wrapper.c:417:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:422:13: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:424:35: danger: ‘fopen(filename,  mode_str)’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  422|               file->INNERFILE = f;
#  423|   
#  424|->             ZstdFile *zstd_file = g_malloc0(sizeof(ZstdFile));
#  425|   
#  426|               if (mode == CR_CW_MODE_WRITE) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
createrepo_c-1.2.1/src/compression_wrapper.c:424:35: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename,  mode_str)’
createrepo_c-1.2.1/src/compression_wrapper.c:356:8: branch_false: following ‘false’ branch (when ‘comtype != 0’)...
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: following ‘false’ branch (when ‘type != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:377:17: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:415:23: acquire_memory: allocated here
createrepo_c-1.2.1/src/compression_wrapper.c:417:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:422:13: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:424:35: danger: ‘fopen(filename,  mode_str)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  422|               file->INNERFILE = f;
#  423|   
#  424|->             ZstdFile *zstd_file = g_malloc0(sizeof(ZstdFile));
#  425|   
#  426|               if (mode == CR_CW_MODE_WRITE) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def18]
createrepo_c-1.2.1/src/compression_wrapper.c:471:39: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename,  mode_str)’
createrepo_c-1.2.1/src/compression_wrapper.c:334:12: branch_false: following ‘false’ branch (when ‘comtype != 0’)...
createrepo_c-1.2.1/src/compression_wrapper.c:344:12: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:344:12: branch_false: following ‘false’ branch (when ‘comtype != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:356:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:356:8: branch_false: following ‘false’ branch (when ‘comtype != 0’)...
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: following ‘false’ branch (when ‘type != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:377:17: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:460:23: acquire_resource: opened here
createrepo_c-1.2.1/src/compression_wrapper.c:464:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:470:16: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:470:16: branch_true: following ‘true’ branch (when ‘mode == 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:471:39: branch_true: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:471:39: danger: ‘fopen(filename,  mode_str)’ leaks here; was opened at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  469|   
#  470|               if (mode == CR_CW_MODE_WRITE) {
#  471|->                 file->FILE = (void *) BZ2_bzWriteOpen(&bzerror,
#  472|                                                         f,
#  473|                                                         BZ2_BLOCKSIZE100K,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
createrepo_c-1.2.1/src/compression_wrapper.c:471:39: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename,  mode_str)’
createrepo_c-1.2.1/src/compression_wrapper.c:334:12: branch_false: following ‘false’ branch (when ‘comtype != 0’)...
createrepo_c-1.2.1/src/compression_wrapper.c:344:12: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:344:12: branch_false: following ‘false’ branch (when ‘comtype != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:356:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:356:8: branch_false: following ‘false’ branch (when ‘comtype != 0’)...
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: following ‘false’ branch (when ‘type != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:377:17: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:460:23: acquire_memory: allocated here
createrepo_c-1.2.1/src/compression_wrapper.c:464:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:470:16: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:470:16: branch_true: following ‘true’ branch (when ‘mode == 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:471:39: branch_true: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:471:39: danger: ‘fopen(filename,  mode_str)’ leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#  469|   
#  470|               if (mode == CR_CW_MODE_WRITE) {
#  471|->                 file->FILE = (void *) BZ2_bzWriteOpen(&bzerror,
#  472|                                                         f,
#  473|                                                         BZ2_BLOCKSIZE100K,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def20]
createrepo_c-1.2.1/src/compression_wrapper.c:477:39: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename,  mode_str)’
createrepo_c-1.2.1/src/compression_wrapper.c:356:8: branch_false: following ‘false’ branch (when ‘comtype != 0’)...
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: following ‘false’ branch (when ‘type != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:377:17: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:460:23: acquire_resource: opened here
createrepo_c-1.2.1/src/compression_wrapper.c:464:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:470:16: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:470:16: branch_false: following ‘false’ branch (when ‘mode != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:477:39: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:477:39: danger: ‘fopen(filename,  mode_str)’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  475|                                                         BZ2_WORK_FACTOR);
#  476|               } else {
#  477|->                 file->FILE = (void *) BZ2_bzReadOpen(&bzerror,
#  478|                                                        f,
#  479|                                                        BZ2_VERBOSITY,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
createrepo_c-1.2.1/src/compression_wrapper.c:477:39: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename,  mode_str)’
createrepo_c-1.2.1/src/compression_wrapper.c:356:8: branch_false: following ‘false’ branch (when ‘comtype != 0’)...
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: following ‘false’ branch (when ‘type != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:377:17: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:460:23: acquire_memory: allocated here
createrepo_c-1.2.1/src/compression_wrapper.c:464:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:470:16: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:470:16: branch_false: following ‘false’ branch (when ‘mode != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:477:39: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:477:39: danger: ‘fopen(filename,  mode_str)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  475|                                                         BZ2_WORK_FACTOR);
#  476|               } else {
#  477|->                 file->FILE = (void *) BZ2_bzReadOpen(&bzerror,
#  478|                                                        f,
#  479|                                                        BZ2_VERBOSITY,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def22]
createrepo_c-1.2.1/src/compression_wrapper.c:643:35: warning[-Wanalyzer-file-leak]: leak of FILE
createrepo_c-1.2.1/src/compression_wrapper.c:356:8: branch_false: following ‘false’ branch (when ‘comtype != 0’)...
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: following ‘false’ branch (when ‘type != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:377:17: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:632:23: acquire_resource: opened here
createrepo_c-1.2.1/src/compression_wrapper.c:634:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:640:13: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:643:35: danger: leaks here; was opened at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  641|               int fd = fileno(f);
#  642|   
#  643|->             file->FILE = (void *) zck_create();
#  644|               zckCtx *zck = file->FILE;
#  645|               if (mode == CR_CW_MODE_WRITE) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
createrepo_c-1.2.1/src/compression_wrapper.c:643:35: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
createrepo_c-1.2.1/src/compression_wrapper.c:356:8: branch_false: following ‘false’ branch (when ‘comtype != 0’)...
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: following ‘false’ branch (when ‘type != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:377:17: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:632:23: acquire_memory: allocated here
createrepo_c-1.2.1/src/compression_wrapper.c:634:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:640:13: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:643:35: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  641|               int fd = fileno(f);
#  642|   
#  643|->             file->FILE = (void *) zck_create();
#  644|               zckCtx *zck = file->FILE;
#  645|               if (mode == CR_CW_MODE_WRITE) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def24]
createrepo_c-1.2.1/src/compression_wrapper.c:689:13: warning[-Wanalyzer-file-leak]: leak of FILE
createrepo_c-1.2.1/src/compression_wrapper.c:356:8: branch_false: following ‘false’ branch (when ‘comtype != 0’)...
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: following ‘false’ branch (when ‘type != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:377:17: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:388:35: acquire_resource: opened here
createrepo_c-1.2.1/src/compression_wrapper.c:389:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:674:10: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:674:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:683:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:683:8: branch_true: following ‘true’ branch (when ‘stat’ is non-NULL)...
createrepo_c-1.2.1/src/compression_wrapper.c:684:9: branch_true: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:686:12: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:689:34: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:689:13: danger: leaks here; was opened at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  687|               file->checksum_ctx = NULL;
#  688|           } else {
#  689|->             file->checksum_ctx = cr_checksum_new(stat->checksum_type,
#  690|                                                    &tmp_err);
#  691|               if (tmp_err) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
createrepo_c-1.2.1/src/compression_wrapper.c:689:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
createrepo_c-1.2.1/src/compression_wrapper.c:356:8: branch_false: following ‘false’ branch (when ‘comtype != 0’)...
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:366:8: branch_false: following ‘false’ branch (when ‘type != 1’)...
createrepo_c-1.2.1/src/compression_wrapper.c:377:17: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:388:35: acquire_memory: allocated here
createrepo_c-1.2.1/src/compression_wrapper.c:389:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:674:10: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:674:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:683:8: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:683:8: branch_true: following ‘true’ branch (when ‘stat’ is non-NULL)...
createrepo_c-1.2.1/src/compression_wrapper.c:684:9: branch_true: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:686:12: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:689:34: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:689:13: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  687|               file->checksum_ctx = NULL;
#  688|           } else {
#  689|->             file->checksum_ctx = cr_checksum_new(stat->checksum_type,
#  690|                                                    &tmp_err);
#  691|               if (tmp_err) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def26]
createrepo_c-1.2.1/src/compression_wrapper.c:1651:11: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
createrepo_c-1.2.1/src/compression_wrapper.c:1640:8: branch_false: following ‘false’ branch (when ‘format’ is non-NULL)...
createrepo_c-1.2.1/src/compression_wrapper.c:1643:9: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:1643:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/compression_wrapper.c:1650:5: branch_false: ...to here
createrepo_c-1.2.1/src/compression_wrapper.c:1650:5: acquire_resource: ‘va_start’ called here
createrepo_c-1.2.1/src/compression_wrapper.c:1651:11: danger: missing call to ‘va_end’ to match ‘va_start’ at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
# 1649|       // Fill format string
# 1650|       va_start(vl, format);
# 1651|->     ret = g_vasprintf(&buf, format, vl);
# 1652|       va_end(vl);
# 1653|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def27]
createrepo_c-1.2.1/src/dumper_thread.c:380:28: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_strdup_printf("%s%s-%s-%li-%li", cachedir,  cr_get_filename(*pkg.location_href), cr_checksum_final(cr_checksum_new(type,  err), err), *pkg.size_installed, *pkg.time_file), "r")’
createrepo_c-1.2.1/src/dumper_thread.c:443:1: enter_function: entry to ‘load_rpm’
createrepo_c-1.2.1/src/dumper_thread.c:461:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/dumper_thread.c:465:26: branch_false: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:465:26: call_function: inlined call to ‘cr_safe_string_chunk_insert’ from ‘load_rpm’
createrepo_c-1.2.1/src/dumper_thread.c:465:5: branch_true: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:466:26: call_function: inlined call to ‘cr_safe_string_chunk_insert’ from ‘load_rpm’
createrepo_c-1.2.1/src/dumper_thread.c:473:8: branch_false: following ‘false’ branch (when ‘stat_buf’ is non-NULL)...
createrepo_c-1.2.1/src/dumper_thread.c:486:29: branch_false: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:491:22: call_function: calling ‘get_checksum’ from ‘load_rpm’
#  378|               size_t readed = fread(buf, 1, CACHEDCHKSUM_BUFFER_LEN, f);
#  379|               if (!ferror(f) && readed > 0) {
#  380|->                 checksum = g_strndup(buf, readed);
#  381|               }
#  382|               fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
createrepo_c-1.2.1/src/dumper_thread.c:380:28: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_strdup_printf("%s%s-%s-%li-%li", cachedir,  cr_get_filename(*pkg.location_href), cr_checksum_final(cr_checksum_new(type,  err), err), *pkg.size_installed, *pkg.time_file), "r")’
createrepo_c-1.2.1/src/dumper_thread.c:443:1: enter_function: entry to ‘load_rpm’
createrepo_c-1.2.1/src/dumper_thread.c:461:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/dumper_thread.c:465:26: branch_false: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:465:26: call_function: inlined call to ‘cr_safe_string_chunk_insert’ from ‘load_rpm’
createrepo_c-1.2.1/src/dumper_thread.c:465:5: branch_true: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:466:26: call_function: inlined call to ‘cr_safe_string_chunk_insert’ from ‘load_rpm’
createrepo_c-1.2.1/src/dumper_thread.c:473:8: branch_false: following ‘false’ branch (when ‘stat_buf’ is non-NULL)...
createrepo_c-1.2.1/src/dumper_thread.c:486:29: branch_false: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:491:22: call_function: calling ‘get_checksum’ from ‘load_rpm’
#  378|               size_t readed = fread(buf, 1, CACHEDCHKSUM_BUFFER_LEN, f);
#  379|               if (!ferror(f) && readed > 0) {
#  380|->                 checksum = g_strndup(buf, readed);
#  381|               }
#  382|               fclose(f);

Error: COMPILER_WARNING (CWE-252): [#def29]
createrepo_c-1.2.1/src/dumper_thread.c: scope_hint: In function ‘get_checksum’
createrepo_c-1.2.1/src/dumper_thread.c:409:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  409 |         write(fd, checksum, strlen(checksum));
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  407|           }
#  408|   
#  409|->         write(fd, checksum, strlen(checksum));
#  410|           close(fd);
#  411|           if (!cr_move_recursive(template, cachefn, &tmp_err)) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def30]
createrepo_c-1.2.1/src/dumper_thread.c:606:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘stat_buf.st_mtim.tv_sec’
createrepo_c-1.2.1/src/dumper_thread.c:520:1: enter_function: entry to ‘cr_dumper_thread’
createrepo_c-1.2.1/src/dumper_thread.c:534:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/dumper_thread.c:539:18: branch_true: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:554:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/dumper_thread.c:560:9: branch_false: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:560:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/dumper_thread.c:567:9: branch_false: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:567:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/dumper_thread.c:575:9: branch_false: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:579:9: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/dumper_thread.c:587:9: branch_false: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:587:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/dumper_thread.c:588:27: branch_true: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:601:12: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/dumper_thread.c:602:13: branch_true: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:604:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/dumper_thread.c:606:24: branch_false: ...to here
createrepo_c-1.2.1/src/dumper_thread.c:606:23: danger: use of uninitialized value ‘stat_buf.st_mtim.tv_sec’ here
#  604|               if (udata->skip_stat) {
#  605|                   old_used = TRUE;
#  606|->             } else if (stat_buf.st_mtime == md->time_file
#  607|                          && stat_buf.st_size == md->size_package
#  608|                          && !strcmp(udata->checksum_type_str, md->checksum_type))

Error: COMPILER_WARNING (CWE-9001): [#def31]
createrepo_c-1.2.1/src/locate_metadata.c:268:9: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  268 |     if (curl_easy_setopt(handle, CURLOPT_FAILONERROR, 1) != CURLE_OK) {
#      |         ^~~~~~~~~~~~~~~~
#  266|   
#  267|       // Fail on HTTP error (return code >= 400)
#  268|->     if (curl_easy_setopt(handle, CURLOPT_FAILONERROR, 1) != CURLE_OK) {
#  269|           g_critical("%s: curl_easy_setopt(CURLOPT_FAILONERROR) error", __func__);
#  270|           goto get_remote_metadata_cleanup;

Error: COMPILER_WARNING (CWE-9001): [#def32]
createrepo_c-1.2.1/src/locate_metadata.c:268:9: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  266|   
#  267|       // Fail on HTTP error (return code >= 400)
#  268|->     if (curl_easy_setopt(handle, CURLOPT_FAILONERROR, 1) != CURLE_OK) {
#  269|           g_critical("%s: curl_easy_setopt(CURLOPT_FAILONERROR) error", __func__);
#  270|           goto get_remote_metadata_cleanup;

Error: COMPILER_WARNING (CWE-9001): [#def33]
createrepo_c-1.2.1/src/locate_metadata.c:274:9: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  274 |     if (curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1) != CURLE_OK) {
#      |         ^~~~~~~~~~~~~~~~
#  272|   
#  273|       // Follow redirs
#  274|->     if (curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1) != CURLE_OK) {
#  275|           g_critical("%s: curl_easy_setopt(CURLOPT_FOLLOWLOCATION) error", __func__);
#  276|           goto get_remote_metadata_cleanup;

Error: COMPILER_WARNING (CWE-9001): [#def34]
createrepo_c-1.2.1/src/locate_metadata.c:274:9: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  272|   
#  273|       // Follow redirs
#  274|->     if (curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1) != CURLE_OK) {
#  275|           g_critical("%s: curl_easy_setopt(CURLOPT_FOLLOWLOCATION) error", __func__);
#  276|           goto get_remote_metadata_cleanup;

Error: COMPILER_WARNING (CWE-9001): [#def35]
createrepo_c-1.2.1/src/locate_metadata.c:280:9: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  280 |     if (curl_easy_setopt(handle, CURLOPT_MAXREDIRS, 6) != CURLE_OK) {
#      |         ^~~~~~~~~~~~~~~~
#  278|   
#  279|       // Maximal number of redirects
#  280|->     if (curl_easy_setopt(handle, CURLOPT_MAXREDIRS, 6) != CURLE_OK) {
#  281|           g_critical("%s: curl_easy_setopt(CURLOPT_MAXREDIRS) error", __func__);
#  282|           goto get_remote_metadata_cleanup;

Error: COMPILER_WARNING (CWE-9001): [#def36]
createrepo_c-1.2.1/src/locate_metadata.c:280:9: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  278|   
#  279|       // Maximal number of redirects
#  280|->     if (curl_easy_setopt(handle, CURLOPT_MAXREDIRS, 6) != CURLE_OK) {
#  281|           g_critical("%s: curl_easy_setopt(CURLOPT_MAXREDIRS) error", __func__);
#  282|           goto get_remote_metadata_cleanup;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def37]
createrepo_c-1.2.1/src/mergerepo_c.c:1316:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pri_cr_zck’
createrepo_c-1.2.1/src/mergerepo_c.c:887:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:889:32: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:907:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:909:36: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:923:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:963:38: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:973:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:977:43: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:982:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:987:13: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:991:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1015:13: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1019:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1043:9: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1043:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1044:17: branch_true: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1048:12: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1074:13: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1078:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1105:5: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1111:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1253:9: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1253:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1289:12: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1294:22: branch_true: following ‘true’ branch (when ‘key’ is non-NULL)...
createrepo_c-1.2.1/src/mergerepo_c.c:1295:64: branch_true: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1298:16: branch_true: following ‘true’ branch (when ‘element’ is non-NULL)...
createrepo_c-1.2.1/src/mergerepo_c.c:1302:13: branch_true: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1312:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1316:17: danger: dereference of NULL ‘pri_cr_zck’
# 1314|                   strlen(prev_srpm) != strlen(pkg->rpm_sourcerpm) ||
# 1315|                   strncmp(pkg->rpm_sourcerpm, prev_srpm, strlen(prev_srpm)) != 0)) {
# 1316|->                 cr_end_chunk(pri_cr_zck->f, NULL);
# 1317|                   cr_end_chunk(fil_cr_zck->f, NULL);
# 1318|                   if (cmd_options->filelists_ext)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
createrepo_c-1.2.1/src/mergerepo_c.c:1687:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘fex_db_task’
createrepo_c-1.2.1/src/mergerepo_c.c:907:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:909:36: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:923:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:963:38: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:973:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:977:43: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:982:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:987:13: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:991:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1015:13: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1019:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1043:9: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1043:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1044:17: branch_true: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1048:12: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1074:13: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1078:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1105:5: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1111:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1253:9: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1253:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1289:12: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1398:8: branch_true: following ‘true’ branch (when ‘module_index’ is non-NULL)...
createrepo_c-1.2.1/src/mergerepo_c.c:1401:25: branch_true: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1432:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1434:36: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1454:8: branch_true: following ‘true’ branch (when ‘module_index’ is non-NULL)...
createrepo_c-1.2.1/src/mergerepo_c.c:1456:11: branch_true: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1506:8: branch_true: following ‘true’ branch (when ‘module_index’ is non-NULL)...
createrepo_c-1.2.1/src/mergerepo_c.c:1507:25: branch_true: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1512:12: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1526:8: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1526:8: branch_false: following ‘false’ branch (when ‘groupfile’ is NULL)...
createrepo_c-1.2.1/src/mergerepo_c.c:1545:10: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1545:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1561:9: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1561:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1585:8: branch_true: following ‘true’ branch (when ‘module_index’ is non-NULL)...
createrepo_c-1.2.1/src/mergerepo_c.c:1586:7: branch_true: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1593:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1594:33: branch_true: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1623:12: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1625:36: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1649:12: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1658:23: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1670:12: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1672:22: branch_false: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1686:12: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/mergerepo_c.c:1687:13: branch_true: ...to here
createrepo_c-1.2.1/src/mergerepo_c.c:1687:13: danger: dereference of NULL ‘fex_db_task’
# 1685|           cr_repomd_record_load_contentstat(fil_db_rec, fil_db_task->stat);
# 1686|           if (cmd_options->filelists_ext)
# 1687|->             cr_repomd_record_load_contentstat(fex_db_rec, fex_db_task->stat);
# 1688|           cr_repomd_record_load_contentstat(oth_db_rec, oth_db_task->stat);
# 1689|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def39]
createrepo_c-1.2.1/src/misc.c:285:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_resource: opened here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:9: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  283|       // Get header range
#  284|       // Seek to Lead (96) + 8 bytes and read the number of entries in the signature header, then convert to host byte order
#  285|->     if (fseek(fp, 104, SEEK_SET) != 0) {
#  286|           const gchar * fseek_error = g_strerror(errno);
#  287|           g_debug("%s: fseek fail on %s (%s)", __func__, filename, fseek_error);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
createrepo_c-1.2.1/src/misc.c:285:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_memory: allocated here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:9: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  283|       // Get header range
#  284|       // Seek to Lead (96) + 8 bytes and read the number of entries in the signature header, then convert to host byte order
#  285|->     if (fseek(fp, 104, SEEK_SET) != 0) {
#  286|           const gchar * fseek_error = g_strerror(errno);
#  287|           g_debug("%s: fseek fail on %s (%s)", __func__, filename, fseek_error);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def41]
createrepo_c-1.2.1/src/misc.c:288:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_resource: opened here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:286:48: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:288:9: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  286|           const gchar * fseek_error = g_strerror(errno);
#  287|           g_debug("%s: fseek fail on %s (%s)", __func__, filename, fseek_error);
#  288|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
#  289|                       "Cannot seek over %s: %s", filename, fseek_error);
#  290|           fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
createrepo_c-1.2.1/src/misc.c:288:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_memory: allocated here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:286:48: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:288:9: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  286|           const gchar * fseek_error = g_strerror(errno);
#  287|           g_debug("%s: fseek fail on %s (%s)", __func__, filename, fseek_error);
#  288|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
#  289|                       "Cannot seek over %s: %s", filename, fseek_error);
#  290|           fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
createrepo_c-1.2.1/src/misc.c:297:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_resource: opened here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:294:18: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:296:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:298:69: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:297:9: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  295|       unsigned int sigdata  = 0;
#  296|       if (fread(&sigindex, VAL_LEN, 1, fp) != 1) {
#  297|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
#  298|                       "fread() error on %s: %s", filename, g_strerror(errno));
#  299|           fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
createrepo_c-1.2.1/src/misc.c:297:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_memory: allocated here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:294:18: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:296:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:298:69: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:297:9: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  295|       unsigned int sigdata  = 0;
#  296|       if (fread(&sigindex, VAL_LEN, 1, fp) != 1) {
#  297|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
#  298|                       "fread() error on %s: %s", filename, g_strerror(errno));
#  299|           fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
createrepo_c-1.2.1/src/misc.c:305:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_resource: opened here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:294:18: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:296:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:302:16: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:304:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:306:69: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:305:9: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  303|       // Read the length of the data section and convert to host byte order
#  304|       if (fread(&sigdata, VAL_LEN, 1, fp) != 1) {
#  305|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
#  306|                       "fread() error on %s: %s", filename, g_strerror(errno));
#  307|           fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
createrepo_c-1.2.1/src/misc.c:305:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_memory: allocated here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:294:18: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:296:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:302:16: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:304:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:306:69: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:305:9: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  303|       // Read the length of the data section and convert to host byte order
#  304|       if (fread(&sigdata, VAL_LEN, 1, fp) != 1) {
#  305|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
#  306|                       "fread() error on %s: %s", filename, g_strerror(errno));
#  307|           fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
createrepo_c-1.2.1/src/misc.c:322:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_resource: opened here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:294:18: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:296:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:302:16: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:304:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:310:15: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:316:8: branch_false: following ‘false’ branch (when ‘disttoboundary == 0’)...
createrepo_c-1.2.1/src/misc.c:319:29: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:322:5: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  320|   
#  321|       // Seek to start of header (96) + 8 bytes and read the number of entries in the header, then convert to host byte order
#  322|->     fseek(fp, hdrstart, SEEK_SET);
#  323|       fseek(fp, 8, SEEK_CUR);
#  324|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
createrepo_c-1.2.1/src/misc.c:322:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_memory: allocated here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:294:18: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:296:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:302:16: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:304:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:310:15: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:316:8: branch_false: following ‘false’ branch (when ‘disttoboundary == 0’)...
createrepo_c-1.2.1/src/misc.c:319:29: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:322:5: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  320|   
#  321|       // Seek to start of header (96) + 8 bytes and read the number of entries in the header, then convert to host byte order
#  322|->     fseek(fp, hdrstart, SEEK_SET);
#  323|       fseek(fp, 8, SEEK_CUR);
#  324|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
createrepo_c-1.2.1/src/misc.c:323:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_resource: opened here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:294:18: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:296:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:302:16: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:304:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:310:15: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:316:8: branch_false: following ‘false’ branch (when ‘disttoboundary == 0’)...
createrepo_c-1.2.1/src/misc.c:319:29: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:323:5: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  321|       // Seek to start of header (96) + 8 bytes and read the number of entries in the header, then convert to host byte order
#  322|       fseek(fp, hdrstart, SEEK_SET);
#  323|->     fseek(fp, 8, SEEK_CUR);
#  324|   
#  325|       unsigned int hdrindex = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
createrepo_c-1.2.1/src/misc.c:323:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_memory: allocated here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:294:18: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:296:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:302:16: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:304:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:310:15: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:316:8: branch_false: following ‘false’ branch (when ‘disttoboundary == 0’)...
createrepo_c-1.2.1/src/misc.c:319:29: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:323:5: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#  321|       // Seek to start of header (96) + 8 bytes and read the number of entries in the header, then convert to host byte order
#  322|       fseek(fp, hdrstart, SEEK_SET);
#  323|->     fseek(fp, 8, SEEK_CUR);
#  324|   
#  325|       unsigned int hdrindex = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def51]
createrepo_c-1.2.1/src/misc.c:328:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_resource: opened here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:294:18: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:296:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:302:16: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:304:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:310:15: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:316:8: branch_false: following ‘false’ branch (when ‘disttoboundary == 0’)...
createrepo_c-1.2.1/src/misc.c:319:29: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:327:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:329:69: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:328:9: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  326|       unsigned int hdrdata  = 0;
#  327|       if (fread(&hdrindex, VAL_LEN, 1, fp) != 1) {
#  328|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
#  329|                       "fread() error on %s: %s", filename, g_strerror(errno));
#  330|           fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
createrepo_c-1.2.1/src/misc.c:328:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_memory: allocated here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:294:18: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:296:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:302:16: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:304:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:310:15: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:316:8: branch_false: following ‘false’ branch (when ‘disttoboundary == 0’)...
createrepo_c-1.2.1/src/misc.c:319:29: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:327:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:329:69: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:328:9: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  326|       unsigned int hdrdata  = 0;
#  327|       if (fread(&hdrindex, VAL_LEN, 1, fp) != 1) {
#  328|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
#  329|                       "fread() error on %s: %s", filename, g_strerror(errno));
#  330|           fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
createrepo_c-1.2.1/src/misc.c:336:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_resource: opened here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:294:18: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:296:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:302:16: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:304:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:310:15: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:316:8: branch_false: following ‘false’ branch (when ‘disttoboundary == 0’)...
createrepo_c-1.2.1/src/misc.c:319:29: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:327:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:333:16: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:335:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:337:69: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:336:9: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  334|       // Read the length of the data section and convert to host byte order
#  335|       if (fread(&hdrdata, VAL_LEN, 1, fp) != 1) {
#  336|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
#  337|                       "fread() error on %s: %s", filename, g_strerror(errno));
#  338|           fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
createrepo_c-1.2.1/src/misc.c:336:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
createrepo_c-1.2.1/src/misc.c:273:16: acquire_memory: allocated here
createrepo_c-1.2.1/src/misc.c:274:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:285:9: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:285:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:294:18: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:296:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:302:16: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:304:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:310:15: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:316:8: branch_false: following ‘false’ branch (when ‘disttoboundary == 0’)...
createrepo_c-1.2.1/src/misc.c:319:29: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:327:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:333:16: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:335:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:337:69: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:336:9: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  334|       // Read the length of the data section and convert to host byte order
#  335|       if (fread(&hdrdata, VAL_LEN, 1, fp) != 1) {
#  336|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
#  337|                       "fread() error on %s: %s", filename, g_strerror(errno));
#  338|           fclose(fp);

Error: CPPCHECK_WARNING (CWE-404): [#def55]
createrepo_c-1.2.1/src/misc.c:438: error[resourceLeak]: Resource leak: orig
#  436|           g_set_error(err, ERR_DOMAIN, CRE_IO,
#  437|                       "Cannot open file %s: %s", dst, fopen_error);
#  438|->         return FALSE;
#  439|       }
#  440|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
createrepo_c-1.2.1/src/misc.c:687:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dst, "wb")’
createrepo_c-1.2.1/src/misc.c:619:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:626:8: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:669:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:676:11: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:676:11: acquire_resource: opened here
createrepo_c-1.2.1/src/misc.c:677:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:687:22: danger: ‘fopen(dst, "wb")’ leaks here; was opened at [(5)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/4)
#  685|       }
#  686|   
#  687|->     while ((readed = cr_read(orig, buf, BUFFER_SIZE, &tmp_err)) > 0) {
#  688|           if (tmp_err) {
#  689|               g_debug("%s: Error while copy %s -> %s (%s)", __func__, src,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
createrepo_c-1.2.1/src/misc.c:687:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dst, "wb")’
createrepo_c-1.2.1/src/misc.c:619:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:626:8: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:669:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:676:11: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:676:11: acquire_memory: allocated here
createrepo_c-1.2.1/src/misc.c:677:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:687:22: danger: ‘fopen(dst, "wb")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/4)
#  685|       }
#  686|   
#  687|->     while ((readed = cr_read(orig, buf, BUFFER_SIZE, &tmp_err)) > 0) {
#  688|           if (tmp_err) {
#  689|               g_debug("%s: Error while copy %s -> %s (%s)", __func__, src,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def58]
createrepo_c-1.2.1/src/misc.c:691:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dst, "wb")’
createrepo_c-1.2.1/src/misc.c:619:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:626:8: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:669:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:676:11: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:676:11: acquire_resource: opened here
createrepo_c-1.2.1/src/misc.c:677:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:687:12: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:688:13: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:691:13: danger: ‘fopen(dst, "wb")’ leaks here; was opened at [(5)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/4)
#  689|               g_debug("%s: Error while copy %s -> %s (%s)", __func__, src,
#  690|                       dst, tmp_err->message);
#  691|->             g_propagate_prefixed_error(err, tmp_err,
#  692|                                          "Error while read %s: ", src);
#  693|               ret = CRE_IO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
createrepo_c-1.2.1/src/misc.c:691:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dst, "wb")’
createrepo_c-1.2.1/src/misc.c:619:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:626:8: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:669:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:676:11: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:676:11: acquire_memory: allocated here
createrepo_c-1.2.1/src/misc.c:677:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:687:12: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:688:13: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:691:13: danger: ‘fopen(dst, "wb")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/4)
#  689|               g_debug("%s: Error while copy %s -> %s (%s)", __func__, src,
#  690|                       dst, tmp_err->message);
#  691|->             g_propagate_prefixed_error(err, tmp_err,
#  692|                                          "Error while read %s: ", src);
#  693|               ret = CRE_IO;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
createrepo_c-1.2.1/src/misc.c:701:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dst, "wb")’
createrepo_c-1.2.1/src/misc.c:619:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:626:8: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:669:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:676:11: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:676:11: acquire_resource: opened here
createrepo_c-1.2.1/src/misc.c:677:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:687:12: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:688:13: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:688:12: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:697:13: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:701:13: danger: ‘fopen(dst, "wb")’ leaks here; was opened at [(5)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/4)
#  699|               g_debug("%s: Error while copy %s -> %s (%s)",
#  700|                       __func__, src, dst, fwrite_error);
#  701|->             g_set_error(err, ERR_DOMAIN, CRE_IO,
#  702|                           "Error while write %s: %s", dst, fwrite_error);
#  703|               ret = CRE_IO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
createrepo_c-1.2.1/src/misc.c:701:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dst, "wb")’
createrepo_c-1.2.1/src/misc.c:619:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:626:8: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:669:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:676:11: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:676:11: acquire_memory: allocated here
createrepo_c-1.2.1/src/misc.c:677:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:687:12: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:688:13: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:688:12: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:697:13: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:701:13: danger: ‘fopen(dst, "wb")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/4)
#  699|               g_debug("%s: Error while copy %s -> %s (%s)",
#  700|                       __func__, src, dst, fwrite_error);
#  701|->             g_set_error(err, ERR_DOMAIN, CRE_IO,
#  702|                           "Error while write %s: %s", dst, fwrite_error);
#  703|               ret = CRE_IO;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def62]
createrepo_c-1.2.1/src/misc.c:714:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘new’
createrepo_c-1.2.1/src/misc.c:619:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:626:8: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:669:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:676:11: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:676:11: acquire_resource: opened here
createrepo_c-1.2.1/src/misc.c:677:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:713:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:714:9: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:714:9: danger: ‘new’ leaks here; was opened at [(5)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/4)
#  712|   
#  713|       if (orig)
#  714|->         cr_close(orig, NULL);
#  715|   
#  716|       if (new)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
createrepo_c-1.2.1/src/misc.c:714:9: warning[-Wanalyzer-malloc-leak]: leak of ‘new’
createrepo_c-1.2.1/src/misc.c:619:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:626:8: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:669:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:676:11: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:676:11: acquire_memory: allocated here
createrepo_c-1.2.1/src/misc.c:677:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:713:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:714:9: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:714:9: danger: ‘new’ leaks here; was allocated at [(5)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/4)
#  712|   
#  713|       if (orig)
#  714|->         cr_close(orig, NULL);
#  715|   
#  716|       if (new)

Error: CPPCHECK_WARNING (CWE-404): [#def64]
createrepo_c-1.2.1/src/misc.c:767: error[resourceLeak]: Resource leak: file
#  765|                       "curl_easy_setopt failed(CURLOPT_ERRORBUFFER): %s",
#  766|                       curl_easy_strerror(rcode));
#  767|->         return CRE_CURL;
#  768|       }
#  769|   

Error: CPPCHECK_WARNING (CWE-404): [#def65]
createrepo_c-1.2.1/src/misc.c:778: error[resourceLeak]: Resource leak: file
#  776|                       curl_easy_strerror(rcode));
#  777|           remove(dst);
#  778|->         return CRE_CURL;
#  779|       }
#  780|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def66]
createrepo_c-1.2.1/src/misc.c:1363:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "w")’
createrepo_c-1.2.1/src/misc.c:1345:8: branch_false: following ‘false’ branch (when ‘format’ is non-NULL)...
createrepo_c-1.2.1/src/misc.c:1348:15: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:1348:15: acquire_resource: opened here
createrepo_c-1.2.1/src/misc.c:1349:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:1356:5: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:1362:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:1365:42: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:1363:9: danger: ‘fopen(filename, "w")’ leaks here; was opened at [(3)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/2)
# 1361|   
# 1362|       if (ferror(f)) {
# 1363|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
# 1364|                       "Cannot write content to %s: %s",
# 1365|                       filename, g_strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
createrepo_c-1.2.1/src/misc.c:1363:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "w")’
createrepo_c-1.2.1/src/misc.c:1345:8: branch_false: following ‘false’ branch (when ‘format’ is non-NULL)...
createrepo_c-1.2.1/src/misc.c:1348:15: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:1348:15: acquire_memory: allocated here
createrepo_c-1.2.1/src/misc.c:1349:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/misc.c:1356:5: branch_false: ...to here
createrepo_c-1.2.1/src/misc.c:1362:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/misc.c:1365:42: branch_true: ...to here
createrepo_c-1.2.1/src/misc.c:1363:9: danger: ‘fopen(filename, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/2)
# 1361|   
# 1362|       if (ferror(f)) {
# 1363|->         g_set_error(err, ERR_DOMAIN, CRE_IO,
# 1364|                       "Cannot write content to %s: %s",
# 1365|                       filename, g_strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
createrepo_c-1.2.1/src/misc.h:365:12: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:184:1: enter_function: entry to ‘cr_package_from_header’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:282:27: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:282:27: call_function: inlined call to ‘cr_safe_string_chunk_insert’ from ‘cr_package_from_header’
#  363|   {
#  364|       if (!str) return NULL;
#  365|->     return g_string_chunk_insert(chunk, str);
#  366|   }
#  367|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
createrepo_c-1.2.1/src/parsehdr.c:281:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  279|           int x = 0;
#  280|           dir_list = malloc(sizeof(char *) * dir_count);
#  281|->         while (rpmtdNext(dirnames) != -1) {
#  282|               dir_list[x] = cr_safe_string_chunk_insert(pkg->chunk, rpmtdGetString(dirnames));
#  283|               x++;

Error: CPPCHECK_WARNING (CWE-476): [#def70]
createrepo_c-1.2.1/src/parsehdr.c:282: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dir_list
#  280|           dir_list = malloc(sizeof(char *) * dir_count);
#  281|           while (rpmtdNext(dirnames) != -1) {
#  282|->             dir_list[x] = cr_safe_string_chunk_insert(pkg->chunk, rpmtdGetString(dirnames));
#  283|               x++;
#  284|           }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def71]
createrepo_c-1.2.1/src/parsehdr.c:282:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:184:1: enter_function: entry to ‘cr_package_from_header’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: this call could return NULL
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:282:27: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:282:27: call_function: inlined call to ‘cr_safe_string_chunk_insert’ from ‘cr_package_from_header’
createrepo_c-1.2.1/src/parsehdr.c:282:13: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:282:13: danger: ‘dir_list + (long unsigned int)x * 8’ could be NULL: unchecked value from [(4)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/3)
#  280|           dir_list = malloc(sizeof(char *) * dir_count);
#  281|           while (rpmtdNext(dirnames) != -1) {
#  282|->             dir_list[x] = cr_safe_string_chunk_insert(pkg->chunk, rpmtdGetString(dirnames));
#  283|               x++;
#  284|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
createrepo_c-1.2.1/src/parsehdr.c:282:27: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:282:27: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:282:27: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  280|           dir_list = malloc(sizeof(char *) * dir_count);
#  281|           while (rpmtdNext(dirnames) != -1) {
#  282|->             dir_list[x] = cr_safe_string_chunk_insert(pkg->chunk, rpmtdGetString(dirnames));
#  283|               x++;
#  284|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
createrepo_c-1.2.1/src/parsehdr.c:288:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  286|       }
#  287|   
#  288|->     if (headerGet(hdr, RPMTAG_FILENAMES,   full_filenames,  flags) &&
#  289|           headerGet(hdr, RPMTAG_DIRINDEXES,  indexes,     flags) &&
#  290|           headerGet(hdr, RPMTAG_BASENAMES,   filenames,   flags) &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
createrepo_c-1.2.1/src/parsehdr.c:289:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:289:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#  287|   
#  288|       if (headerGet(hdr, RPMTAG_FILENAMES,   full_filenames,  flags) &&
#  289|->         headerGet(hdr, RPMTAG_DIRINDEXES,  indexes,     flags) &&
#  290|           headerGet(hdr, RPMTAG_BASENAMES,   filenames,   flags) &&
#  291|           headerGet(hdr, RPMTAG_FILEFLAGS,   fileflags,   flags) &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
createrepo_c-1.2.1/src/parsehdr.c:290:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:290:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#  288|       if (headerGet(hdr, RPMTAG_FILENAMES,   full_filenames,  flags) &&
#  289|           headerGet(hdr, RPMTAG_DIRINDEXES,  indexes,     flags) &&
#  290|->         headerGet(hdr, RPMTAG_BASENAMES,   filenames,   flags) &&
#  291|           headerGet(hdr, RPMTAG_FILEFLAGS,   fileflags,   flags) &&
#  292|           headerGet(hdr, RPMTAG_FILEMODES,   filemodes,   flags) &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
createrepo_c-1.2.1/src/parsehdr.c:291:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:291:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
#  289|           headerGet(hdr, RPMTAG_DIRINDEXES,  indexes,     flags) &&
#  290|           headerGet(hdr, RPMTAG_BASENAMES,   filenames,   flags) &&
#  291|->         headerGet(hdr, RPMTAG_FILEFLAGS,   fileflags,   flags) &&
#  292|           headerGet(hdr, RPMTAG_FILEMODES,   filemodes,   flags) &&
#  293|           headerGet(hdr, RPMTAG_FILEDIGESTS, filedigests, flags))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
createrepo_c-1.2.1/src/parsehdr.c:292:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:292:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  290|           headerGet(hdr, RPMTAG_BASENAMES,   filenames,   flags) &&
#  291|           headerGet(hdr, RPMTAG_FILEFLAGS,   fileflags,   flags) &&
#  292|->         headerGet(hdr, RPMTAG_FILEMODES,   filemodes,   flags) &&
#  293|           headerGet(hdr, RPMTAG_FILEDIGESTS, filedigests, flags))
#  294|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
createrepo_c-1.2.1/src/parsehdr.c:293:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:293:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
#  291|           headerGet(hdr, RPMTAG_FILEFLAGS,   fileflags,   flags) &&
#  292|           headerGet(hdr, RPMTAG_FILEMODES,   filemodes,   flags) &&
#  293|->         headerGet(hdr, RPMTAG_FILEDIGESTS, filedigests, flags))
#  294|       {
#  295|           rpmtdInit(full_filenames);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
createrepo_c-1.2.1/src/parsehdr.c:295:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:295:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
#  293|           headerGet(hdr, RPMTAG_FILEDIGESTS, filedigests, flags))
#  294|       {
#  295|->         rpmtdInit(full_filenames);
#  296|           rpmtdInit(indexes);
#  297|           rpmtdInit(filenames);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
createrepo_c-1.2.1/src/parsehdr.c:296:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:296:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/2)
#  294|       {
#  295|           rpmtdInit(full_filenames);
#  296|->         rpmtdInit(indexes);
#  297|           rpmtdInit(filenames);
#  298|           rpmtdInit(fileflags);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
createrepo_c-1.2.1/src/parsehdr.c:297:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:297:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/2)
#  295|           rpmtdInit(full_filenames);
#  296|           rpmtdInit(indexes);
#  297|->         rpmtdInit(filenames);
#  298|           rpmtdInit(fileflags);
#  299|           rpmtdInit(filemodes);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
createrepo_c-1.2.1/src/parsehdr.c:298:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:298:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/2)
#  296|           rpmtdInit(indexes);
#  297|           rpmtdInit(filenames);
#  298|->         rpmtdInit(fileflags);
#  299|           rpmtdInit(filemodes);
#  300|           rpmtdInit(filedigests);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
createrepo_c-1.2.1/src/parsehdr.c:299:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:299:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/2)
#  297|           rpmtdInit(filenames);
#  298|           rpmtdInit(fileflags);
#  299|->         rpmtdInit(filemodes);
#  300|           rpmtdInit(filedigests);
#  301|           while ((rpmtdNext(full_filenames) != -1)   &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
createrepo_c-1.2.1/src/parsehdr.c:300:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:300:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/2)
#  298|           rpmtdInit(fileflags);
#  299|           rpmtdInit(filemodes);
#  300|->         rpmtdInit(filedigests);
#  301|           while ((rpmtdNext(full_filenames) != -1)   &&
#  302|                  (rpmtdNext(indexes) != -1)   &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
createrepo_c-1.2.1/src/parsehdr.c:301:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:17: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/2)
#  299|           rpmtdInit(filemodes);
#  300|           rpmtdInit(filedigests);
#  301|->         while ((rpmtdNext(full_filenames) != -1)   &&
#  302|                  (rpmtdNext(indexes) != -1)   &&
#  303|                  (rpmtdNext(filenames) != -1) &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
createrepo_c-1.2.1/src/parsehdr.c:302:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:302:17: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/2)
#  300|           rpmtdInit(filedigests);
#  301|           while ((rpmtdNext(full_filenames) != -1)   &&
#  302|->                (rpmtdNext(indexes) != -1)   &&
#  303|                  (rpmtdNext(filenames) != -1) &&
#  304|                  (rpmtdNext(fileflags) != -1) &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
createrepo_c-1.2.1/src/parsehdr.c:303:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:303:17: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/2)
#  301|           while ((rpmtdNext(full_filenames) != -1)   &&
#  302|                  (rpmtdNext(indexes) != -1)   &&
#  303|->                (rpmtdNext(filenames) != -1) &&
#  304|                  (rpmtdNext(fileflags) != -1) &&
#  305|                  (rpmtdNext(filemodes) != -1) &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
createrepo_c-1.2.1/src/parsehdr.c:304:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:304:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:304:17: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/2)
#  302|                  (rpmtdNext(indexes) != -1)   &&
#  303|                  (rpmtdNext(filenames) != -1) &&
#  304|->                (rpmtdNext(fileflags) != -1) &&
#  305|                  (rpmtdNext(filemodes) != -1) &&
#  306|                  (rpmtdNext(filedigests) != -1))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
createrepo_c-1.2.1/src/parsehdr.c:305:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:304:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:305:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:305:17: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/2)
#  303|                  (rpmtdNext(filenames) != -1) &&
#  304|                  (rpmtdNext(fileflags) != -1) &&
#  305|->                (rpmtdNext(filemodes) != -1) &&
#  306|                  (rpmtdNext(filedigests) != -1))
#  307|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
createrepo_c-1.2.1/src/parsehdr.c:306:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:304:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:305:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:306:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:306:17: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/2)
#  304|                  (rpmtdNext(fileflags) != -1) &&
#  305|                  (rpmtdNext(filemodes) != -1) &&
#  306|->                (rpmtdNext(filedigests) != -1))
#  307|           {
#  308|               cr_PackageFile *packagefile = cr_package_file_new();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
createrepo_c-1.2.1/src/parsehdr.c:308:43: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:304:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:305:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:306:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:308:43: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:308:43: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/2)
#  306|                  (rpmtdNext(filedigests) != -1))
#  307|           {
#  308|->             cr_PackageFile *packagefile = cr_package_file_new();
#  309|               packagefile->name = cr_safe_string_chunk_insert(pkg->chunk,
#  310|                                                            rpmtdGetString(filenames));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
createrepo_c-1.2.1/src/parsehdr.c:309:33: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:304:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:305:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:306:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:308:43: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:309:33: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/2)
#  307|           {
#  308|               cr_PackageFile *packagefile = cr_package_file_new();
#  309|->             packagefile->name = cr_safe_string_chunk_insert(pkg->chunk,
#  310|                                                            rpmtdGetString(filenames));
#  311|               packagefile->path = (dir_list) ? dir_list[(int) rpmtdGetNumber(indexes)] : "";

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
createrepo_c-1.2.1/src/parsehdr.c:311:61: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:304:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:305:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:306:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:308:43: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:311:33: branch_true: following ‘true’ branch (when ‘dir_list’ is non-NULL)...
createrepo_c-1.2.1/src/parsehdr.c:311:61: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:311:61: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/2)
#  309|               packagefile->name = cr_safe_string_chunk_insert(pkg->chunk,
#  310|                                                            rpmtdGetString(filenames));
#  311|->             packagefile->path = (dir_list) ? dir_list[(int) rpmtdGetNumber(indexes)] : "";
#  312|   
#  313|               if (S_ISDIR(rpmtdGetNumber(filemodes))) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
createrepo_c-1.2.1/src/parsehdr.c:313:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:304:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:305:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:306:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:308:43: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:311:33: branch_true: following ‘true’ branch (when ‘dir_list’ is non-NULL)...
createrepo_c-1.2.1/src/parsehdr.c:311:61: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:313:17: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/2)
#  311|               packagefile->path = (dir_list) ? dir_list[(int) rpmtdGetNumber(indexes)] : "";
#  312|   
#  313|->             if (S_ISDIR(rpmtdGetNumber(filemodes))) {
#  314|                   // Directory
#  315|                   packagefile->type = cr_safe_string_chunk_insert(pkg->chunk, "dir");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
createrepo_c-1.2.1/src/parsehdr.c:316:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:304:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:305:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:306:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:308:43: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:311:33: branch_true: following ‘true’ branch (when ‘dir_list’ is non-NULL)...
createrepo_c-1.2.1/src/parsehdr.c:311:61: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:313:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:316:24: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:316:24: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/2)
#  314|                   // Directory
#  315|                   packagefile->type = cr_safe_string_chunk_insert(pkg->chunk, "dir");
#  316|->             } else if (rpmtdGetNumber(fileflags) & RPMFILE_GHOST) {
#  317|                   // Ghost
#  318|                   packagefile->type = cr_safe_string_chunk_insert(pkg->chunk, "ghost");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
createrepo_c-1.2.1/src/parsehdr.c:324:35: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:304:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:305:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:306:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:308:43: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:311:33: branch_true: following ‘true’ branch (when ‘dir_list’ is non-NULL)...
createrepo_c-1.2.1/src/parsehdr.c:311:61: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:324:35: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/2)
#  322|               }
#  323|   
#  324|->             packagefile->digest = cr_safe_string_chunk_insert(pkg->chunk,
#  325|                                                                 rpmtdGetString(filedigests));
#  326|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
createrepo_c-1.2.1/src/parsehdr.c:327:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:304:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:305:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:306:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:308:43: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:311:33: branch_true: following ‘true’ branch (when ‘dir_list’ is non-NULL)...
createrepo_c-1.2.1/src/parsehdr.c:311:61: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:327:13: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/2)
#  325|                                                                 rpmtdGetString(filedigests));
#  326|   
#  327|->             g_hash_table_replace(filenames_hashtable,
#  328|                                    (gpointer) rpmtdGetString(full_filenames),
#  329|                                    (gpointer) rpmtdGetString(full_filenames));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
createrepo_c-1.2.1/src/parsehdr.c:328:45: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:304:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:305:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:306:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:308:43: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:311:33: branch_true: following ‘true’ branch (when ‘dir_list’ is non-NULL)...
createrepo_c-1.2.1/src/parsehdr.c:311:61: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:328:45: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/2)
#  326|   
#  327|               g_hash_table_replace(filenames_hashtable,
#  328|->                                  (gpointer) rpmtdGetString(full_filenames),
#  329|                                    (gpointer) rpmtdGetString(full_filenames));
#  330|               pkg->files = g_slist_prepend(pkg->files, packagefile);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
createrepo_c-1.2.1/src/parsehdr.c:329:45: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:304:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:305:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:306:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:308:43: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:311:33: branch_true: following ‘true’ branch (when ‘dir_list’ is non-NULL)...
createrepo_c-1.2.1/src/parsehdr.c:311:61: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:329:45: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/2)
#  327|               g_hash_table_replace(filenames_hashtable,
#  328|                                    (gpointer) rpmtdGetString(full_filenames),
#  329|->                                  (gpointer) rpmtdGetString(full_filenames));
#  330|               pkg->files = g_slist_prepend(pkg->files, packagefile);
#  331|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
createrepo_c-1.2.1/src/parsehdr.c:330:26: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:302:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:303:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:304:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:305:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:306:17: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:301:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:308:43: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:311:33: branch_true: following ‘true’ branch (when ‘dir_list’ is non-NULL)...
createrepo_c-1.2.1/src/parsehdr.c:311:61: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:330:26: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/2)
#  328|                                    (gpointer) rpmtdGetString(full_filenames),
#  329|                                    (gpointer) rpmtdGetString(full_filenames));
#  330|->             pkg->files = g_slist_prepend(pkg->files, packagefile);
#  331|           }
#  332|           pkg->files = g_slist_reverse (pkg->files);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
createrepo_c-1.2.1/src/parsehdr.c:332:22: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:332:22: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/2)
#  330|               pkg->files = g_slist_prepend(pkg->files, packagefile);
#  331|           }
#  332|->         pkg->files = g_slist_reverse (pkg->files);
#  333|   
#  334|           rpmtdFreeData(dirnames);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
createrepo_c-1.2.1/src/parsehdr.c:334:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:334:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/63/codeFlows/0/threadFlows/0/locations/2)
#  332|           pkg->files = g_slist_reverse (pkg->files);
#  333|   
#  334|->         rpmtdFreeData(dirnames);
#  335|           rpmtdFreeData(indexes);
#  336|           rpmtdFreeData(filenames);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
createrepo_c-1.2.1/src/parsehdr.c:335:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:335:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/65/codeFlows/0/threadFlows/0/locations/2)
#  333|   
#  334|           rpmtdFreeData(dirnames);
#  335|->         rpmtdFreeData(indexes);
#  336|           rpmtdFreeData(filenames);
#  337|           rpmtdFreeData(fileflags);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
createrepo_c-1.2.1/src/parsehdr.c:336:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:336:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/2)
#  334|           rpmtdFreeData(dirnames);
#  335|           rpmtdFreeData(indexes);
#  336|->         rpmtdFreeData(filenames);
#  337|           rpmtdFreeData(fileflags);
#  338|           rpmtdFreeData(filemodes);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
createrepo_c-1.2.1/src/parsehdr.c:337:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:337:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/2)
#  335|           rpmtdFreeData(indexes);
#  336|           rpmtdFreeData(filenames);
#  337|->         rpmtdFreeData(fileflags);
#  338|           rpmtdFreeData(filemodes);
#  339|           rpmtdFreeData(filedigests);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
createrepo_c-1.2.1/src/parsehdr.c:338:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:338:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/2)
#  336|           rpmtdFreeData(filenames);
#  337|           rpmtdFreeData(fileflags);
#  338|->         rpmtdFreeData(filemodes);
#  339|           rpmtdFreeData(filedigests);
#  340|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
createrepo_c-1.2.1/src/parsehdr.c:339:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:289:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:290:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:291:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:292:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:293:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:295:9: branch_true: ...to here
createrepo_c-1.2.1/src/parsehdr.c:339:9: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/73/codeFlows/0/threadFlows/0/locations/2)
#  337|           rpmtdFreeData(fileflags);
#  338|           rpmtdFreeData(filemodes);
#  339|->         rpmtdFreeData(filedigests);
#  340|       }
#  341|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
createrepo_c-1.2.1/src/parsehdr.c:342:5: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:342:5: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/75/codeFlows/0/threadFlows/0/locations/2)
#  340|       }
#  341|   
#  342|->     rpmtdFree(dirnames);
#  343|       rpmtdFree(indexes);
#  344|       rpmtdFree(filemodes);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
createrepo_c-1.2.1/src/parsehdr.c:343:5: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:343:5: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/77/codeFlows/0/threadFlows/0/locations/2)
#  341|   
#  342|       rpmtdFree(dirnames);
#  343|->     rpmtdFree(indexes);
#  344|       rpmtdFree(filemodes);
#  345|       rpmtdFree(filedigests);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
createrepo_c-1.2.1/src/parsehdr.c:344:5: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:344:5: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/79/codeFlows/0/threadFlows/0/locations/2)
#  342|       rpmtdFree(dirnames);
#  343|       rpmtdFree(indexes);
#  344|->     rpmtdFree(filemodes);
#  345|       rpmtdFree(filedigests);
#  346|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
createrepo_c-1.2.1/src/parsehdr.c:345:5: warning[-Wanalyzer-malloc-leak]: leak of ‘dir_list’
createrepo_c-1.2.1/src/parsehdr.c:278:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/parsehdr.c:280:20: acquire_memory: allocated here
createrepo_c-1.2.1/src/parsehdr.c:281:16: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/parsehdr.c:288:9: branch_false: ...to here
createrepo_c-1.2.1/src/parsehdr.c:345:5: danger: ‘dir_list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/81/codeFlows/0/threadFlows/0/locations/2)
#  343|       rpmtdFree(indexes);
#  344|       rpmtdFree(filemodes);
#  345|->     rpmtdFree(filedigests);
#  346|   
#  347|       if (dir_list) {

Error: CPPCHECK_WARNING (CWE-476): [#def112]
createrepo_c-1.2.1/src/parsehdr.c:512: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: value
#  510|                           // Add file into ap_hashtable
#  511|                           struct ap_value_struct *value = malloc(sizeof(struct ap_value_struct));
#  512|->                         value->flags = flags;
#  513|                           value->version = full_version;
#  514|                           value->pre = dependency->pre;

Error: CPPCHECK_WARNING (CWE-476): [#def113]
createrepo_c-1.2.1/src/parsehdr.c:513: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: value
#  511|                           struct ap_value_struct *value = malloc(sizeof(struct ap_value_struct));
#  512|                           value->flags = flags;
#  513|->                         value->version = full_version;
#  514|                           value->pre = dependency->pre;
#  515|                           g_hash_table_replace(ap_hashtable, dependency->name, value);

Error: CPPCHECK_WARNING (CWE-476): [#def114]
createrepo_c-1.2.1/src/parsehdr.c:514: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: value
#  512|                           value->flags = flags;
#  513|                           value->version = full_version;
#  514|->                         value->pre = dependency->pre;
#  515|                           g_hash_table_replace(ap_hashtable, dependency->name, value);
#  516|                           break; //case REQUIRES end

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

Error: CPPCHECK_WARNING (CWE-476): [#def116]
createrepo_c-1.2.1/src/python/updaterecord-py.c:389: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: date
#  387|           char *date = malloc(13 * sizeof(char));
#  388|   
#  389|->         int ret = snprintf(date, 13, "%llu", epoch);
#  390|           if (ret < 0 || ret > 12){
#  391|               PyErr_SetString(PyExc_TypeError, "Invalid epoch value!");

Error: CPPCHECK_WARNING (CWE-476): [#def117]
createrepo_c-1.2.1/src/python/updaterecord-py.c:408: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: date
#  406|       /* Length is 20: yyyy-mm-dd HH:MM:SS */
#  407|       char *date = malloc(20 * sizeof(char));
#  408|->     snprintf(date, 20, "%04d-%02d-%02d %02d:%02d:%02d",
#  409|                PyDateTime_GET_YEAR(value) % 9999, PyDateTime_GET_MONTH(value) % 13,
#  410|                PyDateTime_GET_DAY(value) % 32, PyDateTime_DATE_GET_HOUR(value) % 24,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
createrepo_c-1.2.1/src/sqlite.c:84:9: warning[-Wanalyzer-malloc-leak]: leak of ‘content’
createrepo_c-1.2.1/src/sqlite.c:75:8: branch_false: following ‘false’ branch (when ‘orig_content’ is non-NULL)...
createrepo_c-1.2.1/src/sqlite.c:77:16: branch_false: ...to here
createrepo_c-1.2.1/src/sqlite.c:83:19: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:84:9: danger: ‘content’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   82|           size_t llen = strlen((const char *) orig_content);
#   83|           content = malloc(sizeof(unsigned char)*llen*2 + 1);
#   84|->         cr_latin1_to_utf8((const unsigned char *) orig_content, content);
#   85|           free_content = 1;
#   86|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
createrepo_c-1.2.1/src/sqlite.c:614:10: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1111:1: enter_function: entry to ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1116:34: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1130:23: call_function: calling ‘db_package_prepare’ from ‘cr_db_prepare_primary_statements’
#  612|           "  ?, ?, ?, ?, ?, ?, ?)";
#  613|   
#  614|->     rc = sqlite3_prepare_v2 (db, query, -1, &handle, NULL);
#  615|       if (rc != SQLITE_OK) {
#  616|           g_set_error(err, ERR_DOMAIN, CRE_DB,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
createrepo_c-1.2.1/src/sqlite.c:616:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1111:1: enter_function: entry to ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1116:34: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1130:23: call_function: calling ‘db_package_prepare’ from ‘cr_db_prepare_primary_statements’
#  614|       rc = sqlite3_prepare_v2 (db, query, -1, &handle, NULL);
#  615|       if (rc != SQLITE_OK) {
#  616|->         g_set_error(err, ERR_DOMAIN, CRE_DB,
#  617|                        "Cannot prepare packages insertion: %s",
#  618|                        sqlite3_errmsg (db));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
createrepo_c-1.2.1/src/sqlite.c:619:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1111:1: enter_function: entry to ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1116:34: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1130:23: call_function: calling ‘db_package_prepare’ from ‘cr_db_prepare_primary_statements’
#  617|                        "Cannot prepare packages insertion: %s",
#  618|                        sqlite3_errmsg (db));
#  619|->         sqlite3_finalize (handle);
#  620|           handle = NULL;
#  621|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
createrepo_c-1.2.1/src/sqlite.c:713:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1111:1: enter_function: entry to ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1116:34: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1130:23: call_function: calling ‘db_package_prepare’ from ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1130:23: return_function: returning to ‘cr_db_prepare_primary_statements’ from ‘db_package_prepare’
createrepo_c-1.2.1/src/sqlite.c:1131:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/sqlite.c:1136:28: branch_false: ...to here
createrepo_c-1.2.1/src/sqlite.c:1136:28: call_function: calling ‘db_dependency_prepare’ from ‘cr_db_prepare_primary_statements’
#  711|       }
#  712|   
#  713|->     query = g_strdup_printf
#  714|           ("INSERT INTO %s (name, flags, epoch, version, release, pkgKey%s) "
#  715|            "VALUES (?, ?, ?, ?, ?, ?%s)", table, pre_name, pre_value);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
createrepo_c-1.2.1/src/sqlite.c:717:10: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1111:1: enter_function: entry to ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1116:34: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1130:23: call_function: calling ‘db_package_prepare’ from ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1130:23: return_function: returning to ‘cr_db_prepare_primary_statements’ from ‘db_package_prepare’
createrepo_c-1.2.1/src/sqlite.c:1131:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/sqlite.c:1136:28: branch_false: ...to here
createrepo_c-1.2.1/src/sqlite.c:1136:28: call_function: calling ‘db_dependency_prepare’ from ‘cr_db_prepare_primary_statements’
#  715|            "VALUES (?, ?, ?, ?, ?, ?%s)", table, pre_name, pre_value);
#  716|   
#  717|->     rc = sqlite3_prepare_v2 (db, query, -1, &handle, NULL);
#  718|       g_free (query);
#  719|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
createrepo_c-1.2.1/src/sqlite.c:718:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1111:1: enter_function: entry to ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1116:34: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1130:23: call_function: calling ‘db_package_prepare’ from ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1130:23: return_function: returning to ‘cr_db_prepare_primary_statements’ from ‘db_package_prepare’
createrepo_c-1.2.1/src/sqlite.c:1131:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/sqlite.c:1136:28: branch_false: ...to here
createrepo_c-1.2.1/src/sqlite.c:1136:28: call_function: calling ‘db_dependency_prepare’ from ‘cr_db_prepare_primary_statements’
#  716|   
#  717|       rc = sqlite3_prepare_v2 (db, query, -1, &handle, NULL);
#  718|->     g_free (query);
#  719|   
#  720|       if (rc != SQLITE_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
createrepo_c-1.2.1/src/sqlite.c:721:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1111:1: enter_function: entry to ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1116:34: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1130:23: call_function: calling ‘db_package_prepare’ from ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1130:23: return_function: returning to ‘cr_db_prepare_primary_statements’ from ‘db_package_prepare’
createrepo_c-1.2.1/src/sqlite.c:1131:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/sqlite.c:1136:28: branch_false: ...to here
createrepo_c-1.2.1/src/sqlite.c:1136:28: call_function: calling ‘db_dependency_prepare’ from ‘cr_db_prepare_primary_statements’
#  719|   
#  720|       if (rc != SQLITE_OK) {
#  721|->         g_set_error(err, ERR_DOMAIN, CRE_DB,
#  722|                        "Cannot prepare dependency insertion: %s",
#  723|                        sqlite3_errmsg (db));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
createrepo_c-1.2.1/src/sqlite.c:724:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1111:1: enter_function: entry to ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1116:34: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1130:23: call_function: calling ‘db_package_prepare’ from ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1130:23: return_function: returning to ‘cr_db_prepare_primary_statements’ from ‘db_package_prepare’
createrepo_c-1.2.1/src/sqlite.c:1131:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/sqlite.c:1136:28: branch_false: ...to here
createrepo_c-1.2.1/src/sqlite.c:1136:28: call_function: calling ‘db_dependency_prepare’ from ‘cr_db_prepare_primary_statements’
#  722|                        "Cannot prepare dependency insertion: %s",
#  723|                        sqlite3_errmsg (db));
#  724|->         sqlite3_finalize (handle);
#  725|           handle = NULL;
#  726|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
createrepo_c-1.2.1/src/sqlite.c:854:10: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1347:1: enter_function: entry to ‘cr_db_prepare_filelists_statements’
createrepo_c-1.2.1/src/sqlite.c:1350:36: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1358:30: call_function: calling ‘db_package_ids_prepare’ from ‘cr_db_prepare_filelists_statements’
createrepo_c-1.2.1/src/sqlite.c:1358:30: return_function: returning to ‘cr_db_prepare_filelists_statements’ from ‘db_package_ids_prepare’
createrepo_c-1.2.1/src/sqlite.c:1359:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/sqlite.c:1364:29: branch_false: ...to here
createrepo_c-1.2.1/src/sqlite.c:1364:29: call_function: calling ‘db_filelists_prepare’ from ‘cr_db_prepare_filelists_statements’
#  852|           " VALUES (?, ?, ?, ?)";
#  853|   
#  854|->     rc = sqlite3_prepare_v2 (db, query, -1, &handle, NULL);
#  855|       if (rc != SQLITE_OK) {
#  856|           g_set_error(err, ERR_DOMAIN, CRE_DB,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
createrepo_c-1.2.1/src/sqlite.c:856:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1347:1: enter_function: entry to ‘cr_db_prepare_filelists_statements’
createrepo_c-1.2.1/src/sqlite.c:1350:36: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1358:30: call_function: calling ‘db_package_ids_prepare’ from ‘cr_db_prepare_filelists_statements’
createrepo_c-1.2.1/src/sqlite.c:1358:30: return_function: returning to ‘cr_db_prepare_filelists_statements’ from ‘db_package_ids_prepare’
createrepo_c-1.2.1/src/sqlite.c:1359:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/sqlite.c:1364:29: branch_false: ...to here
createrepo_c-1.2.1/src/sqlite.c:1364:29: call_function: calling ‘db_filelists_prepare’ from ‘cr_db_prepare_filelists_statements’
#  854|       rc = sqlite3_prepare_v2 (db, query, -1, &handle, NULL);
#  855|       if (rc != SQLITE_OK) {
#  856|->         g_set_error(err, ERR_DOMAIN, CRE_DB,
#  857|                        "Can not prepare filelist insertion: %s",
#  858|                        sqlite3_errmsg (db));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
createrepo_c-1.2.1/src/sqlite.c:859:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1347:1: enter_function: entry to ‘cr_db_prepare_filelists_statements’
createrepo_c-1.2.1/src/sqlite.c:1350:36: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1358:30: call_function: calling ‘db_package_ids_prepare’ from ‘cr_db_prepare_filelists_statements’
createrepo_c-1.2.1/src/sqlite.c:1358:30: return_function: returning to ‘cr_db_prepare_filelists_statements’ from ‘db_package_ids_prepare’
createrepo_c-1.2.1/src/sqlite.c:1359:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/sqlite.c:1364:29: branch_false: ...to here
createrepo_c-1.2.1/src/sqlite.c:1364:29: call_function: calling ‘db_filelists_prepare’ from ‘cr_db_prepare_filelists_statements’
#  857|                        "Can not prepare filelist insertion: %s",
#  858|                        sqlite3_errmsg (db));
#  859|->         sqlite3_finalize (handle);
#  860|           handle = NULL;
#  861|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
createrepo_c-1.2.1/src/sqlite.c:1010:10: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1434:1: enter_function: entry to ‘cr_db_prepare_other_statements’
createrepo_c-1.2.1/src/sqlite.c:1437:32: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1445:30: call_function: calling ‘db_package_ids_prepare’ from ‘cr_db_prepare_other_statements’
createrepo_c-1.2.1/src/sqlite.c:1445:30: return_function: returning to ‘cr_db_prepare_other_statements’ from ‘db_package_ids_prepare’
createrepo_c-1.2.1/src/sqlite.c:1446:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/sqlite.c:1451:29: branch_false: ...to here
createrepo_c-1.2.1/src/sqlite.c:1451:29: call_function: calling ‘db_changelog_prepare’ from ‘cr_db_prepare_other_statements’
# 1008|           " VALUES (?, ?, ?, ?)";
# 1009|   
# 1010|->     rc = sqlite3_prepare_v2 (db, query, -1, &handle, NULL);
# 1011|       if (rc != SQLITE_OK) {
# 1012|           g_set_error(err, ERR_DOMAIN, CRE_DB,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
createrepo_c-1.2.1/src/sqlite.c:1012:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1434:1: enter_function: entry to ‘cr_db_prepare_other_statements’
createrepo_c-1.2.1/src/sqlite.c:1437:32: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1445:30: call_function: calling ‘db_package_ids_prepare’ from ‘cr_db_prepare_other_statements’
createrepo_c-1.2.1/src/sqlite.c:1445:30: return_function: returning to ‘cr_db_prepare_other_statements’ from ‘db_package_ids_prepare’
createrepo_c-1.2.1/src/sqlite.c:1446:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/sqlite.c:1451:29: branch_false: ...to here
createrepo_c-1.2.1/src/sqlite.c:1451:29: call_function: calling ‘db_changelog_prepare’ from ‘cr_db_prepare_other_statements’
# 1010|       rc = sqlite3_prepare_v2 (db, query, -1, &handle, NULL);
# 1011|       if (rc != SQLITE_OK) {
# 1012|->         g_set_error(err, ERR_DOMAIN, CRE_DB,
# 1013|                        "Can not prepare changelog insertion: %s",
# 1014|                        sqlite3_errmsg (db));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
createrepo_c-1.2.1/src/sqlite.c:1015:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1434:1: enter_function: entry to ‘cr_db_prepare_other_statements’
createrepo_c-1.2.1/src/sqlite.c:1437:32: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1445:30: call_function: calling ‘db_package_ids_prepare’ from ‘cr_db_prepare_other_statements’
createrepo_c-1.2.1/src/sqlite.c:1445:30: return_function: returning to ‘cr_db_prepare_other_statements’ from ‘db_package_ids_prepare’
createrepo_c-1.2.1/src/sqlite.c:1446:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/sqlite.c:1451:29: branch_false: ...to here
createrepo_c-1.2.1/src/sqlite.c:1451:29: call_function: calling ‘db_changelog_prepare’ from ‘cr_db_prepare_other_statements’
# 1013|                        "Can not prepare changelog insertion: %s",
# 1014|                        sqlite3_errmsg (db));
# 1015|->         sqlite3_finalize (handle);
# 1016|           handle = NULL;
# 1017|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
createrepo_c-1.2.1/src/sqlite.c:1036:10: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1347:1: enter_function: entry to ‘cr_db_prepare_filelists_statements’
createrepo_c-1.2.1/src/sqlite.c:1350:36: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1358:30: call_function: calling ‘db_package_ids_prepare’ from ‘cr_db_prepare_filelists_statements’
# 1034|   
# 1035|       query = "INSERT INTO packages (pkgId) VALUES (?)";
# 1036|->     rc = sqlite3_prepare_v2 (db, query, -1, &handle, NULL);
# 1037|       if (rc != SQLITE_OK) {
# 1038|           g_set_error(err, ERR_DOMAIN, CRE_DB,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
createrepo_c-1.2.1/src/sqlite.c:1038:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1347:1: enter_function: entry to ‘cr_db_prepare_filelists_statements’
createrepo_c-1.2.1/src/sqlite.c:1350:36: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1358:30: call_function: calling ‘db_package_ids_prepare’ from ‘cr_db_prepare_filelists_statements’
# 1036|       rc = sqlite3_prepare_v2 (db, query, -1, &handle, NULL);
# 1037|       if (rc != SQLITE_OK) {
# 1038|->         g_set_error(err, ERR_DOMAIN, CRE_DB,
# 1039|                        "Can not prepare package ids insertion: %s",
# 1040|                         sqlite3_errmsg (db));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
createrepo_c-1.2.1/src/sqlite.c:1041:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1347:1: enter_function: entry to ‘cr_db_prepare_filelists_statements’
createrepo_c-1.2.1/src/sqlite.c:1350:36: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1358:30: call_function: calling ‘db_package_ids_prepare’ from ‘cr_db_prepare_filelists_statements’
# 1039|                        "Can not prepare package ids insertion: %s",
# 1040|                         sqlite3_errmsg (db));
# 1041|->         sqlite3_finalize (handle);
# 1042|           handle = NULL;
# 1043|       }

Error: CPPCHECK_WARNING (CWE-476): [#def136]
createrepo_c-1.2.1/src/sqlite.c:1118: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
# 1116|       cr_DbPrimaryStatements ret = malloc(sizeof(*ret));
# 1117|   
# 1118|->     ret->db                 = db;
# 1119|       ret->pkg_handle         = NULL;
# 1120|       ret->provides_handle    = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def137]
createrepo_c-1.2.1/src/sqlite.c:1118:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1116:34: acquire_memory: this call could return NULL
createrepo_c-1.2.1/src/sqlite.c:1118:5: danger: ‘ret’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
# 1116|       cr_DbPrimaryStatements ret = malloc(sizeof(*ret));
# 1117|   
# 1118|->     ret->db                 = db;
# 1119|       ret->pkg_handle         = NULL;
# 1120|       ret->provides_handle    = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def138]
createrepo_c-1.2.1/src/sqlite.c:1119: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
# 1117|   
# 1118|       ret->db                 = db;
# 1119|->     ret->pkg_handle         = NULL;
# 1120|       ret->provides_handle    = NULL;
# 1121|       ret->conflicts_handle   = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def139]
createrepo_c-1.2.1/src/sqlite.c:1120: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
# 1118|       ret->db                 = db;
# 1119|       ret->pkg_handle         = NULL;
# 1120|->     ret->provides_handle    = NULL;
# 1121|       ret->conflicts_handle   = NULL;
# 1122|       ret->obsoletes_handle   = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def140]
createrepo_c-1.2.1/src/sqlite.c:1121: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
# 1119|       ret->pkg_handle         = NULL;
# 1120|       ret->provides_handle    = NULL;
# 1121|->     ret->conflicts_handle   = NULL;
# 1122|       ret->obsoletes_handle   = NULL;
# 1123|       ret->requires_handle    = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def141]
createrepo_c-1.2.1/src/sqlite.c:1122: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
# 1120|       ret->provides_handle    = NULL;
# 1121|       ret->conflicts_handle   = NULL;
# 1122|->     ret->obsoletes_handle   = NULL;
# 1123|       ret->requires_handle    = NULL;
# 1124|       ret->suggests_handle    = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def142]
createrepo_c-1.2.1/src/sqlite.c:1123: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
# 1121|       ret->conflicts_handle   = NULL;
# 1122|       ret->obsoletes_handle   = NULL;
# 1123|->     ret->requires_handle    = NULL;
# 1124|       ret->suggests_handle    = NULL;
# 1125|       ret->enhances_handle    = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def143]
createrepo_c-1.2.1/src/sqlite.c:1124: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
# 1122|       ret->obsoletes_handle   = NULL;
# 1123|       ret->requires_handle    = NULL;
# 1124|->     ret->suggests_handle    = NULL;
# 1125|       ret->enhances_handle    = NULL;
# 1126|       ret->recommends_handle  = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def144]
createrepo_c-1.2.1/src/sqlite.c:1125: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
# 1123|       ret->requires_handle    = NULL;
# 1124|       ret->suggests_handle    = NULL;
# 1125|->     ret->enhances_handle    = NULL;
# 1126|       ret->recommends_handle  = NULL;
# 1127|       ret->supplements_handle = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def145]
createrepo_c-1.2.1/src/sqlite.c:1126: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
# 1124|       ret->suggests_handle    = NULL;
# 1125|       ret->enhances_handle    = NULL;
# 1126|->     ret->recommends_handle  = NULL;
# 1127|       ret->supplements_handle = NULL;
# 1128|       ret->files_handle       = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def146]
createrepo_c-1.2.1/src/sqlite.c:1127: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
# 1125|       ret->enhances_handle    = NULL;
# 1126|       ret->recommends_handle  = NULL;
# 1127|->     ret->supplements_handle = NULL;
# 1128|       ret->files_handle       = NULL;
# 1129|   

Error: CPPCHECK_WARNING (CWE-476): [#def147]
createrepo_c-1.2.1/src/sqlite.c:1128: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
# 1126|       ret->recommends_handle  = NULL;
# 1127|       ret->supplements_handle = NULL;
# 1128|->     ret->files_handle       = NULL;
# 1129|   
# 1130|       ret->pkg_handle = db_package_prepare(db, &tmp_err);

Error: CPPCHECK_WARNING (CWE-476): [#def148]
createrepo_c-1.2.1/src/sqlite.c:1130: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
# 1128|       ret->files_handle       = NULL;
# 1129|   
# 1130|->     ret->pkg_handle = db_package_prepare(db, &tmp_err);
# 1131|       if (tmp_err) {
# 1132|           g_propagate_error(err, tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
createrepo_c-1.2.1/src/sqlite.c:1132:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1111:1: enter_function: entry to ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1116:34: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1130:23: call_function: calling ‘db_package_prepare’ from ‘cr_db_prepare_primary_statements’
createrepo_c-1.2.1/src/sqlite.c:1130:23: return_function: returning to ‘cr_db_prepare_primary_statements’ from ‘db_package_prepare’
createrepo_c-1.2.1/src/sqlite.c:1131:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/sqlite.c:1132:9: branch_true: ...to here
createrepo_c-1.2.1/src/sqlite.c:1132:9: danger: ‘ret’ leaks here; was allocated at [(2)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/1)
# 1130|       ret->pkg_handle = db_package_prepare(db, &tmp_err);
# 1131|       if (tmp_err) {
# 1132|->         g_propagate_error(err, tmp_err);
# 1133|           goto error;
# 1134|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def150]
createrepo_c-1.2.1/src/sqlite.c:1354:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1350:36: acquire_memory: this call could return NULL
createrepo_c-1.2.1/src/sqlite.c:1354:5: danger: ‘ret’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/0)
# 1352|       assert(!err || *err == NULL);
# 1353|   
# 1354|->     ret->db                = db;
# 1355|       ret->package_id_handle = NULL;
# 1356|       ret->filelists_handle  = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
createrepo_c-1.2.1/src/sqlite.c:1360:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1347:1: enter_function: entry to ‘cr_db_prepare_filelists_statements’
createrepo_c-1.2.1/src/sqlite.c:1350:36: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1358:30: call_function: calling ‘db_package_ids_prepare’ from ‘cr_db_prepare_filelists_statements’
createrepo_c-1.2.1/src/sqlite.c:1358:30: return_function: returning to ‘cr_db_prepare_filelists_statements’ from ‘db_package_ids_prepare’
createrepo_c-1.2.1/src/sqlite.c:1359:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/sqlite.c:1360:9: branch_true: ...to here
createrepo_c-1.2.1/src/sqlite.c:1360:9: danger: ‘ret’ leaks here; was allocated at [(2)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/1)
# 1358|       ret->package_id_handle = db_package_ids_prepare(db, &tmp_err);
# 1359|       if (tmp_err) {
# 1360|->         g_propagate_error(err, tmp_err);
# 1361|           goto error;
# 1362|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def152]
createrepo_c-1.2.1/src/sqlite.c:1441:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1437:32: acquire_memory: this call could return NULL
createrepo_c-1.2.1/src/sqlite.c:1441:5: danger: ‘ret’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/0)
# 1439|       assert(!err || *err == NULL);
# 1440|   
# 1441|->     ret->db                = db;
# 1442|       ret->package_id_handle = NULL;
# 1443|       ret->changelog_handle  = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
createrepo_c-1.2.1/src/sqlite.c:1447:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
createrepo_c-1.2.1/src/sqlite.c:1434:1: enter_function: entry to ‘cr_db_prepare_other_statements’
createrepo_c-1.2.1/src/sqlite.c:1437:32: acquire_memory: allocated here
createrepo_c-1.2.1/src/sqlite.c:1445:30: call_function: calling ‘db_package_ids_prepare’ from ‘cr_db_prepare_other_statements’
createrepo_c-1.2.1/src/sqlite.c:1445:30: return_function: returning to ‘cr_db_prepare_other_statements’ from ‘db_package_ids_prepare’
createrepo_c-1.2.1/src/sqlite.c:1446:8: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/sqlite.c:1447:9: branch_true: ...to here
createrepo_c-1.2.1/src/sqlite.c:1447:9: danger: ‘ret’ leaks here; was allocated at [(2)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/1)
# 1445|       ret->package_id_handle = db_package_ids_prepare(db, &tmp_err);
# 1446|       if (tmp_err) {
# 1447|->         g_propagate_error(err, tmp_err);
# 1448|           goto error;
# 1449|       }

Error: CPPCHECK_WARNING (CWE-404): [#def154]
createrepo_c-1.2.1/src/sqliterepo_c.c:602: error[resourceLeak]: Resource leak: f_repomd
#  600|       cr_repomd_free(repomd);
#  601|   
#  602|->     return TRUE;
#  603|   }
#  604|   

Error: CPPCHECK_WARNING (CWE-682): [#def155]
createrepo_c-1.2.1/src/xml_dump.c:104: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  102|                   continue;
#  103|               }
#  104|->             *out++=*in++;
#  105|           } else if (*in<192) {
#  106|               // Found latin1 (iso-8859-1) control code.

Error: CPPCHECK_WARNING (CWE-476): [#def156]
createrepo_c-1.2.1/src/xml_dump.c:104: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out++
#  102|                   continue;
#  103|               }
#  104|->             *out++=*in++;
#  105|           } else if (*in<192) {
#  106|               // Found latin1 (iso-8859-1) control code.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def157]
createrepo_c-1.2.1/src/xml_file.c:365:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cr_file’
createrepo_c-1.2.1/src/xml_file.c:382:1: enter_function: entry to ‘cr_rewrite_header_package_count’
createrepo_c-1.2.1/src/xml_file.c:392:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/xml_file.c:397:31: branch_false: ...to here
createrepo_c-1.2.1/src/xml_file.c:402:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/xml_file.c:411:8: branch_false: ...to here
createrepo_c-1.2.1/src/xml_file.c:411:8: branch_false: following ‘false’ branch (when ‘xml_compression != 6’)...
createrepo_c-1.2.1/src/xml_file.c:460:24: branch_false: ...to here
createrepo_c-1.2.1/src/xml_file.c:461:12: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/xml_file.c:462:13: branch_true: ...to here
createrepo_c-1.2.1/src/xml_file.c:462:13: call_function: calling ‘write_modified_header’ from ‘cr_rewrite_header_package_count’
#  363|       gchar *pointer_to_pkgs_end = pointer_to_pkgs + task_count_string_len;
#  364|   
#  365|->     bytes_written += cr_write(cr_file->f, header_buf, pointer_to_pkgs - header_buf, &tmp_err);
#  366|       if (!tmp_err)
#  367|           bytes_written += cr_write(cr_file->f, package_count_string, package_count_string_len, &tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def158]
createrepo_c-1.2.1/src/xml_file.c:416:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
createrepo_c-1.2.1/src/xml_file.c:392:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/xml_file.c:397:31: branch_false: ...to here
createrepo_c-1.2.1/src/xml_file.c:402:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/xml_file.c:411:8: branch_false: ...to here
createrepo_c-1.2.1/src/xml_file.c:411:8: branch_true: following ‘true’ branch (when ‘xml_compression == 6’)...
createrepo_c-1.2.1/src/xml_file.c:412:12: branch_true: ...to here
createrepo_c-1.2.1/src/xml_file.c:412:12: branch_true: following ‘true’ branch (when ‘zck_dict_file’ is non-NULL)...
createrepo_c-1.2.1/src/xml_file.c:413:20: branch_true: ...to here
createrepo_c-1.2.1/src/xml_file.c:415:16: branch_true: following ‘true’ branch...
createrepo_c-1.2.1/src/xml_file.c:416:17: branch_true: ...to here
createrepo_c-1.2.1/src/xml_file.c:416:17: danger: dereference of NULL ‘cr_xmlfile_sopen(g_strconcat(original_filename, ".tmp", 0), 0, xml_compression,  file_stat, & tmp_err)’
#  414|               size_t zck_dict_size = 0;
#  415|               if (g_file_get_contents(zck_dict_file, &zck_dict, &zck_dict_size, &tmp_err)){
#  416|->                 cr_set_dict(new_file->f, zck_dict, zck_dict_size, &tmp_err);
#  417|                   g_free(zck_dict);
#  418|               } else {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def159]
createrepo_c-1.2.1/src/xml_parser.c:103:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
createrepo_c-1.2.1/src/xml_parser.c:99:8: branch_false: following ‘false’ branch...
createrepo_c-1.2.1/src/xml_parser.c:102:5: branch_false: ...to here
createrepo_c-1.2.1/src/xml_parser.c:102:5: acquire_resource: ‘va_start’ called here
createrepo_c-1.2.1/src/xml_parser.c:103:5: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  101|   
#  102|       va_start(args, msg);
#  103|->     g_vasprintf(&warn, msg, args);
#  104|       va_end(args);
#  105|   

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-178.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-namecreaterepo_c-1.2.1-3.fc44
store-results-to/tmp/tmp11uu1wt2/createrepo_c-1.2.1-3.fc44.tar.xz
time-created2025-10-28 17:40:55
time-finished2025-10-28 17:42:58
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmp11uu1wt2/createrepo_c-1.2.1-3.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp11uu1wt2/createrepo_c-1.2.1-3.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9