libsolv-0.7.34-5.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
libsolv-0.7.34/examples/solv/checksig.c:66:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(pool_tmpjoin(sigpool,  gpgdir, "/keys", 0), "w")’
libsolv-0.7.34/examples/solv/checksig.c:53:6: branch_false: following ‘false’ branch (when ‘gpgdir’ is non-NULL)...
libsolv-0.7.34/examples/solv/checksig.c:55:14: branch_false: ...to here
libsolv-0.7.34/examples/solv/checksig.c:56:15: acquire_resource: opened here
libsolv-0.7.34/examples/solv/checksig.c:56:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/checksig.c:62:19: branch_false: ...to here
libsolv-0.7.34/examples/solv/checksig.c:62:43: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/checksig.c:64:12: branch_true: ...to here
libsolv-0.7.34/examples/solv/checksig.c:64:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/checksig.c:66:16: branch_false: ...to here
libsolv-0.7.34/examples/solv/checksig.c:66:16: danger: ‘fopen(pool_tmpjoin(sigpool,  gpgdir, "/keys", 0), "w")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   64|         if (!s->repo)
#   65|   	continue;
#   66|->       pubkey = solvable_lookup_str(s, SOLVABLE_DESCRIPTION);
#   67|         if (!pubkey || !*pubkey)
#   68|   	continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libsolv-0.7.34/examples/solv/checksig.c:66:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(pool_tmpjoin(sigpool,  gpgdir, "/keys", 0), "w")’
libsolv-0.7.34/examples/solv/checksig.c:53:6: branch_false: following ‘false’ branch (when ‘gpgdir’ is non-NULL)...
libsolv-0.7.34/examples/solv/checksig.c:55:14: branch_false: ...to here
libsolv-0.7.34/examples/solv/checksig.c:56:15: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/checksig.c:56:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/checksig.c:62:19: branch_false: ...to here
libsolv-0.7.34/examples/solv/checksig.c:62:43: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/checksig.c:64:12: branch_true: ...to here
libsolv-0.7.34/examples/solv/checksig.c:64:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/checksig.c:66:16: branch_false: ...to here
libsolv-0.7.34/examples/solv/checksig.c:66:16: danger: ‘fopen(pool_tmpjoin(sigpool,  gpgdir, "/keys", 0), "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   64|         if (!s->repo)
#   65|   	continue;
#   66|->       pubkey = solvable_lookup_str(s, SOLVABLE_DESCRIPTION);
#   67|         if (!pubkey || !*pubkey)
#   68|   	continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
libsolv-0.7.34/examples/solv/deltarpm.c:20:8: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:100:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
#   18|   
#   19|     strcpy(tmpl, "/var/tmp/solvXXXXXX");
#   20|->   fd = mkstemp(tmpl);
#   21|     if (fd < 0) 
#   22|       {    

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
libsolv-0.7.34/examples/solv/deltarpm.c:23:7: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:100:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
#   21|     if (fd < 0) 
#   22|       {    
#   23|->       perror("mkstemp");
#   24|         exit(1);
#   25|       }    

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
libsolv-0.7.34/examples/solv/deltarpm.c:43:3: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:43:3: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   41|     char *matchname = strdup(pool_id2str(pool, s->name));
#   42|   
#   43|->   dataiterator_init(&di, pool, repo, SOLVID_META, DELTA_PACKAGE_NAME, matchname, SEARCH_STRING);
#   44|     dataiterator_prepend_keyname(&di, REPOSITORY_DELTAINFO);
#   45|     while (dataiterator_step(&di))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
libsolv-0.7.34/examples/solv/deltarpm.c:44:3: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:44:3: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   42|   
#   43|     dataiterator_init(&di, pool, repo, SOLVID_META, DELTA_PACKAGE_NAME, matchname, SEARCH_STRING);
#   44|->   dataiterator_prepend_keyname(&di, REPOSITORY_DELTAINFO);
#   45|     while (dataiterator_step(&di))
#   46|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#   43|     dataiterator_init(&di, pool, repo, SOLVID_META, DELTA_PACKAGE_NAME, matchname, SEARCH_STRING);
#   44|     dataiterator_prepend_keyname(&di, REPOSITORY_DELTAINFO);
#   45|->   while (dataiterator_step(&di))
#   46|       {
#   47|         Id baseevr, op;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#   47|         Id baseevr, op;
#   48|   
#   49|->       dataiterator_setpos_parent(&di);
#   50|         if (pool_lookup_id(pool, SOLVID_POS, DELTA_PACKAGE_EVR) != s->evr ||
#   51|   	  pool_lookup_id(pool, SOLVID_POS, DELTA_PACKAGE_ARCH) != s->arch)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#   48|   
#   49|         dataiterator_setpos_parent(&di);
#   50|->       if (pool_lookup_id(pool, SOLVID_POS, DELTA_PACKAGE_EVR) != s->evr ||
#   51|   	  pool_lookup_id(pool, SOLVID_POS, DELTA_PACKAGE_ARCH) != s->arch)
#   52|   	continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#   49|         dataiterator_setpos_parent(&di);
#   50|         if (pool_lookup_id(pool, SOLVID_POS, DELTA_PACKAGE_EVR) != s->evr ||
#   51|-> 	  pool_lookup_id(pool, SOLVID_POS, DELTA_PACKAGE_ARCH) != s->arch)
#   52|   	continue;
#   53|         baseevr = pool_lookup_id(pool, SOLVID_POS, DELTA_BASE_EVR);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#   51|   	  pool_lookup_id(pool, SOLVID_POS, DELTA_PACKAGE_ARCH) != s->arch)
#   52|   	continue;
#   53|->       baseevr = pool_lookup_id(pool, SOLVID_POS, DELTA_BASE_EVR);
#   54|         FOR_PROVIDES(op, pp, s->name)
#   55|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
libsolv-0.7.34/examples/solv/deltarpm.c:70:21: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:70:21: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#   68|   	  int newfd;
#   69|   
#   70|-> 	  archstr = pool_id2str(pool, s->arch);
#   71|   	  if (strlen(archstr) > 10 || strchr(archstr, '\'') != 0)
#   72|   	    continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#   72|   	    continue;
#   73|   
#   74|-> 	  seq = pool_tmpjoin(pool, pool_lookup_str(pool, SOLVID_POS, DELTA_SEQ_NAME), "-", pool_lookup_str(pool, SOLVID_POS, DELTA_SEQ_EVR));
#   75|   	  seq = pool_tmpappend(pool, seq, "-", pool_lookup_str(pool, SOLVID_POS, DELTA_SEQ_NUM));
#   76|   	  if (strchr(seq, '\'') != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
libsolv-0.7.34/examples/solv/deltarpm.c:75:17: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:75:17: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#   73|   
#   74|   	  seq = pool_tmpjoin(pool, pool_lookup_str(pool, SOLVID_POS, DELTA_SEQ_NAME), "-", pool_lookup_str(pool, SOLVID_POS, DELTA_SEQ_EVR));
#   75|-> 	  seq = pool_tmpappend(pool, seq, "-", pool_lookup_str(pool, SOLVID_POS, DELTA_SEQ_NUM));
#   76|   	  if (strchr(seq, '\'') != 0)
#   77|   	    continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
libsolv-0.7.34/examples/solv/deltarpm.c:83:15: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:83:15: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#   81|   	  sprintf(cmd, "/usr/bin/applydeltarpm -c -s '");
#   82|   #endif
#   83|-> 	  if (system(pool_tmpjoin(pool, cmd, seq, "'")) != 0)
#   84|   	    continue;	/* didn't match */
#   85|   	  /* looks good, download delta */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
libsolv-0.7.34/examples/solv/deltarpm.c:83:22: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:83:22: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#   81|   	  sprintf(cmd, "/usr/bin/applydeltarpm -c -s '");
#   82|   #endif
#   83|-> 	  if (system(pool_tmpjoin(pool, cmd, seq, "'")) != 0)
#   84|   	    continue;	/* didn't match */
#   85|   	  /* looks good, download delta */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
libsolv-0.7.34/examples/solv/deltarpm.c:87:20: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:87:20: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#   85|   	  /* looks good, download delta */
#   86|   	  chksumtype = 0;
#   87|-> 	  chksum = pool_lookup_bin_checksum(pool, SOLVID_POS, DELTA_CHECKSUM, &chksumtype);
#   88|   	  if (!chksumtype)
#   89|   	    continue;	/* no way! */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
libsolv-0.7.34/examples/solv/deltarpm.c:90:18: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:90:18: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#   88|   	  if (!chksumtype)
#   89|   	    continue;	/* no way! */
#   90|-> 	  dloc = pool_lookup_deltalocation(pool, SOLVID_POS, 0);
#   91|   	  if (!dloc)
#   92|   	    continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
libsolv-0.7.34/examples/solv/deltarpm.c:96:37: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:94:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:96:37: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:96:37: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#   94|   	  if (cinfo->type == TYPE_SUSETAGS)
#   95|   	    {
#   96|-> 	      const char *datadir = repo_lookup_str(repo, SOLVID_META, SUSETAGS_DATADIR);
#   97|   	      dloc = pool_tmpjoin(pool, datadir ? datadir : "suse", "/", dloc);
#   98|   	    }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
libsolv-0.7.34/examples/solv/deltarpm.c:97:22: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:94:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:96:37: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:97:22: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#   95|   	    {
#   96|   	      const char *datadir = repo_lookup_str(repo, SOLVID_META, SUSETAGS_DATADIR);
#   97|-> 	      dloc = pool_tmpjoin(pool, datadir ? datadir : "suse", "/", dloc);
#   98|   	    }
#   99|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
libsolv-0.7.34/examples/solv/deltarpm.c:100:21: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:100:21: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#   98|   	    }
#   99|   #endif
#  100|-> 	  if ((fp = curlfopen(cinfo, dloc, 0, chksum, chksumtype, 0)) == 0)
#  101|   	    continue;
#  102|   	  /* got it, now reconstruct */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
libsolv-0.7.34/examples/solv/deltarpm.c:109:11: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:100:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: return_function: returning to ‘trydeltadownload’ from ‘opentmpfile’
libsolv-0.7.34/examples/solv/deltarpm.c:109:11: danger: ‘matchname’ leaks here; was allocated at [(2)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/1)
#  107|   	  sprintf(cmd, "applydeltarpm /dev/fd/%d /dev/fd/%d", fileno(fp), newfd);
#  108|   #endif
#  109|-> 	  fcntl(fileno(fp), F_SETFD, 0);
#  110|   	  if (system(cmd))
#  111|   	    {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
libsolv-0.7.34/examples/solv/deltarpm.c:110:15: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:100:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: return_function: returning to ‘trydeltadownload’ from ‘opentmpfile’
libsolv-0.7.34/examples/solv/deltarpm.c:110:15: danger: ‘matchname’ leaks here; was allocated at [(2)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/1)
#  108|   #endif
#  109|   	  fcntl(fileno(fp), F_SETFD, 0);
#  110|-> 	  if (system(cmd))
#  111|   	    {
#  112|   	      close(newfd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
libsolv-0.7.34/examples/solv/deltarpm.c:112:15: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:100:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: return_function: returning to ‘trydeltadownload’ from ‘opentmpfile’
libsolv-0.7.34/examples/solv/deltarpm.c:110:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:112:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:112:15: danger: ‘matchname’ leaks here; was allocated at [(2)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/1)
#  110|   	  if (system(cmd))
#  111|   	    {
#  112|-> 	      close(newfd);
#  113|   	      fclose(fp);
#  114|   	      continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libsolv-0.7.34/examples/solv/deltarpm.c:118:20: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:60:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:71:39: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:100:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
libsolv-0.7.34/examples/solv/deltarpm.c:103:19: return_function: returning to ‘trydeltadownload’ from ‘opentmpfile’
libsolv-0.7.34/examples/solv/deltarpm.c:110:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:116:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:118:20: danger: ‘matchname’ leaks here; was allocated at [(2)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/1)
#  116|   	  lseek(newfd, 0, SEEK_SET);
#  117|   	  chksumtype = 0;
#  118|-> 	  chksum = solvable_lookup_bin_checksum(s, SOLVABLE_CHECKSUM, &chksumtype);
#  119|   	  if (chksumtype && !verify_checksum(newfd, loc, chksum, chksumtype))
#  120|   	    {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
libsolv-0.7.34/examples/solv/deltarpm.c:130:3: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:130:3: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
#  128|   	}
#  129|       }
#  130|->   dataiterator_free(&di);
#  131|     solv_free(matchname);
#  132|     return retfp;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
libsolv-0.7.34/examples/solv/deltarpm.c:131:3: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:131:3: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
#  129|       }
#  130|     dataiterator_free(&di);
#  131|->   solv_free(matchname);
#  132|     return retfp;
#  133|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def28]
libsolv-0.7.34/examples/solv/fastestmirror.c:71:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘socket(*result.ai_family, *result.ai_socktype, *result.ai_protocol)’
libsolv-0.7.34/examples/solv/fastestmirror.c:28:15: branch_true: following ‘true’ branch (when ‘i < nurls’)...
libsolv-0.7.34/examples/solv/fastestmirror.c:30:12: branch_true: ...to here
libsolv-0.7.34/examples/solv/fastestmirror.c:32:10: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libsolv-0.7.34/examples/solv/fastestmirror.c:34:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/fastestmirror.c:34:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/fastestmirror.c:36:7: branch_false: ...to here
libsolv-0.7.34/examples/solv/fastestmirror.c:39:10: branch_false: following ‘false’ branch (when ‘q’ is NULL)...
libsolv-0.7.34/examples/solv/fastestmirror.c:44:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/fastestmirror.c:44:10: branch_false: following ‘false’ branch (when ‘p2’ is NULL)...
libsolv-0.7.34/examples/solv/fastestmirror.c:47:12: branch_false: ...to here
libsolv-0.7.34/examples/solv/fastestmirror.c:51:10: branch_false: following ‘false’ branch (when ‘p2’ is NULL)...
libsolv-0.7.34/examples/solv/fastestmirror.c:60:7: branch_false: ...to here
libsolv-0.7.34/examples/solv/fastestmirror.c:66:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/fastestmirror.c:68:75: branch_true: ...to here
libsolv-0.7.34/examples/solv/fastestmirror.c:68:22: acquire_resource: socket created here
libsolv-0.7.34/examples/solv/fastestmirror.c:69:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/fastestmirror.c:71:19: branch_true: ...to here
libsolv-0.7.34/examples/solv/fastestmirror.c:71:18: danger: ‘socket(*result.ai_family, *result.ai_socktype, *result.ai_protocol)’ leaks here
#   69|   	  if (socks[i] >= 0)
#   70|   	    {
#   71|-> 	      if (fcntl(socks[i], F_SETFL, O_NONBLOCK) == -1)
#   72|               {
#   73|   		      close(socks[i]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def29]
libsolv-0.7.34/examples/solv/repoinfo_cache.c:184:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tmpl, "r")’
libsolv-0.7.34/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: acquire_resource: opened here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:184:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:184:7: danger: ‘fopen(tmpl, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  182|       {
#  183|         /* main repo */
#  184|->       repo_empty(repo, 1);
#  185|         if (repo_add_solv(repo, fp, SOLV_ADD_NO_STUBS))
#  186|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
libsolv-0.7.34/examples/solv/repoinfo_cache.c:184:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tmpl, "r")’
libsolv-0.7.34/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:184:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:184:7: danger: ‘fopen(tmpl, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  182|       {
#  183|         /* main repo */
#  184|->       repo_empty(repo, 1);
#  185|         if (repo_add_solv(repo, fp, SOLV_ADD_NO_STUBS))
#  186|   	{

Error: GCC_ANALYZER_WARNING (CWE-775): [#def31]
libsolv-0.7.34/examples/solv/repoinfo_cache.c:185:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tmpl, "r")’
libsolv-0.7.34/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: acquire_resource: opened here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:184:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:185:11: danger: ‘fopen(tmpl, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  183|         /* main repo */
#  184|         repo_empty(repo, 1);
#  185|->       if (repo_add_solv(repo, fp, SOLV_ADD_NO_STUBS))
#  186|   	{
#  187|   	  /* oops, no way to recover from here */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
libsolv-0.7.34/examples/solv/repoinfo_cache.c:185:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tmpl, "r")’
libsolv-0.7.34/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:184:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:185:11: danger: ‘fopen(tmpl, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  183|         /* main repo */
#  184|         repo_empty(repo, 1);
#  185|->       if (repo_add_solv(repo, fp, SOLV_ADD_NO_STUBS))
#  186|   	{
#  187|   	  /* oops, no way to recover from here */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def33]
libsolv-0.7.34/examples/solv/repoinfo_cache.c:197:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tmpl, "r")’
libsolv-0.7.34/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: acquire_resource: opened here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_false: following ‘false’ branch (when ‘repoext’ is non-NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:197:52: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:197:7: danger: ‘fopen(tmpl, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  195|         /* make sure repodata contains complete repo */
#  196|         /* (this is how repodata_write saves it) */
#  197|->       repodata_extend_block(repodata, repo->start, repo->end - repo->start);
#  198|         repodata->state = REPODATA_LOADING;
#  199|         if (strcmp(repoext, "DL") != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
libsolv-0.7.34/examples/solv/repoinfo_cache.c:197:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tmpl, "r")’
libsolv-0.7.34/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_false: following ‘false’ branch (when ‘repoext’ is non-NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:197:52: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:197:7: danger: ‘fopen(tmpl, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  195|         /* make sure repodata contains complete repo */
#  196|         /* (this is how repodata_write saves it) */
#  197|->       repodata_extend_block(repodata, repo->start, repo->end - repo->start);
#  198|         repodata->state = REPODATA_LOADING;
#  199|         if (strcmp(repoext, "DL") != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def35]
libsolv-0.7.34/examples/solv/repoinfo_cache.c:201:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tmpl, "r")’
libsolv-0.7.34/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: acquire_resource: opened here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_false: following ‘false’ branch (when ‘repoext’ is non-NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:197:52: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:201:7: danger: ‘fopen(tmpl, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  199|         if (strcmp(repoext, "DL") != 0)
#  200|   	flags |= REPO_LOCALPOOL;
#  201|->       repo_add_solv(repo, fp, flags);
#  202|         repodata->state = REPODATA_AVAILABLE;	/* in case the load failed */
#  203|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
libsolv-0.7.34/examples/solv/repoinfo_cache.c:201:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tmpl, "r")’
libsolv-0.7.34/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:178:8: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:181:6: branch_false: following ‘false’ branch (when ‘repoext’ is non-NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:197:52: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:201:7: danger: ‘fopen(tmpl, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  199|         if (strcmp(repoext, "DL") != 0)
#  200|   	flags |= REPO_LOCALPOOL;
#  201|->       repo_add_solv(repo, fp, flags);
#  202|         repodata->state = REPODATA_AVAILABLE;	/* in case the load failed */
#  203|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
libsolv-0.7.34/examples/solv/repoinfo_cache.c:238:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/examples/solv/repoinfo_cache.c:215:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:223:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:228:3: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:229:14: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:229:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:237:6: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:237:6: branch_true: following ‘true’ branch (when ‘repodata’ is NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:238:5: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:238:5: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  236|   
#  237|     if (!repodata)
#  238|->     repo_write(repo, fp);
#  239|     else if (repoext)
#  240|       repodata_write(repodata, fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
libsolv-0.7.34/examples/solv/repoinfo_cache.c:240:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/examples/solv/repoinfo_cache.c:215:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:223:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:228:3: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:229:14: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:229:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:237:6: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:237:6: branch_false: following ‘false’ branch (when ‘repodata’ is non-NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:239:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:239:11: branch_true: following ‘true’ branch (when ‘repoext’ is non-NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:240:5: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:240:5: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  238|       repo_write(repo, fp);
#  239|     else if (repoext)
#  240|->     repodata_write(repodata, fp);
#  241|     else
#  242|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
libsolv-0.7.34/examples/solv/repoinfo_cache.c:245:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/examples/solv/repoinfo_cache.c:215:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:223:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:228:3: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:229:14: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:229:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:237:6: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:237:6: branch_false: following ‘false’ branch (when ‘repodata’ is non-NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:239:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:239:11: branch_false: following ‘false’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.34/examples/solv/repoinfo_cache.c:243:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_cache.c:245:7: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  243|         int oldnrepodata = repo->nrepodata;
#  244|         repo->nrepodata = oldnrepodata > 2 ? 2 : oldnrepodata;	/* XXX: do this right */
#  245|->       repo_write(repo, fp);
#  246|         repo->nrepodata = oldnrepodata;
#  247|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def40]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:38:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&buf, "r")’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:144:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:145:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:17: acquire_resource: opened here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:154:13: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:156:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:167:18: call_function: calling ‘yum_substitute’ from ‘read_repoinfos_yum’
#   36|       return releaseevr;
#   37|   #endif
#   38|->   queue_init(&q);
#   39|     rpmstate = rpm_state_create(pool, pool_get_rootdir(pool));
#   40|     rpm_installedrpmdbids(rpmstate, "Providename", "system-release", &q);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:38:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&buf, "r")’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:144:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:145:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:17: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:154:13: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:156:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:167:18: call_function: calling ‘yum_substitute’ from ‘read_repoinfos_yum’
#   36|       return releaseevr;
#   37|   #endif
#   38|->   queue_init(&q);
#   39|     rpmstate = rpm_state_create(pool, pool_get_rootdir(pool));
#   40|     rpm_installedrpmdbids(rpmstate, "Providename", "system-release", &q);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:39:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&buf, "r")’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:144:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:145:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:17: acquire_resource: opened here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:154:13: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:156:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:167:18: call_function: calling ‘yum_substitute’ from ‘read_repoinfos_yum’
#   37|   #endif
#   38|     queue_init(&q);
#   39|->   rpmstate = rpm_state_create(pool, pool_get_rootdir(pool));
#   40|     rpm_installedrpmdbids(rpmstate, "Providename", "system-release", &q);
#   41|     if (q.count)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:39:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&buf, "r")’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:144:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:145:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:17: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:154:13: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:156:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:167:18: call_function: calling ‘yum_substitute’ from ‘read_repoinfos_yum’
#   37|   #endif
#   38|     queue_init(&q);
#   39|->   rpmstate = rpm_state_create(pool, pool_get_rootdir(pool));
#   40|     rpm_installedrpmdbids(rpmstate, "Providename", "system-release", &q);
#   41|     if (q.count)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:40:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&buf, "r")’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:144:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:145:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:17: acquire_resource: opened here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:154:13: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:156:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:167:18: call_function: calling ‘yum_substitute’ from ‘read_repoinfos_yum’
#   38|     queue_init(&q);
#   39|     rpmstate = rpm_state_create(pool, pool_get_rootdir(pool));
#   40|->   rpm_installedrpmdbids(rpmstate, "Providename", "system-release", &q);
#   41|     if (q.count)
#   42|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:40:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&buf, "r")’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:144:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:145:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:17: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:154:13: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:156:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:167:18: call_function: calling ‘yum_substitute’ from ‘read_repoinfos_yum’
#   38|     queue_init(&q);
#   39|     rpmstate = rpm_state_create(pool, pool_get_rootdir(pool));
#   40|->   rpm_installedrpmdbids(rpmstate, "Providename", "system-release", &q);
#   41|     if (q.count)
#   42|       {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:45:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&buf, "r")’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:144:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:145:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:17: acquire_resource: opened here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:154:13: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:156:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:167:18: call_function: calling ‘yum_substitute’ from ‘read_repoinfos_yum’
#   43|         void *handle;
#   44|         char *p;
#   45|->       handle = rpm_byrpmdbid(rpmstate, q.elements[0]);
#   46|         releaseevr = handle ? rpm_query(handle, SOLVABLE_EVR) : 0;
#   47|         if (releaseevr && (p = strchr(releaseevr, '-')) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:45:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&buf, "r")’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:144:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:145:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:17: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:154:13: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:156:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:167:18: call_function: calling ‘yum_substitute’ from ‘read_repoinfos_yum’
#   43|         void *handle;
#   44|         char *p;
#   45|->       handle = rpm_byrpmdbid(rpmstate, q.elements[0]);
#   46|         releaseevr = handle ? rpm_query(handle, SOLVABLE_EVR) : 0;
#   47|         if (releaseevr && (p = strchr(releaseevr, '-')) != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:46:29: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&buf, "r")’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:144:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:145:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:17: acquire_resource: opened here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:154:13: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:156:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:167:18: call_function: calling ‘yum_substitute’ from ‘read_repoinfos_yum’
#   44|         char *p;
#   45|         handle = rpm_byrpmdbid(rpmstate, q.elements[0]);
#   46|->       releaseevr = handle ? rpm_query(handle, SOLVABLE_EVR) : 0;
#   47|         if (releaseevr && (p = strchr(releaseevr, '-')) != 0)
#   48|   	*p = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:46:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&buf, "r")’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:144:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:145:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:17: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:154:13: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:156:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:167:18: call_function: calling ‘yum_substitute’ from ‘read_repoinfos_yum’
#   44|         char *p;
#   45|         handle = rpm_byrpmdbid(rpmstate, q.elements[0]);
#   46|->       releaseevr = handle ? rpm_query(handle, SOLVABLE_EVR) : 0;
#   47|         if (releaseevr && (p = strchr(releaseevr, '-')) != 0)
#   48|   	*p = 0;

Error: CPPCHECK_WARNING (CWE-682): [#def50]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:105: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  103|   		}
#  104|   	      basearch = strdup(un.machine);
#  105|-> 	      if (basearch[0] == 'i' && basearch[1] && !strcmp(basearch + 2, "86"))
#  106|   		basearch[1] = '3';
#  107|   	    }

Error: CPPCHECK_WARNING (CWE-476): [#def51]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:105: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: basearch
#  103|   		}
#  104|   	      basearch = strdup(un.machine);
#  105|-> 	      if (basearch[0] == 'i' && basearch[1] && !strcmp(basearch + 2, "86"))
#  106|   		basearch[1] = '3';
#  107|   	    }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def52]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:105:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘basearch’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:71:10: branch_true: following ‘true’ branch (when ‘p2’ is non-NULL)...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:73:12: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:73:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:94:12: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:94:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:96:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:96:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:99:19: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:99:18: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:104:26: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:104:26: acquire_memory: this call could return NULL
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:105:19: danger: ‘strdup(&un.machine)’ could be NULL: unchecked value from [(12)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/11)
#  103|   		}
#  104|   	      basearch = strdup(un.machine);
#  105|-> 	      if (basearch[0] == 'i' && basearch[1] && !strcmp(basearch + 2, "86"))
#  106|   		basearch[1] = '3';
#  107|   	    }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/etc/yum.repos.d")’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:134:9: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:17: danger: ‘opendir("/etc/yum.repos.d")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  138|         return 0;
#  139|       }
#  140|->   while ((ent = readdir(dir)) != 0)
#  141|       {
#  142|         if (ent->d_name[0] == '.')

Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:116:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(calc_cachepath(repo, 0, 0), "r")’
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:89:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:94:3: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:103:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:115:15: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:115:9: acquire_resource: opened here
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:116:7: danger: ‘fopen(calc_cachepath(repo, 0, 0), "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  114|   #endif
#  115|     ofp = fopen(calc_cachepath(repo, 0, 0), "r");
#  116|->   if (repo_add_rpmdb_reffp(repo, ofp, REPO_REUSE_REPODATA | REPO_NO_INTERNALIZE | REPO_USE_ROOTDIR))
#  117|       {
#  118|         fprintf(stderr, "installed db: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:116:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(calc_cachepath(repo, 0, 0), "r")’
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:89:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:94:3: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:103:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:115:15: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:115:9: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_system_rpm.c:116:7: danger: ‘fopen(calc_cachepath(repo, 0, 0), "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  114|   #endif
#  115|     ofp = fopen(calc_cachepath(repo, 0, 0), "r");
#  116|->   if (repo_add_rpmdb_reffp(repo, ofp, REPO_REUSE_REPODATA | REPO_NO_INTERNALIZE | REPO_USE_ROOTDIR))
#  117|       {
#  118|         fprintf(stderr, "installed db: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def56]
libsolv-0.7.34/examples/solv/repoinfo_type_debian.c:41:11: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘basearch’
libsolv-0.7.34/examples/solv/repoinfo_type_debian.c:32:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_type_debian.c:35:11: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_type_debian.c:35:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_type_debian.c:40:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_type_debian.c:40:18: acquire_memory: this call could return NULL
libsolv-0.7.34/examples/solv/repoinfo_type_debian.c:41:11: danger: ‘strdup(&un.machine)’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   39|   	}
#   40|         basearch = strdup(un.machine);
#   41|->       if (basearch[0] == 'i' && basearch[1] && !strcmp(basearch + 2, "86"))
#   42|   	basearch[1] = '3';
#   43|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
libsolv-0.7.34/examples/solv/repoinfo_type_plaindir.c:57:16: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(*cinfo.path)’
libsolv-0.7.34/examples/solv/repoinfo_type_plaindir.c:39:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_type_plaindir.c:44:53: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_type_plaindir.c:46:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_type_plaindir.c:51:3: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_type_plaindir.c:52:13: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_type_plaindir.c:52:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_type_plaindir.c:57:16: danger: ‘opendir(*cinfo.path)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   55|         return -1;
#   56|       }
#   57|->   while ((de = readdir(dp)) != 0)
#   58|       {
#   59|         if (de->d_name[0] == 0 || de->d_name[0] == '.')

Error: GCC_ANALYZER_WARNING: [#def58]
libsolv-0.7.34/ext/repo_apk.c:262:13: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘fd’
libsolv-0.7.34/ext/repo_apk.c:686:1: enter_function: entry to ‘repo_add_apk_repo’
libsolv-0.7.34/ext/repo_apk.c:698:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_apk.c:700:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_apk.c:702:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_apk.c:704:10: branch_true: ...to here
libsolv-0.7.34/ext/repo_apk.c:704:9: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_apk.c:706:10: branch_false: ...to here
libsolv-0.7.34/ext/repo_apk.c:706:9: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_apk.c:707:15: call_function: calling ‘add_apkv3_idx’ from ‘repo_add_apk_repo’
#  260|   	r = fread(comp, 2, 1, fp) == 1 ? 2 : feof(fp) ? 0 : -1;
#  261|         else
#  262|-> 	r = read(fd, comp, 2);
#  263|         if (r != 2)
#  264|   	return open_apkv3_error(pool, fd, fn, "compression header read error");

Error: GCC_ANALYZER_WARNING (CWE-688): [#def59]
libsolv-0.7.34/ext/repo_apk.c:293:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘cfp’ where non-null expected
libsolv-0.7.34/ext/repo_apk.c:686:1: enter_function: entry to ‘repo_add_apk_repo’
libsolv-0.7.34/ext/repo_apk.c:698:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_apk.c:700:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_apk.c:702:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_apk.c:704:10: branch_true: ...to here
libsolv-0.7.34/ext/repo_apk.c:704:9: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_apk.c:706:10: branch_false: ...to here
libsolv-0.7.34/ext/repo_apk.c:706:9: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_apk.c:707:15: call_function: calling ‘add_apkv3_idx’ from ‘repo_add_apk_repo’
#  291|     if (adbchar != '.')
#  292|       {
#  293|->       if (fread(buf, 4, 1, cfp) != 1 || buf[0] != 'A' || buf[1] != 'D' || buf[2] != 'B' || buf[3] != '.')
#  294|   	{
#  295|   	  pool_error(pool, -1, "%s: not an apkv3 file", fn);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def60]
libsolv-0.7.34/ext/repo_apkv3.c:286:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘blobl’
#  284|     size_t blobl;
#  285|     const unsigned char *blob = adb_blob(adb, adblen, v, &blobl);
#  286|->   if (blobl < 12 || blobl >= ADB_MAX_SIZE)
#  287|       return 0;
#  288|     type_size = adb_u32(blob);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def61]
libsolv-0.7.34/ext/repo_appdata.c:257:19: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filepath, "r")’
libsolv-0.7.34/ext/repo_appdata.c:211:14: acquire_resource: opened here
libsolv-0.7.34/ext/repo_appdata.c:211:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:257:19: danger: ‘fopen(filepath, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  255|   	continue;
#  256|         if (!s->name && !strcmp(p, "Name"))
#  257|-> 	s->name = pool_str2id(pool, pool_tmpjoin(pool, "application:", p2, 0), 1);
#  258|         else if (!pd->havesummary && !strcmp(p, "Comment"))
#  259|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
libsolv-0.7.34/ext/repo_appdata.c:257:19: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filepath, "r")’
libsolv-0.7.34/ext/repo_appdata.c:211:14: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_appdata.c:211:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:257:19: danger: ‘fopen(filepath, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  255|   	continue;
#  256|         if (!s->name && !strcmp(p, "Name"))
#  257|-> 	s->name = pool_str2id(pool, pool_tmpjoin(pool, "application:", p2, 0), 1);
#  258|         else if (!pd->havesummary && !strcmp(p, "Comment"))
#  259|   	{

Error: GCC_ANALYZER_WARNING (CWE-775): [#def63]
libsolv-0.7.34/ext/repo_appdata.c:257:37: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filepath, "r")’
libsolv-0.7.34/ext/repo_appdata.c:211:14: acquire_resource: opened here
libsolv-0.7.34/ext/repo_appdata.c:211:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:257:37: danger: ‘fopen(filepath, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  255|   	continue;
#  256|         if (!s->name && !strcmp(p, "Name"))
#  257|-> 	s->name = pool_str2id(pool, pool_tmpjoin(pool, "application:", p2, 0), 1);
#  258|         else if (!pd->havesummary && !strcmp(p, "Comment"))
#  259|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
libsolv-0.7.34/ext/repo_appdata.c:257:37: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filepath, "r")’
libsolv-0.7.34/ext/repo_appdata.c:211:14: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_appdata.c:211:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:257:37: danger: ‘fopen(filepath, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  255|   	continue;
#  256|         if (!s->name && !strcmp(p, "Name"))
#  257|-> 	s->name = pool_str2id(pool, pool_tmpjoin(pool, "application:", p2, 0), 1);
#  258|         else if (!pd->havesummary && !strcmp(p, "Comment"))
#  259|   	{

Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
libsolv-0.7.34/ext/repo_appdata.c:261:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filepath, "r")’
libsolv-0.7.34/ext/repo_appdata.c:211:14: acquire_resource: opened here
libsolv-0.7.34/ext/repo_appdata.c:211:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:261:11: danger: ‘fopen(filepath, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  259|   	{
#  260|   	  pd->havesummary = 1;
#  261|-> 	  repodata_set_str(pd->data, pd->handle, SOLVABLE_SUMMARY, p2);
#  262|   	}
#  263|         else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
libsolv-0.7.34/ext/repo_appdata.c:261:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filepath, "r")’
libsolv-0.7.34/ext/repo_appdata.c:211:14: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_appdata.c:211:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:261:11: danger: ‘fopen(filepath, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  259|   	{
#  260|   	  pd->havesummary = 1;
#  261|-> 	  repodata_set_str(pd->data, pd->handle, SOLVABLE_SUMMARY, p2);
#  262|   	}
#  263|         else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
libsolv-0.7.34/ext/repo_appdata.c:429:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_appdata.c:520:1: enter_function: entry to ‘repo_add_appdata_dir’
libsolv-0.7.34/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:551:16: acquire_resource: opened here
libsolv-0.7.34/ext/repo_appdata.c:557:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_appdata.c:569:136: branch_false: ...to here
libsolv-0.7.34/ext/repo_appdata.c:569:11: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:569:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:569:11: call_function: calling ‘repo_add_appdata_fn’ from ‘repo_add_appdata_dir’
#  427|     struct parsedata pd;
#  428|   
#  429|->   data = repo_add_repodata(repo, flags);
#  430|     memset(&pd, 0, sizeof(pd));
#  431|     pd.repo = repo;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
libsolv-0.7.34/ext/repo_appdata.c:429:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_appdata.c:520:1: enter_function: entry to ‘repo_add_appdata_dir’
libsolv-0.7.34/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:551:16: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_appdata.c:557:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_appdata.c:569:136: branch_false: ...to here
libsolv-0.7.34/ext/repo_appdata.c:569:11: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:569:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:569:11: call_function: calling ‘repo_add_appdata_fn’ from ‘repo_add_appdata_dir’
#  427|     struct parsedata pd;
#  428|   
#  429|->   data = repo_add_repodata(repo, flags);
#  430|     memset(&pd, 0, sizeof(pd));
#  431|     pd.repo = repo;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def69]
libsolv-0.7.34/ext/repo_appdata.c:438:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_appdata.c:520:1: enter_function: entry to ‘repo_add_appdata_dir’
libsolv-0.7.34/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:551:16: acquire_resource: opened here
libsolv-0.7.34/ext/repo_appdata.c:557:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_appdata.c:569:136: branch_false: ...to here
libsolv-0.7.34/ext/repo_appdata.c:569:11: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:569:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:569:11: call_function: calling ‘repo_add_appdata_fn’ from ‘repo_add_appdata_dir’
#  436|     pd.owners = owners;
#  437|   
#  438|->   solv_xmlparser_init(&pd.xmlp, stateswitches, &pd, startElement, endElement);
#  439|     if (solv_xmlparser_parse(&pd.xmlp, fp) != SOLV_XMLPARSER_OK)
#  440|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
libsolv-0.7.34/ext/repo_appdata.c:438:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_appdata.c:520:1: enter_function: entry to ‘repo_add_appdata_dir’
libsolv-0.7.34/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:551:16: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_appdata.c:557:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_appdata.c:569:136: branch_false: ...to here
libsolv-0.7.34/ext/repo_appdata.c:569:11: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:569:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:569:11: call_function: calling ‘repo_add_appdata_fn’ from ‘repo_add_appdata_dir’
#  436|     pd.owners = owners;
#  437|   
#  438|->   solv_xmlparser_init(&pd.xmlp, stateswitches, &pd, startElement, endElement);
#  439|     if (solv_xmlparser_parse(&pd.xmlp, fp) != SOLV_XMLPARSER_OK)
#  440|       {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
libsolv-0.7.34/ext/repo_appdata.c:439:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_appdata.c:520:1: enter_function: entry to ‘repo_add_appdata_dir’
libsolv-0.7.34/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:551:16: acquire_resource: opened here
libsolv-0.7.34/ext/repo_appdata.c:557:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_appdata.c:569:136: branch_false: ...to here
libsolv-0.7.34/ext/repo_appdata.c:569:11: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:569:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:569:11: call_function: calling ‘repo_add_appdata_fn’ from ‘repo_add_appdata_dir’
#  437|   
#  438|     solv_xmlparser_init(&pd.xmlp, stateswitches, &pd, startElement, endElement);
#  439|->   if (solv_xmlparser_parse(&pd.xmlp, fp) != SOLV_XMLPARSER_OK)
#  440|       {
#  441|         pool_debug(pd.pool, SOLV_ERROR, "repo_appdata: %s at line %u:%u\n", pd.xmlp.errstr, pd.xmlp.line, pd.xmlp.column);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
libsolv-0.7.34/ext/repo_appdata.c:439:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_appdata.c:520:1: enter_function: entry to ‘repo_add_appdata_dir’
libsolv-0.7.34/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:551:16: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_appdata.c:557:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_appdata.c:569:136: branch_false: ...to here
libsolv-0.7.34/ext/repo_appdata.c:569:11: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:569:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:569:11: call_function: calling ‘repo_add_appdata_fn’ from ‘repo_add_appdata_dir’
#  437|   
#  438|     solv_xmlparser_init(&pd.xmlp, stateswitches, &pd, startElement, endElement);
#  439|->   if (solv_xmlparser_parse(&pd.xmlp, fp) != SOLV_XMLPARSER_OK)
#  440|       {
#  441|         pool_debug(pd.pool, SOLV_ERROR, "repo_appdata: %s at line %u:%u\n", pd.xmlp.errstr, pd.xmlp.line, pd.xmlp.column);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
libsolv-0.7.34/ext/repo_appdata.c:540:23: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirpath)’
libsolv-0.7.34/ext/repo_appdata.c:537:14: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:540:23: danger: ‘opendir(dirpath)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  538|       {
#  539|         struct dirent *entry;
#  540|->       while ((entry = readdir(dir)))
#  541|   	{
#  542|   	  const char *n;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def74]
libsolv-0.7.34/ext/repo_appdata.c:559:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:551:16: acquire_resource: opened here
libsolv-0.7.34/ext/repo_appdata.c:557:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:559:23: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:559:23: danger: ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
#  557|   	  if (flags & APPDATA_SEARCH_UNINTERNALIZED_FILELIST)
#  558|   	    {
#  559|-> 	      Id id = pool_str2id(repo->pool, entry->d_name, 0);
#  560|   	      queue_empty(&oq);
#  561|   	      if (id)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
libsolv-0.7.34/ext/repo_appdata.c:559:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:551:16: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_appdata.c:557:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:559:23: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:559:23: danger: ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/4)
#  557|   	  if (flags & APPDATA_SEARCH_UNINTERNALIZED_FILELIST)
#  558|   	    {
#  559|-> 	      Id id = pool_str2id(repo->pool, entry->d_name, 0);
#  560|   	      queue_empty(&oq);
#  561|   	      if (id)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
libsolv-0.7.34/ext/repo_arch.c:533:20: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dir)’
libsolv-0.7.34/ext/repo_arch.c:530:8: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_arch.c:531:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_arch.c:533:20: danger: ‘opendir(dir)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  531|     if (dp)
#  532|       {
#  533|->       while ((de = readdir(dp)) != 0)
#  534|   	{
#  535|   	  if (!de->d_name[0] || de->d_name[0] == '.')

Error: GCC_ANALYZER_WARNING (CWE-775): [#def77]
libsolv-0.7.34/ext/repo_arch.c:543:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(pool_tmpjoin(*repo.pool,  solv_dupjoin(dir, "/", &*<unknown>.d_name), "/desc", 0), "r")’
libsolv-0.7.34/ext/repo_arch.c:531:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_arch.c:533:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_arch.c:535:16: branch_true: ...to here
libsolv-0.7.34/ext/repo_arch.c:540:21: acquire_resource: opened here
libsolv-0.7.34/ext/repo_arch.c:543:15: danger: ‘fopen(pool_tmpjoin(*repo.pool,  solv_dupjoin(dir, "/", &*<unknown>.d_name), "/desc", 0), "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  541|   	    {
#  542|   	      struct tarhead th;
#  543|-> 	      tarhead_init(&th, fp);
#  544|   	      s = pool_id2solvable(pool, repo_add_solvable(repo));
#  545|   	      adddata(data, s, &th);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
libsolv-0.7.34/ext/repo_arch.c:543:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(pool_tmpjoin(*repo.pool,  solv_dupjoin(dir, "/", &*<unknown>.d_name), "/desc", 0), "r")’
libsolv-0.7.34/ext/repo_arch.c:531:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_arch.c:533:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_arch.c:535:16: branch_true: ...to here
libsolv-0.7.34/ext/repo_arch.c:540:21: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_arch.c:543:15: danger: ‘fopen(pool_tmpjoin(*repo.pool,  solv_dupjoin(dir, "/", &*<unknown>.d_name), "/desc", 0), "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  541|   	    {
#  542|   	      struct tarhead th;
#  543|-> 	      tarhead_init(&th, fp);
#  544|   	      s = pool_id2solvable(pool, repo_add_solvable(repo));
#  545|   	      adddata(data, s, &th);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
libsolv-0.7.34/ext/repo_conda.c:405:30: warning[-Wanalyzer-malloc-leak]: leak of ‘pd.subdir’
libsolv-0.7.34/ext/repo_conda.c:465:1: enter_function: entry to ‘repo_add_conda’
libsolv-0.7.34/ext/repo_conda.c:485:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_conda.c:487:20: branch_false: ...to here
libsolv-0.7.34/ext/repo_conda.c:487:20: call_function: calling ‘parse_main’ from ‘repo_add_conda’
#  403|   {
#  404|     int type = JP_OBJECT;
#  405|->   while (type > 0 && (type = jsonparser_parse(jp)) > 0 && type != JP_OBJECT_END)
#  406|       {
#  407|         if (type == JP_STRING && !strcmp(jp->key, "subdir"))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def80]
libsolv-0.7.34/ext/repo_deb.c:675:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:675:50: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:675:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  673|     if (fstat(fileno(fp), &stb))
#  674|       {
#  675|->       pool_error(pool, -1, "fstat: %s", strerror(errno));
#  676|         fclose(fp);
#  677|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
libsolv-0.7.34/ext/repo_deb.c:675:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:675:50: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:675:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  673|     if (fstat(fileno(fp), &stb))
#  674|       {
#  675|->       pool_error(pool, -1, "fstat: %s", strerror(errno));
#  676|         fclose(fp);
#  677|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def82]
libsolv-0.7.34/ext/repo_deb.c:682:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:682:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  680|     if (l < 8 + 60 || (strncmp((char *)buf, "!<arch>\ndebian-binary   ", 8 + 16) != 0 && strncmp((char *)buf, "!<arch>\ndebian-binary/  ", 8 + 16) != 0))
#  681|       {
#  682|->       pool_error(pool, -1, "%s: not a deb package", deb);
#  683|         fclose(fp);
#  684|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
libsolv-0.7.34/ext/repo_deb.c:682:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:682:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  680|     if (l < 8 + 60 || (strncmp((char *)buf, "!<arch>\ndebian-binary   ", 8 + 16) != 0 && strncmp((char *)buf, "!<arch>\ndebian-binary/  ", 8 + 16) != 0))
#  681|       {
#  682|->       pool_error(pool, -1, "%s: not a deb package", deb);
#  683|         fclose(fp);
#  684|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def84]
libsolv-0.7.34/ext/repo_deb.c:689:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:689:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:689:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  687|     if (vlen < 0 || vlen > l)
#  688|       {
#  689|->       pool_error(pool, -1, "%s: not a deb package", deb);
#  690|         fclose(fp);
#  691|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
libsolv-0.7.34/ext/repo_deb.c:689:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:689:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:689:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  687|     if (vlen < 0 || vlen > l)
#  688|       {
#  689|->       pool_error(pool, -1, "%s: not a deb package", deb);
#  690|         fclose(fp);
#  691|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
libsolv-0.7.34/ext/repo_deb.c:696:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:693:8: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:694:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:696:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:696:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  694|     if (l < 8 + 60 + vlen + 60)
#  695|       {
#  696|->       pool_error(pool, -1, "%s: unhandled deb package", deb);
#  697|         fclose(fp);
#  698|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
libsolv-0.7.34/ext/repo_deb.c:696:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:693:8: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:694:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:696:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:696:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  694|     if (l < 8 + 60 + vlen + 60)
#  695|       {
#  696|->       pool_error(pool, -1, "%s: unhandled deb package", deb);
#  697|         fclose(fp);
#  698|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def88]
libsolv-0.7.34/ext/repo_deb.c:711:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:693:8: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:694:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:701:37: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:701:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:703:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:705:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:707:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:711:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  709|     else
#  710|       {
#  711|->       pool_error(pool, -1, "%s: control.tar is not second entry", deb);
#  712|         fclose(fp);
#  713|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
libsolv-0.7.34/ext/repo_deb.c:711:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:693:8: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:694:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:701:37: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:701:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:703:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:705:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:707:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:711:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  709|     else
#  710|       {
#  711|->       pool_error(pool, -1, "%s: control.tar is not second entry", deb);
#  712|         fclose(fp);
#  713|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def90]
libsolv-0.7.34/ext/repo_deb.c:721:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:693:8: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:694:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:701:37: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:719:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:721:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:721:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  719|     if (clen <= 0 || clen >= MAX_CONTROL_SIZE)
#  720|       {
#  721|->       pool_error(pool, -1, "%s: control.tar has illegal size", deb);
#  722|         fclose(fp);
#  723|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
libsolv-0.7.34/ext/repo_deb.c:721:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:693:8: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:694:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:701:37: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:719:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:721:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:721:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  719|     if (clen <= 0 || clen >= MAX_CONTROL_SIZE)
#  720|       {
#  721|->       pool_error(pool, -1, "%s: control.tar has illegal size", deb);
#  722|         fclose(fp);
#  723|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def92]
libsolv-0.7.34/ext/repo_deb.c:725:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:693:8: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:694:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:701:37: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:719:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:725:25: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:725:10: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  723|         return 0;
#  724|       }
#  725|->   ctgz = solv_calloc(1, clen + 4);
#  726|     bp = buf + 8 + 60 + vlen + 60;
#  727|     l -= 8 + 60 + vlen + 60;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
libsolv-0.7.34/ext/repo_deb.c:725:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:693:8: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:694:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:701:37: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:719:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:725:25: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:725:10: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  723|         return 0;
#  724|       }
#  725|->   ctgz = solv_calloc(1, clen + 4);
#  726|     bp = buf + 8 + 60 + vlen + 60;
#  727|     l -= 8 + 60 + vlen + 60;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def94]
libsolv-0.7.34/ext/repo_deb.c:736:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:693:8: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:694:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:701:37: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:719:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:725:25: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:732:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:734:27: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:734:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:736:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:736:11: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  734|         if (fread(ctgz + l, clen - l, 1, fp) != 1)
#  735|   	{
#  736|-> 	  pool_error(pool, -1, "%s: unexpected EOF", deb);
#  737|   	  solv_free(ctgz);
#  738|   	  fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
libsolv-0.7.34/ext/repo_deb.c:736:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:693:8: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:694:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:701:37: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:719:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:725:25: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:732:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:734:27: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:734:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:736:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:736:11: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  734|         if (fread(ctgz + l, clen - l, 1, fp) != 1)
#  735|   	{
#  736|-> 	  pool_error(pool, -1, "%s: unexpected EOF", deb);
#  737|   	  solv_free(ctgz);
#  738|   	  fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def96]
libsolv-0.7.34/ext/repo_deb.c:737:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:693:8: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:694:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:701:37: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:719:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:725:25: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:732:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:734:27: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:734:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:736:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:737:11: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  735|   	{
#  736|   	  pool_error(pool, -1, "%s: unexpected EOF", deb);
#  737|-> 	  solv_free(ctgz);
#  738|   	  fclose(fp);
#  739|   	  return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
libsolv-0.7.34/ext/repo_deb.c:737:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_deb.c:668:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:680:6: branch_false: following ‘false’ branch (when ‘l > 67’)...
libsolv-0.7.34/ext/repo_deb.c:680:22: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:687:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:693:8: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:694:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:701:37: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:719:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_deb.c:725:25: branch_false: ...to here
libsolv-0.7.34/ext/repo_deb.c:732:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:734:27: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:734:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_deb.c:736:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_deb.c:737:11: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  735|   	{
#  736|   	  pool_error(pool, -1, "%s: unexpected EOF", deb);
#  737|-> 	  solv_free(ctgz);
#  738|   	  fclose(fp);
#  739|   	  return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
libsolv-0.7.34/ext/repo_products.c:325:23: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirpath)’
libsolv-0.7.34/ext/repo_products.c:295:1: enter_function: entry to ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:312:9: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_products.c:313:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:320:16: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:320:16: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:320:16: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.34/ext/repo_products.c:325:23: danger: ‘opendir(dirpath)’ leaks here; was allocated at [(2)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/1)
#  323|   	pd.baseproduct = 0;
#  324|   
#  325|->       while ((entry = readdir(dir)))
#  326|   	{
#  327|   	  int len = strlen(entry->d_name);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def99]
libsolv-0.7.34/ext/repo_products.c:340:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_products.c:295:1: enter_function: entry to ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:313:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:320:16: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:320:16: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:320:16: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.34/ext/repo_products.c:325:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:327:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:331:22: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:331:22: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.34/ext/repo_products.c:332:16: acquire_resource: opened here
libsolv-0.7.34/ext/repo_products.c:340:15: danger: ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’ leaks here; was opened at [(28)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/27)
#  338|   	  if (fstat(fileno(fp), &st))
#  339|   	    {
#  340|-> 	      pool_error(repo->pool, 0, "%s: %s", fullpath, strerror(errno));
#  341|   	      fclose(fp);
#  342|   	      continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
libsolv-0.7.34/ext/repo_products.c:340:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_products.c:295:1: enter_function: entry to ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:313:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:320:16: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:320:16: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:320:16: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.34/ext/repo_products.c:325:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:327:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:331:22: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:331:22: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.34/ext/repo_products.c:332:16: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_products.c:340:15: danger: ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’ leaks here; was allocated at [(28)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/27)
#  338|   	  if (fstat(fileno(fp), &st))
#  339|   	    {
#  340|-> 	      pool_error(repo->pool, 0, "%s: %s", fullpath, strerror(errno));
#  341|   	      fclose(fp);
#  342|   	      continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def101]
libsolv-0.7.34/ext/repo_products.c:348:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_products.c:295:1: enter_function: entry to ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:313:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:320:16: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:320:16: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:320:16: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.34/ext/repo_products.c:325:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:327:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:331:22: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:331:22: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.34/ext/repo_products.c:332:16: acquire_resource: opened here
libsolv-0.7.34/ext/repo_products.c:348:15: danger: ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’ leaks here; was opened at [(28)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/27)
#  346|   	  pd.filename = fullpath;
#  347|   	  pd.basename = entry->d_name;
#  348|-> 	  if (solv_xmlparser_parse(&pd.xmlp, fp) != SOLV_XMLPARSER_OK)
#  349|   	    {
#  350|   	      pool_debug(pd.pool, SOLV_ERROR, "%s: %s at line %u:%u\n", pd.filename, pd.xmlp.errstr, pd.xmlp.line, pd.xmlp.column);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
libsolv-0.7.34/ext/repo_products.c:348:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_products.c:295:1: enter_function: entry to ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:313:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:320:16: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:320:16: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:320:16: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.34/ext/repo_products.c:325:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:327:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:331:22: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:331:22: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.34/ext/repo_products.c:332:16: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_products.c:348:15: danger: ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’ leaks here; was allocated at [(28)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/27)
#  346|   	  pd.filename = fullpath;
#  347|   	  pd.basename = entry->d_name;
#  348|-> 	  if (solv_xmlparser_parse(&pd.xmlp, fp) != SOLV_XMLPARSER_OK)
#  349|   	    {
#  350|   	      pool_debug(pd.pool, SOLV_ERROR, "%s: %s at line %u:%u\n", pd.filename, pd.xmlp.errstr, pd.xmlp.line, pd.xmlp.column);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
libsolv-0.7.34/ext/repo_products.c:395:18: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(<unknown>)’
libsolv-0.7.34/ext/repo_products.c:388:6: branch_true: following ‘true’ branch (when ‘proddir’ is non-NULL)...
libsolv-0.7.34/ext/repo_products.c:390:21: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:390:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_products.c:391:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:394:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:395:18: danger: ‘opendir(<unknown>)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  393|   	  /* assume code11 stype products */
#  394|   	  closedir(dir);
#  395|-> 	  return repo_add_code11_products(repo, proddir, flags);
#  396|   	}
#  397|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
libsolv-0.7.34/ext/repo_products.c:408:14: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(fullpath)’
libsolv-0.7.34/ext/repo_products.c:403:9: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_products.c:404:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:406:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:408:14: danger: ‘opendir(fullpath)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  406|         closedir(dir);
#  407|         /* assume code10 style products */
#  408|->       return repo_add_zyppdb_products(repo, "/var/lib/zypp/db/products", flags);
#  409|       }
#  410|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
libsolv-0.7.34/ext/repo_products.c:419:14: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(fullpath)’
libsolv-0.7.34/ext/repo_products.c:404:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_products.c:413:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_products.c:415:9: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_products.c:416:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:418:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:419:14: danger: ‘opendir(fullpath)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  417|       {
#  418|         closedir(dir);
#  419|->       return repo_add_releasefile_products(repo, "/etc", flags);
#  420|       }
#  421|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
libsolv-0.7.34/ext/repo_products.c:429:7: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(pool_get_rootdir(*repo.pool))’
libsolv-0.7.34/ext/repo_products.c:404:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_products.c:413:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_products.c:416:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_products.c:423:14: branch_false: ...to here
libsolv-0.7.34/ext/repo_products.c:424:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:426:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_products.c:427:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_products.c:429:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_products.c:429:7: danger: ‘opendir(pool_get_rootdir(*repo.pool))’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  427|         if (!dir)
#  428|   	return pool_error(repo->pool, -1, "%s: %s", fullpath, strerror(errno));
#  429|->       closedir(dir);
#  430|       }
#  431|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def107]
libsolv-0.7.34/ext/repo_releasefile_products.c:76:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.34/ext/repo_releasefile_products.c:152:21: acquire_resource: opened here
libsolv-0.7.34/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   74|   	    --ptr1;
#   75|   	  *(++ptr1) = 0;
#   76|-> 	  name = pool_str2id(pool, join2(&pd->jd, "product", ":", buf), 1);
#   77|   
#   78|   	  if (ptr)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
libsolv-0.7.34/ext/repo_releasefile_products.c:76:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.34/ext/repo_releasefile_products.c:152:21: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   74|   	    --ptr1;
#   75|   	  *(++ptr1) = 0;
#   76|-> 	  name = pool_str2id(pool, join2(&pd->jd, "product", ":", buf), 1);
#   77|   
#   78|   	  if (ptr)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def109]
libsolv-0.7.34/ext/repo_releasefile_products.c:93:26: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.34/ext/repo_releasefile_products.c:152:21: acquire_resource: opened here
libsolv-0.7.34/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   91|   		      ++ptr1;
#   92|   		    }
#   93|-> 		  arch = pool_str2id(pool, ptr, 1);
#   94|   		}
#   95|   	    }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
libsolv-0.7.34/ext/repo_releasefile_products.c:93:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.34/ext/repo_releasefile_products.c:152:21: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   91|   		      ++ptr1;
#   92|   		    }
#   93|-> 		  arch = pool_str2id(pool, ptr, 1);
#   94|   		}
#   95|   	    }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
libsolv-0.7.34/ext/repo_releasefile_products.c:143:19: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirpath)’
libsolv-0.7.34/ext/repo_releasefile_products.c:133:9: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:143:19: danger: ‘opendir(dirpath)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  141|     memset(&pd, 0, sizeof(pd));
#  142|     pd.repo = repo;
#  143|->   while ((entry = readdir(dir)))
#  144|       {
#  145|         int len = strlen(entry->d_name);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def112]
libsolv-0.7.34/ext/repo_rpmdb.c:484:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
#  482|   headfree(RpmHead *h)
#  483|   {
#  484|->   headerFree(h);
#  485|   }
#  486|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def113]
libsolv-0.7.34/ext/repo_rpmdb.c:484:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
#  482|   headfree(RpmHead *h)
#  483|   {
#  484|->   headerFree(h);
#  485|   }
#  486|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def114]
libsolv-0.7.34/ext/repo_rpmdb.c:1380:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1378|   {
# 1379|     unsigned int len = 16 * cnt + dsize + pad;
# 1380|->   char *buf = solv_malloc(8 + len);
# 1381|     Header h;
# 1382|     memcpy(buf, lead + 8, 8);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
libsolv-0.7.34/ext/repo_rpmdb.c:1380:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1378|   {
# 1379|     unsigned int len = 16 * cnt + dsize + pad;
# 1380|->   char *buf = solv_malloc(8 + len);
# 1381|     Header h;
# 1382|     memcpy(buf, lead + 8, 8);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def116]
libsolv-0.7.34/ext/repo_rpmdb.c:1385:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1383|     if (fread(buf + 8, len, 1, fp) != 1)
# 1384|       {
# 1385|->       solv_free(buf);
# 1386|         return pool_error(state->pool, 0, "%s: unexpected EOF", name);
# 1387|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
libsolv-0.7.34/ext/repo_rpmdb.c:1385:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1383|     if (fread(buf + 8, len, 1, fp) != 1)
# 1384|       {
# 1385|->       solv_free(buf);
# 1386|         return pool_error(state->pool, 0, "%s: unexpected EOF", name);
# 1387|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def118]
libsolv-0.7.34/ext/repo_rpmdb.c:1386:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1384|       {
# 1385|         solv_free(buf);
# 1386|->       return pool_error(state->pool, 0, "%s: unexpected EOF", name);
# 1387|       }
# 1388|     if (chk1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
libsolv-0.7.34/ext/repo_rpmdb.c:1386:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1384|       {
# 1385|         solv_free(buf);
# 1386|->       return pool_error(state->pool, 0, "%s: unexpected EOF", name);
# 1387|       }
# 1388|     if (chk1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def120]
libsolv-0.7.34/ext/repo_rpmdb.c:1389:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1387|       }
# 1388|     if (chk1)
# 1389|->     solv_chksum_add(chk1, buf + 8, len);
# 1390|     if (chk2)
# 1391|       solv_chksum_add(chk2, buf + 8, len);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
libsolv-0.7.34/ext/repo_rpmdb.c:1389:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1387|       }
# 1388|     if (chk1)
# 1389|->     solv_chksum_add(chk1, buf + 8, len);
# 1390|     if (chk2)
# 1391|       solv_chksum_add(chk2, buf + 8, len);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def122]
libsolv-0.7.34/ext/repo_rpmdb.c:1392:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1390|     if (chk2)
# 1391|       solv_chksum_add(chk2, buf + 8, len);
# 1392|->   h = headerImport(buf, 8 + len - pad, HEADERIMPORT_FAST);
# 1393|     if (!h)
# 1394|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
libsolv-0.7.34/ext/repo_rpmdb.c:1392:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1390|     if (chk2)
# 1391|       solv_chksum_add(chk2, buf + 8, len);
# 1392|->   h = headerImport(buf, 8 + len - pad, HEADERIMPORT_FAST);
# 1393|     if (!h)
# 1394|       {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def124]
libsolv-0.7.34/ext/repo_rpmdb.c:1395:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1393|     if (!h)
# 1394|       {
# 1395|->       solv_free(buf);
# 1396|         return pool_error(state->pool, 0, "%s: headerImport error", name);
# 1397|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
libsolv-0.7.34/ext/repo_rpmdb.c:1395:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1393|     if (!h)
# 1394|       {
# 1395|->       solv_free(buf);
# 1396|         return pool_error(state->pool, 0, "%s: headerImport error", name);
# 1397|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def126]
libsolv-0.7.34/ext/repo_rpmdb.c:1396:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1394|       {
# 1395|         solv_free(buf);
# 1396|->       return pool_error(state->pool, 0, "%s: headerImport error", name);
# 1397|       }
# 1398|     if (state->rpmhead)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
libsolv-0.7.34/ext/repo_rpmdb.c:1396:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2030:12: call_function: calling ‘headfromfp’ from ‘repo_add_rpm’
# 1394|       {
# 1395|         solv_free(buf);
# 1396|->       return pool_error(state->pool, 0, "%s: headerImport error", name);
# 1397|       }
# 1398|     if (state->rpmhead)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def128]
libsolv-0.7.34/ext/repo_rpmdb.c:1971:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1971:50: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1971:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 1969|     if (fstat(fileno(fp), &stb))
# 1970|       {
# 1971|->       pool_error(pool, -1, "fstat: %s", strerror(errno));
# 1972|         fclose(fp);
# 1973|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
libsolv-0.7.34/ext/repo_rpmdb.c:1971:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1971:50: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1971:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
# 1969|     if (fstat(fileno(fp), &stb))
# 1970|       {
# 1971|->       pool_error(pool, -1, "fstat: %s", strerror(errno));
# 1972|         fclose(fp);
# 1973|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def130]
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 1980|     /* process lead */
# 1981|     if (chksumtype)
# 1982|->     chksumh = solv_chksum_create(chksumtype);
# 1983|     if ((flags & RPM_ADD_WITH_LEADSIGID) != 0)
# 1984|       leadsigchksumh = solv_chksum_create(REPOKEY_TYPE_MD5);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
# 1980|     /* process lead */
# 1981|     if (chksumtype)
# 1982|->     chksumh = solv_chksum_create(chksumtype);
# 1983|     if ((flags & RPM_ADD_WITH_LEADSIGID) != 0)
# 1984|       leadsigchksumh = solv_chksum_create(REPOKEY_TYPE_MD5);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def132]
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
# 1982|       chksumh = solv_chksum_create(chksumtype);
# 1983|     if ((flags & RPM_ADD_WITH_LEADSIGID) != 0)
# 1984|->     leadsigchksumh = solv_chksum_create(REPOKEY_TYPE_MD5);
# 1985|     if (fread(lead, 96 + 16, 1, fp) != 1 || getu32(lead) != 0xedabeedb)
# 1986|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
# 1982|       chksumh = solv_chksum_create(chksumtype);
# 1983|     if ((flags & RPM_ADD_WITH_LEADSIGID) != 0)
# 1984|->     leadsigchksumh = solv_chksum_create(REPOKEY_TYPE_MD5);
# 1985|     if (fread(lead, 96 + 16, 1, fp) != 1 || getu32(lead) != 0xedabeedb)
# 1986|       {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def134]
libsolv-0.7.34/ext/repo_rpmdb.c:1987:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1987:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
# 1985|     if (fread(lead, 96 + 16, 1, fp) != 1 || getu32(lead) != 0xedabeedb)
# 1986|       {
# 1987|->       pool_error(pool, -1, "%s: not a rpm", rpm);
# 1988|         solv_chksum_free(leadsigchksumh, 0);
# 1989|         solv_chksum_free(chksumh, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
libsolv-0.7.34/ext/repo_rpmdb.c:1987:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1987:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
# 1985|     if (fread(lead, 96 + 16, 1, fp) != 1 || getu32(lead) != 0xedabeedb)
# 1986|       {
# 1987|->       pool_error(pool, -1, "%s: not a rpm", rpm);
# 1988|         solv_chksum_free(leadsigchksumh, 0);
# 1989|         solv_chksum_free(chksumh, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def136]
libsolv-0.7.34/ext/repo_rpmdb.c:1988:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1988:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
# 1986|       {
# 1987|         pool_error(pool, -1, "%s: not a rpm", rpm);
# 1988|->       solv_chksum_free(leadsigchksumh, 0);
# 1989|         solv_chksum_free(chksumh, 0);
# 1990|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
libsolv-0.7.34/ext/repo_rpmdb.c:1988:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1988:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
# 1986|       {
# 1987|         pool_error(pool, -1, "%s: not a rpm", rpm);
# 1988|->       solv_chksum_free(leadsigchksumh, 0);
# 1989|         solv_chksum_free(chksumh, 0);
# 1990|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def138]
libsolv-0.7.34/ext/repo_rpmdb.c:1989:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1989:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
# 1987|         pool_error(pool, -1, "%s: not a rpm", rpm);
# 1988|         solv_chksum_free(leadsigchksumh, 0);
# 1989|->       solv_chksum_free(chksumh, 0);
# 1990|         fclose(fp);
# 1991|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
libsolv-0.7.34/ext/repo_rpmdb.c:1989:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1989:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
# 1987|         pool_error(pool, -1, "%s: not a rpm", rpm);
# 1988|         solv_chksum_free(leadsigchksumh, 0);
# 1989|->       solv_chksum_free(chksumh, 0);
# 1990|         fclose(fp);
# 1991|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def140]
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/1)
# 1992|       }
# 1993|     if (chksumh)
# 1994|->     solv_chksum_add(chksumh, lead, 96 + 16);
# 1995|     if (leadsigchksumh)
# 1996|       solv_chksum_add(leadsigchksumh, lead, 96 + 16);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1994:5: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/1)
# 1992|       }
# 1993|     if (chksumh)
# 1994|->     solv_chksum_add(chksumh, lead, 96 + 16);
# 1995|     if (leadsigchksumh)
# 1996|       solv_chksum_add(leadsigchksumh, lead, 96 + 16);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def142]
libsolv-0.7.34/ext/repo_rpmdb.c:1996:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_true: following ‘true’ branch (when ‘leadsigchksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1996:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1996:5: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/1)
# 1994|       solv_chksum_add(chksumh, lead, 96 + 16);
# 1995|     if (leadsigchksumh)
# 1996|->     solv_chksum_add(leadsigchksumh, lead, 96 + 16);
# 1997|   
# 1998|     /* process signature header */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
libsolv-0.7.34/ext/repo_rpmdb.c:1996:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_true: following ‘true’ branch (when ‘leadsigchksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1996:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1996:5: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/1)
# 1994|       solv_chksum_add(chksumh, lead, 96 + 16);
# 1995|     if (leadsigchksumh)
# 1996|->     solv_chksum_add(leadsigchksumh, lead, 96 + 16);
# 1997|   
# 1998|     /* process signature header */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def144]
libsolv-0.7.34/ext/repo_rpmdb.c:2001:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2001:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/1)
# 1999|     if (lead[78] != 0 || lead[79] != 5)
# 2000|       {
# 2001|->       pool_error(pool, -1, "%s: not a rpm v5 header", rpm);
# 2002|         solv_chksum_free(leadsigchksumh, 0);
# 2003|         solv_chksum_free(chksumh, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def145]
libsolv-0.7.34/ext/repo_rpmdb.c:2001:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2001:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/1)
# 1999|     if (lead[78] != 0 || lead[79] != 5)
# 2000|       {
# 2001|->       pool_error(pool, -1, "%s: not a rpm v5 header", rpm);
# 2002|         solv_chksum_free(leadsigchksumh, 0);
# 2003|         solv_chksum_free(chksumh, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def146]
libsolv-0.7.34/ext/repo_rpmdb.c:2002:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2002:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/1)
# 2000|       {
# 2001|         pool_error(pool, -1, "%s: not a rpm v5 header", rpm);
# 2002|->       solv_chksum_free(leadsigchksumh, 0);
# 2003|         solv_chksum_free(chksumh, 0);
# 2004|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
libsolv-0.7.34/ext/repo_rpmdb.c:2002:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2002:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/1)
# 2000|       {
# 2001|         pool_error(pool, -1, "%s: not a rpm v5 header", rpm);
# 2002|->       solv_chksum_free(leadsigchksumh, 0);
# 2003|         solv_chksum_free(chksumh, 0);
# 2004|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def148]
libsolv-0.7.34/ext/repo_rpmdb.c:2003:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2003:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/1)
# 2001|         pool_error(pool, -1, "%s: not a rpm v5 header", rpm);
# 2002|         solv_chksum_free(leadsigchksumh, 0);
# 2003|->       solv_chksum_free(chksumh, 0);
# 2004|         fclose(fp);
# 2005|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
libsolv-0.7.34/ext/repo_rpmdb.c:2003:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2003:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/1)
# 2001|         pool_error(pool, -1, "%s: not a rpm v5 header", rpm);
# 2002|         solv_chksum_free(leadsigchksumh, 0);
# 2003|->       solv_chksum_free(chksumh, 0);
# 2004|         fclose(fp);
# 2005|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def150]
libsolv-0.7.34/ext/repo_rpmdb.c:2009:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2009:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2009:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/1)
# 2007|     if (getu32(lead + 96) != 0x8eade801)
# 2008|       {
# 2009|->       pool_error(pool, -1, "%s: bad signature header", rpm);
# 2010|         solv_chksum_free(leadsigchksumh, 0);
# 2011|         solv_chksum_free(chksumh, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
libsolv-0.7.34/ext/repo_rpmdb.c:2009:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2009:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2009:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/1)
# 2007|     if (getu32(lead + 96) != 0x8eade801)
# 2008|       {
# 2009|->       pool_error(pool, -1, "%s: bad signature header", rpm);
# 2010|         solv_chksum_free(leadsigchksumh, 0);
# 2011|         solv_chksum_free(chksumh, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def152]
libsolv-0.7.34/ext/repo_rpmdb.c:2010:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2009:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2010:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/1)
# 2008|       {
# 2009|         pool_error(pool, -1, "%s: bad signature header", rpm);
# 2010|->       solv_chksum_free(leadsigchksumh, 0);
# 2011|         solv_chksum_free(chksumh, 0);
# 2012|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
libsolv-0.7.34/ext/repo_rpmdb.c:2010:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2009:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2010:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/1)
# 2008|       {
# 2009|         pool_error(pool, -1, "%s: bad signature header", rpm);
# 2010|->       solv_chksum_free(leadsigchksumh, 0);
# 2011|         solv_chksum_free(chksumh, 0);
# 2012|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def154]
libsolv-0.7.34/ext/repo_rpmdb.c:2011:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2009:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2011:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/1)
# 2009|         pool_error(pool, -1, "%s: bad signature header", rpm);
# 2010|         solv_chksum_free(leadsigchksumh, 0);
# 2011|->       solv_chksum_free(chksumh, 0);
# 2012|         fclose(fp);
# 2013|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
libsolv-0.7.34/ext/repo_rpmdb.c:2011:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2009:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2011:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/1)
# 2009|         pool_error(pool, -1, "%s: bad signature header", rpm);
# 2010|         solv_chksum_free(leadsigchksumh, 0);
# 2011|->       solv_chksum_free(chksumh, 0);
# 2012|         fclose(fp);
# 2013|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def156]
libsolv-0.7.34/ext/repo_rpmdb.c:2019:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2019:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2019:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/1)
# 2017|     if (sigcnt >= MAX_SIG_CNT || sigdsize >= MAX_SIG_DSIZE)
# 2018|       {
# 2019|->       pool_error(pool, -1, "%s: bad signature header", rpm);
# 2020|         solv_chksum_free(leadsigchksumh, 0);
# 2021|         solv_chksum_free(chksumh, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
libsolv-0.7.34/ext/repo_rpmdb.c:2019:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2019:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2019:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/1)
# 2017|     if (sigcnt >= MAX_SIG_CNT || sigdsize >= MAX_SIG_DSIZE)
# 2018|       {
# 2019|->       pool_error(pool, -1, "%s: bad signature header", rpm);
# 2020|         solv_chksum_free(leadsigchksumh, 0);
# 2021|         solv_chksum_free(chksumh, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def158]
libsolv-0.7.34/ext/repo_rpmdb.c:2020:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2019:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2020:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/1)
# 2018|       {
# 2019|         pool_error(pool, -1, "%s: bad signature header", rpm);
# 2020|->       solv_chksum_free(leadsigchksumh, 0);
# 2021|         solv_chksum_free(chksumh, 0);
# 2022|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
libsolv-0.7.34/ext/repo_rpmdb.c:2020:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2019:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2020:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/1)
# 2018|       {
# 2019|         pool_error(pool, -1, "%s: bad signature header", rpm);
# 2020|->       solv_chksum_free(leadsigchksumh, 0);
# 2021|         solv_chksum_free(chksumh, 0);
# 2022|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def160]
libsolv-0.7.34/ext/repo_rpmdb.c:2021:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2019:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2021:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/1)
# 2019|         pool_error(pool, -1, "%s: bad signature header", rpm);
# 2020|         solv_chksum_free(leadsigchksumh, 0);
# 2021|->       solv_chksum_free(chksumh, 0);
# 2022|         fclose(fp);
# 2023|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
libsolv-0.7.34/ext/repo_rpmdb.c:2021:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2019:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2021:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/1)
# 2019|         pool_error(pool, -1, "%s: bad signature header", rpm);
# 2020|         solv_chksum_free(leadsigchksumh, 0);
# 2021|->       solv_chksum_free(chksumh, 0);
# 2022|         fclose(fp);
# 2023|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def162]
libsolv-0.7.34/ext/repo_rpmdb.c:2078:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_true: following ‘true’ branch (when ‘len != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2075:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2076:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2078:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2078:15: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/1)
# 2076|   	  if (fread(lead, l, 1, fp) != 1)
# 2077|   	    {
# 2078|-> 	      pool_error(pool, -1, "%s: unexpected EOF", rpm);
# 2079|   	      solv_chksum_free(leadsigchksumh, 0);
# 2080|   	      solv_chksum_free(chksumh, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def163]
libsolv-0.7.34/ext/repo_rpmdb.c:2078:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_true: following ‘true’ branch (when ‘len != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2075:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2076:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2078:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2078:15: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/1)
# 2076|   	  if (fread(lead, l, 1, fp) != 1)
# 2077|   	    {
# 2078|-> 	      pool_error(pool, -1, "%s: unexpected EOF", rpm);
# 2079|   	      solv_chksum_free(leadsigchksumh, 0);
# 2080|   	      solv_chksum_free(chksumh, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def164]
libsolv-0.7.34/ext/repo_rpmdb.c:2079:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_true: following ‘true’ branch (when ‘len != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2075:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2076:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2078:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2079:15: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/1)
# 2077|   	    {
# 2078|   	      pool_error(pool, -1, "%s: unexpected EOF", rpm);
# 2079|-> 	      solv_chksum_free(leadsigchksumh, 0);
# 2080|   	      solv_chksum_free(chksumh, 0);
# 2081|   	      fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
libsolv-0.7.34/ext/repo_rpmdb.c:2079:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_true: following ‘true’ branch (when ‘len != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2075:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2076:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2078:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2079:15: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/1)
# 2077|   	    {
# 2078|   	      pool_error(pool, -1, "%s: unexpected EOF", rpm);
# 2079|-> 	      solv_chksum_free(leadsigchksumh, 0);
# 2080|   	      solv_chksum_free(chksumh, 0);
# 2081|   	      fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def166]
libsolv-0.7.34/ext/repo_rpmdb.c:2080:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_true: following ‘true’ branch (when ‘len != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2075:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2076:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2078:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2080:15: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/1)
# 2078|   	      pool_error(pool, -1, "%s: unexpected EOF", rpm);
# 2079|   	      solv_chksum_free(leadsigchksumh, 0);
# 2080|-> 	      solv_chksum_free(chksumh, 0);
# 2081|   	      fclose(fp);
# 2082|   	      return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
libsolv-0.7.34/ext/repo_rpmdb.c:2080:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_true: following ‘true’ branch (when ‘len != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2075:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2076:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2078:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2080:15: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/1)
# 2078|   	      pool_error(pool, -1, "%s: unexpected EOF", rpm);
# 2079|   	      solv_chksum_free(leadsigchksumh, 0);
# 2080|-> 	      solv_chksum_free(chksumh, 0);
# 2081|   	      fclose(fp);
# 2082|   	      return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def168]
libsolv-0.7.34/ext/repo_rpmdb.c:2085:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_true: following ‘true’ branch (when ‘len != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2075:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2076:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2084:14: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2084:14: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2085:13: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2085:13: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/1)
# 2083|   	    }
# 2084|   	  if (chksumh)
# 2085|-> 	    solv_chksum_add(chksumh, lead, l);
# 2086|   	  if (leadsigchksumh)
# 2087|   	    solv_chksum_add(leadsigchksumh, lead, l);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
libsolv-0.7.34/ext/repo_rpmdb.c:2085:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_true: following ‘true’ branch (when ‘len != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2075:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2076:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2084:14: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2084:14: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2085:13: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2085:13: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/1)
# 2083|   	    }
# 2084|   	  if (chksumh)
# 2085|-> 	    solv_chksum_add(chksumh, lead, l);
# 2086|   	  if (leadsigchksumh)
# 2087|   	    solv_chksum_add(leadsigchksumh, lead, l);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def170]
libsolv-0.7.34/ext/repo_rpmdb.c:2087:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_true: following ‘true’ branch (when ‘len != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2075:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2076:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2084:14: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2084:14: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2086:14: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2086:14: branch_true: following ‘true’ branch (when ‘leadsigchksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2087:13: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2087:13: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/1)
# 2085|   	    solv_chksum_add(chksumh, lead, l);
# 2086|   	  if (leadsigchksumh)
# 2087|-> 	    solv_chksum_add(leadsigchksumh, lead, l);
# 2088|   	  len -= l;
# 2089|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def171]
libsolv-0.7.34/ext/repo_rpmdb.c:2087:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_true: following ‘true’ branch (when ‘len != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2075:11: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2076:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2084:14: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2084:14: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2086:14: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2086:14: branch_true: following ‘true’ branch (when ‘leadsigchksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2087:13: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2087:13: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/1)
# 2085|   	    solv_chksum_add(chksumh, lead, l);
# 2086|   	  if (leadsigchksumh)
# 2087|-> 	    solv_chksum_add(leadsigchksumh, lead, l);
# 2088|   	  len -= l;
# 2089|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def172]
libsolv-0.7.34/ext/repo_rpmdb.c:2093:24: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_true: following ‘true’ branch (when ‘leadsigchksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2093:24: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2093:24: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/1)
# 2091|     if (leadsigchksumh)
# 2092|       {
# 2093|->       leadsigchksumh = solv_chksum_free(leadsigchksumh, leadsigid);
# 2094|         leadsigidtype = REPOKEY_TYPE_MD5;
# 2095|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
libsolv-0.7.34/ext/repo_rpmdb.c:2093:24: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_true: following ‘true’ branch (when ‘leadsigchksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2093:24: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2093:24: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/1)
# 2091|     if (leadsigchksumh)
# 2092|       {
# 2093|->       leadsigchksumh = solv_chksum_free(leadsigchksumh, leadsigid);
# 2094|         leadsigidtype = REPOKEY_TYPE_MD5;
# 2095|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def174]
libsolv-0.7.34/ext/repo_rpmdb.c:2100:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2098:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2100:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2100:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/62/codeFlows/0/threadFlows/0/locations/1)
# 2098|     if (fread(lead, 16, 1, fp) != 1)
# 2099|       {
# 2100|->       pool_error(pool, -1, "%s: unexpected EOF", rpm);
# 2101|         solv_chksum_free(chksumh, 0);
# 2102|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def175]
libsolv-0.7.34/ext/repo_rpmdb.c:2100:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2098:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2100:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2100:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/63/codeFlows/0/threadFlows/0/locations/1)
# 2098|     if (fread(lead, 16, 1, fp) != 1)
# 2099|       {
# 2100|->       pool_error(pool, -1, "%s: unexpected EOF", rpm);
# 2101|         solv_chksum_free(chksumh, 0);
# 2102|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def176]
libsolv-0.7.34/ext/repo_rpmdb.c:2101:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2098:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2100:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2101:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/64/codeFlows/0/threadFlows/0/locations/1)
# 2099|       {
# 2100|         pool_error(pool, -1, "%s: unexpected EOF", rpm);
# 2101|->       solv_chksum_free(chksumh, 0);
# 2102|         fclose(fp);
# 2103|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
libsolv-0.7.34/ext/repo_rpmdb.c:2101:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2098:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2100:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2101:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/65/codeFlows/0/threadFlows/0/locations/1)
# 2099|       {
# 2100|         pool_error(pool, -1, "%s: unexpected EOF", rpm);
# 2101|->       solv_chksum_free(chksumh, 0);
# 2102|         fclose(fp);
# 2103|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def178]
libsolv-0.7.34/ext/repo_rpmdb.c:2106:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2098:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2106:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2106:5: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/1)
# 2104|       }
# 2105|     if (chksumh)
# 2106|->     solv_chksum_add(chksumh, lead, 16);
# 2107|     if (getu32(lead) != 0x8eade801)
# 2108|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
libsolv-0.7.34/ext/repo_rpmdb.c:2106:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1995:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:1999:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: following ‘false’ branch (when ‘leadsigchksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2098:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_true: following ‘true’ branch (when ‘chksumh’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2106:5: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2106:5: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/1)
# 2104|       }
# 2105|     if (chksumh)
# 2106|->     solv_chksum_add(chksumh, lead, 16);
# 2107|     if (getu32(lead) != 0x8eade801)
# 2108|       {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def180]
libsolv-0.7.34/ext/repo_rpmdb.c:2109:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2107:7: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2107:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2109:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2109:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/1)
# 2107|     if (getu32(lead) != 0x8eade801)
# 2108|       {
# 2109|->       pool_error(pool, -1, "%s: bad header", rpm);
# 2110|         solv_chksum_free(chksumh, 0);
# 2111|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
libsolv-0.7.34/ext/repo_rpmdb.c:2109:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2107:7: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2107:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2109:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2109:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/1)
# 2107|     if (getu32(lead) != 0x8eade801)
# 2108|       {
# 2109|->       pool_error(pool, -1, "%s: bad header", rpm);
# 2110|         solv_chksum_free(chksumh, 0);
# 2111|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def182]
libsolv-0.7.34/ext/repo_rpmdb.c:2110:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2107:7: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2107:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2109:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2110:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/1)
# 2108|       {
# 2109|         pool_error(pool, -1, "%s: bad header", rpm);
# 2110|->       solv_chksum_free(chksumh, 0);
# 2111|         fclose(fp);
# 2112|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def183]
libsolv-0.7.34/ext/repo_rpmdb.c:2110:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2107:7: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2107:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2109:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2110:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/1)
# 2108|       {
# 2109|         pool_error(pool, -1, "%s: bad header", rpm);
# 2110|->       solv_chksum_free(chksumh, 0);
# 2111|         fclose(fp);
# 2112|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def184]
libsolv-0.7.34/ext/repo_rpmdb.c:2118:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2107:7: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2107:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2114:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2116:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2118:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2118:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/72/codeFlows/0/threadFlows/0/locations/1)
# 2116|     if (sigcnt >= MAX_HDR_CNT || sigdsize >= MAX_HDR_DSIZE)
# 2117|       {
# 2118|->       pool_error(pool, -1, "%s: bad header", rpm);
# 2119|         solv_chksum_free(chksumh, 0);
# 2120|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
libsolv-0.7.34/ext/repo_rpmdb.c:2118:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2107:7: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2107:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2114:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2116:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2118:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2118:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/73/codeFlows/0/threadFlows/0/locations/1)
# 2116|     if (sigcnt >= MAX_HDR_CNT || sigdsize >= MAX_HDR_DSIZE)
# 2117|       {
# 2118|->       pool_error(pool, -1, "%s: bad header", rpm);
# 2119|         solv_chksum_free(chksumh, 0);
# 2120|         fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def186]
libsolv-0.7.34/ext/repo_rpmdb.c:2119:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2107:7: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2107:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2114:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2116:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2118:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2119:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/74/codeFlows/0/threadFlows/0/locations/1)
# 2117|       {
# 2118|         pool_error(pool, -1, "%s: bad header", rpm);
# 2119|->       solv_chksum_free(chksumh, 0);
# 2120|         fclose(fp);
# 2121|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
libsolv-0.7.34/ext/repo_rpmdb.c:2119:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.34/ext/repo_rpmdb.c:1935:1: enter_function: entry to ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1983:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1984:22: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1985:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1985:43: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:1985:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:1993:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:1999:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2007:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2015:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2017:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2025:12: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2028:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2072:26: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2073:14: branch_false: following ‘false’ branch (when ‘len == 0’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2091:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2098:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2105:6: branch_false: following ‘false’ branch (when ‘chksumh’ is NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2107:7: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2107:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2114:12: call_function: inlined call to ‘getu32’ from ‘repo_add_rpm’
libsolv-0.7.34/ext/repo_rpmdb.c:2116:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2118:7: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2119:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/75/codeFlows/0/threadFlows/0/locations/1)
# 2117|       {
# 2118|         pool_error(pool, -1, "%s: bad header", rpm);
# 2119|->       solv_chksum_free(chksumh, 0);
# 2120|         fclose(fp);
# 2121|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def188]
libsolv-0.7.34/ext/repo_rpmdb.c:2346:11: warning[-Wanalyzer-null-argument]: use of NULL ‘space’ where non-null expected
libsolv-0.7.34/ext/repo_rpmdb.c:2232:1: enter_function: entry to ‘rpm_iterate_filelist’
libsolv-0.7.34/ext/repo_rpmdb.c:2252:8: call_function: inlined call to ‘headstringarray’ from ‘rpm_iterate_filelist’
libsolv-0.7.34/ext/repo_rpmdb.c:2252:8: call_function: inlined call to ‘headstringarray’ from ‘rpm_iterate_filelist’
libsolv-0.7.34/ext/repo_rpmdb.c:2253:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2255:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2255:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2262:8: call_function: inlined call to ‘headstringarray’ from ‘rpm_iterate_filelist’
libsolv-0.7.34/ext/repo_rpmdb.c:2262:8: call_function: inlined call to ‘headstringarray’ from ‘rpm_iterate_filelist’
libsolv-0.7.34/ext/repo_rpmdb.c:2263:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2268:8: call_function: inlined call to ‘headint32array’ from ‘rpm_iterate_filelist’
libsolv-0.7.34/ext/repo_rpmdb.c:2268:8: call_function: inlined call to ‘headint32array’ from ‘rpm_iterate_filelist’
libsolv-0.7.34/ext/repo_rpmdb.c:2269:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2276:8: call_function: inlined call to ‘headint16array’ from ‘rpm_iterate_filelist’
libsolv-0.7.34/ext/repo_rpmdb.c:2277:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2285:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2298:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2298:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2300:12: call_function: inlined call to ‘headint32array’ from ‘rpm_iterate_filelist’
libsolv-0.7.34/ext/repo_rpmdb.c:2300:12: call_function: inlined call to ‘headint32array’ from ‘rpm_iterate_filelist’
libsolv-0.7.34/ext/repo_rpmdb.c:2301:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2301:17: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2301:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2312:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2312:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2314:12: call_function: inlined call to ‘headint32array’ from ‘rpm_iterate_filelist’
libsolv-0.7.34/ext/repo_rpmdb.c:2314:12: call_function: inlined call to ‘headint32array’ from ‘rpm_iterate_filelist’
libsolv-0.7.34/ext/repo_rpmdb.c:2315:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2330:15: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2332:10: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2332:10: branch_true: following ‘true’ branch (when ‘ff’ is non-NULL)...
libsolv-0.7.34/ext/repo_rpmdb.c:2332:20: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2332:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_rpmdb.c:2334:17: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2335:10: branch_false: following ‘false’ branch (when ‘lastdir > diidx’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2337:7: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2337:7: branch_true: following ‘true’ branch (when ‘lastdir != diidx’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2337:51: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2339:10: branch_false: following ‘false’ branch (when ‘spacen >= l’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2344:10: branch_false: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2344:10: branch_true: following ‘true’ branch (when ‘lastdir != diidx’)...
libsolv-0.7.34/ext/repo_rpmdb.c:2346:27: branch_true: ...to here
libsolv-0.7.34/ext/repo_rpmdb.c:2346:11: danger: argument 1 (‘space’) NULL where non-null expected
#argument 1 of ‘__builtin_strcpy’ must be non-null
# 2344|         if (lastdir != diidx)
# 2345|   	{
# 2346|->           strcpy(space, dn[diidx]);
# 2347|   	  lastdir = diidx;
# 2348|   	  lastdirl = l1;

Error: CPPCHECK_WARNING (CWE-786): [#def189]
libsolv-0.7.34/ext/repo_testcase.c:624: error[negativeIndex]: Array 'sp[5]' accessed at index sp[*][-1], which is out of bounds.
#  622|   	  /* join back version and release */
#  623|   	  if (sp[2] && !(sp[2][0] == '-' && !sp[2][1]))
#  624|-> 	    sp[2][-1] = '-';
#  625|   	  s->evr = pool_str2id(pool, sp[1], 1);
#  626|   	  s->arch = strcmp(sp[3], "-") ? pool_str2id(pool, sp[3], 1) : 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
libsolv-0.7.34/ext/repo_zyppdb.c:170:23: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirpath)’
libsolv-0.7.34/ext/repo_zyppdb.c:167:9: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_zyppdb.c:168:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_zyppdb.c:170:23: danger: ‘opendir(dirpath)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  168|     if (dir)
#  169|       {
#  170|->       while ((entry = readdir(dir)))
#  171|   	{
#  172|   	  if (entry->d_name[0] == '.')

Error: GCC_ANALYZER_WARNING (CWE-775): [#def191]
libsolv-0.7.34/ext/repo_zyppdb.c:181:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_zyppdb.c:149:1: enter_function: entry to ‘repo_add_zyppdb_products’
libsolv-0.7.34/ext/repo_zyppdb.c:168:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_zyppdb.c:170:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_zyppdb.c:172:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_zyppdb.c:174:22: call_function: calling ‘join2’ from ‘repo_add_zyppdb_products’
libsolv-0.7.34/ext/repo_zyppdb.c:174:22: return_function: returning to ‘repo_add_zyppdb_products’ from ‘join2’
libsolv-0.7.34/ext/repo_zyppdb.c:175:21: acquire_resource: opened here
libsolv-0.7.34/ext/repo_zyppdb.c:181:15: danger: ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’ leaks here; was opened at [(17)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/16)
#  179|   	    }
#  180|             pd.filename = entry->d_name;
#  181|-> 	  if (solv_xmlparser_parse(&pd.xmlp, fp) != SOLV_XMLPARSER_OK)
#  182|   	    {
#  183|   	      pool_debug(pd.pool, SOLV_ERROR, "repo_zyppdb: %s: %s at line %u:%u\n", pd.filename, pd.xmlp.errstr, pd.xmlp.line, pd.xmlp.column);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
libsolv-0.7.34/ext/repo_zyppdb.c:181:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_zyppdb.c:149:1: enter_function: entry to ‘repo_add_zyppdb_products’
libsolv-0.7.34/ext/repo_zyppdb.c:168:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_zyppdb.c:170:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_zyppdb.c:172:15: branch_true: ...to here
libsolv-0.7.34/ext/repo_zyppdb.c:174:22: call_function: calling ‘join2’ from ‘repo_add_zyppdb_products’
libsolv-0.7.34/ext/repo_zyppdb.c:174:22: return_function: returning to ‘repo_add_zyppdb_products’ from ‘join2’
libsolv-0.7.34/ext/repo_zyppdb.c:175:21: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_zyppdb.c:181:15: danger: ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’ leaks here; was allocated at [(17)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/16)
#  179|   	    }
#  180|             pd.filename = entry->d_name;
#  181|-> 	  if (solv_xmlparser_parse(&pd.xmlp, fp) != SOLV_XMLPARSER_OK)
#  182|   	    {
#  183|   	      pool_debug(pd.pool, SOLV_ERROR, "repo_zyppdb: %s: %s at line %u:%u\n", pd.filename, pd.xmlp.errstr, pd.xmlp.line, pd.xmlp.column);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def193]
libsolv-0.7.34/ext/repo_zyppdb.c:189:3: warning[-Wanalyzer-null-argument]: use of NULL ‘opendir(dirpath)’ where non-null expected
libsolv-0.7.34/ext/repo_zyppdb.c:167:9: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_zyppdb.c:168:6: release_memory: assuming ‘opendir(dirpath)’ is NULL
libsolv-0.7.34/ext/repo_zyppdb.c:168:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_zyppdb.c:189:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_zyppdb.c:189:3: danger: argument 1 (‘opendir(dirpath)’) NULL where non-null expected
#  187|   	}
#  188|       }
#  189|->   closedir(dir);
#  190|   
#  191|     solv_xmlparser_free(&pd.xmlp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def194]
libsolv-0.7.34/ext/solv_xfopen.c:563:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libsolv-0.7.34/ext/solv_xfopen.c:552:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/solv_xfopen.c:554:6: branch_false: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:554:6: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
libsolv-0.7.34/ext/solv_xfopen.c:556:11: branch_true: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:556:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/solv_xfopen.c:557:14: branch_true: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:557:14: acquire_resource: opened here
libsolv-0.7.34/ext/solv_xfopen.c:560:10: branch_false: following ‘false’ branch (when ‘fd != -1’)...
libsolv-0.7.34/ext/solv_xfopen.c:563:7: branch_false: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:563:7: danger: ‘fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  561|   	return 0;
#  562|       }
#  563|->   f = zck_create();
#  564|     if (!f)
#  565|       {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def195]
libsolv-0.7.34/ext/solv_xfopen.c:567:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libsolv-0.7.34/ext/solv_xfopen.c:552:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/solv_xfopen.c:554:6: branch_false: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:554:6: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
libsolv-0.7.34/ext/solv_xfopen.c:556:11: branch_true: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:556:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/solv_xfopen.c:557:14: branch_true: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:557:14: acquire_resource: opened here
libsolv-0.7.34/ext/solv_xfopen.c:560:10: branch_false: following ‘false’ branch (when ‘fd != -1’)...
libsolv-0.7.34/ext/solv_xfopen.c:563:7: branch_false: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:564:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/solv_xfopen.c:566:10: branch_true: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:566:10: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
libsolv-0.7.34/ext/solv_xfopen.c:567:9: branch_true: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:567:9: danger: ‘fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  565|       {
#  566|         if (path)
#  567|-> 	close(fd);
#  568|         return 0;
#  569|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def196]
libsolv-0.7.34/ext/solv_xfopen.c:572:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libsolv-0.7.34/ext/solv_xfopen.c:552:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/solv_xfopen.c:554:6: branch_false: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:554:6: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
libsolv-0.7.34/ext/solv_xfopen.c:556:11: branch_true: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:556:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/solv_xfopen.c:557:14: branch_true: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:557:14: acquire_resource: opened here
libsolv-0.7.34/ext/solv_xfopen.c:560:10: branch_false: following ‘false’ branch (when ‘fd != -1’)...
libsolv-0.7.34/ext/solv_xfopen.c:563:7: branch_false: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:564:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/solv_xfopen.c:570:7: branch_false: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:570:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/solv_xfopen.c:572:11: branch_true: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:572:11: danger: ‘fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  570|     if (*mode != 'w')
#  571|       {
#  572|->       if(!zck_init_read(f, fd))
#  573|   	{
#  574|   	  zck_free(&f);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def197]
libsolv-0.7.34/ext/solv_xfopen.c:582:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libsolv-0.7.34/ext/solv_xfopen.c:552:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/solv_xfopen.c:554:6: branch_false: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:554:6: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
libsolv-0.7.34/ext/solv_xfopen.c:556:11: branch_true: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:556:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/solv_xfopen.c:557:14: branch_true: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:557:14: acquire_resource: opened here
libsolv-0.7.34/ext/solv_xfopen.c:560:10: branch_false: following ‘false’ branch (when ‘fd != -1’)...
libsolv-0.7.34/ext/solv_xfopen.c:563:7: branch_false: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:564:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/solv_xfopen.c:570:7: branch_false: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:570:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/solv_xfopen.c:582:11: branch_false: ...to here
libsolv-0.7.34/ext/solv_xfopen.c:582:11: danger: ‘fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  580|      else
#  581|       {
#  582|->       if(!zck_init_write(f, fd))
#  583|   	{
#  584|   	  zck_free(&f);

Error: COMPILER_WARNING (CWE-704): [#def198]
libsolv-0.7.34/ext/solv_xmlparser.c: scope_hint: In function ‘parse_block’
libsolv-0.7.34/ext/solv_xmlparser.c:282:25: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  282 |       xmlErrorPtr err = xmlCtxtGetLastError(xmlp->parser);
#      |                         ^~~~~~~~~~~~~~~~~~~
#  280|     if (xmlParseChunk(xmlp->parser, buf, l, l == 0 ? 1 : 0))
#  281|       {
#  282|->       xmlErrorPtr err = xmlCtxtGetLastError(xmlp->parser);
#  283|         set_error(xmlp, err->message, err->line, err->int2);
#  284|         return 0;

Error: COMPILER_WARNING (CWE-704): [#def199]
libsolv-0.7.34/ext/solv_xmlparser.c:282:25: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  280|     if (xmlParseChunk(xmlp->parser, buf, l, l == 0 ? 1 : 0))
#  281|       {
#  282|->       xmlErrorPtr err = xmlCtxtGetLastError(xmlp->parser);
#  283|         set_error(xmlp, err->message, err->line, err->int2);
#  284|         return 0;

Error: CPPCHECK_WARNING (CWE-758): [#def200]
libsolv-0.7.34/ext/testcase.c:1905: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1903|       }
# 1904|   
# 1905|->   if ((resultflags & ~TESTCASE_RESULT_REUSE_SOLVER) != 0)
# 1906|       {
# 1907|         cmd = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def201]
libsolv-0.7.34/ext/testcase.c:2175:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.34/ext/testcase.c:2170:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.34/ext/testcase.c:2170:21: branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2170:21: acquire_resource: opened here
libsolv-0.7.34/ext/testcase.c:2170:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2175:17: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2175:17: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 2173|         return 0;
# 2174|       }
# 2175|->   testcasedir = solv_strdup(testcase);
# 2176|     s = strrchr(testcasedir, '/');
# 2177|   #ifdef _WIN32

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
libsolv-0.7.34/ext/testcase.c:2175:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/ext/testcase.c:2170:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.34/ext/testcase.c:2170:21: branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2170:21: acquire_memory: allocated here
libsolv-0.7.34/ext/testcase.c:2170:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2175:17: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2175:17: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 2173|         return 0;
# 2174|       }
# 2175|->   testcasedir = solv_strdup(testcase);
# 2176|     s = strrchr(testcasedir, '/');
# 2177|   #ifdef _WIN32

Error: GCC_ANALYZER_WARNING (CWE-775): [#def203]
libsolv-0.7.34/ext/testcase.c:2187:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.34/ext/testcase.c:2170:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.34/ext/testcase.c:2170:21: branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2170:21: acquire_resource: opened here
libsolv-0.7.34/ext/testcase.c:2170:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2175:17: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2187:9: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 2185|       *testcasedir = 0;
# 2186|     bufl = 1024;
# 2187|->   buf = solv_malloc(bufl);
# 2188|     bufp = buf;
# 2189|     solv = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def204]
libsolv-0.7.34/ext/testcase.c:2187:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/ext/testcase.c:2170:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.34/ext/testcase.c:2170:21: branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2170:21: acquire_memory: allocated here
libsolv-0.7.34/ext/testcase.c:2170:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2175:17: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2187:9: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 2185|       *testcasedir = 0;
# 2186|     bufl = 1024;
# 2187|->   buf = solv_malloc(bufl);
# 2188|     bufp = buf;
# 2189|     solv = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def205]
libsolv-0.7.34/ext/testcase.c:2190:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.34/ext/testcase.c:2170:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.34/ext/testcase.c:2170:21: branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2170:21: acquire_resource: opened here
libsolv-0.7.34/ext/testcase.c:2170:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2175:17: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2190:3: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 2188|     bufp = buf;
# 2189|     solv = 0;
# 2190|->   queue_init(&autoinstq);
# 2191|     for (;;)
# 2192|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def206]
libsolv-0.7.34/ext/testcase.c:2190:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/ext/testcase.c:2170:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.34/ext/testcase.c:2170:21: branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2170:21: acquire_memory: allocated here
libsolv-0.7.34/ext/testcase.c:2170:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2175:17: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2190:3: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 2188|     bufp = buf;
# 2189|     solv = 0;
# 2190|->   queue_init(&autoinstq);
# 2191|     for (;;)
# 2192|       {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def207]
libsolv-0.7.34/ext/testcase.c:2196:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.34/ext/testcase.c:2170:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.34/ext/testcase.c:2170:21: branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2170:21: acquire_resource: opened here
libsolv-0.7.34/ext/testcase.c:2170:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2175:17: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2193:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/testcase.c:2195:11: branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2196:17: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 2194|   	{
# 2195|   	  bufl = bufp - buf;
# 2196|-> 	  buf = solv_realloc(buf, bufl + 512);
# 2197|   	  bufp = buf + bufl;
# 2198|             bufl += 512;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
libsolv-0.7.34/ext/testcase.c:2196:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/ext/testcase.c:2170:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.34/ext/testcase.c:2170:21: branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2170:21: acquire_memory: allocated here
libsolv-0.7.34/ext/testcase.c:2170:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2175:17: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2193:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/testcase.c:2195:11: branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2196:17: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
# 2194|   	{
# 2195|   	  bufl = bufp - buf;
# 2196|-> 	  buf = solv_realloc(buf, bufl + 512);
# 2197|   	  bufp = buf + bufl;
# 2198|             bufl += 512;

Error: CPPCHECK_WARNING (CWE-758): [#def209]
libsolv-0.7.34/ext/testcase.c:2503: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 2501|   	{
# 2502|   	  if (npieces == 2 && resultflagsp && !strcmp(pieces[1], "reusesolver"))
# 2503|-> 	    *resultflagsp |= TESTCASE_RESULT_REUSE_SOLVER;
# 2504|   	  break;
# 2505|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def210]
libsolv-0.7.34/ext/tools_util.h:21:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.34/ext/repo_releasefile_products.c:152:21: acquire_resource: opened here
libsolv-0.7.34/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   19|     if (!strncmp(s, "0:", 2) && s[2])
#   20|       s += 2;
#   21|->   return pool_str2id(pool, s, 1);
#   22|   }
#   23|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
libsolv-0.7.34/ext/tools_util.h:21:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.34/ext/repo_releasefile_products.c:152:21: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   19|     if (!strncmp(s, "0:", 2) && s[2])
#   20|       s += 2;
#   21|->   return pool_str2id(pool, s, 1);
#   22|   }
#   23|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def212]
libsolv-0.7.34/ext/tools_util.h:72:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.34/ext/repo_releasefile_products.c:152:21: acquire_resource: opened here
libsolv-0.7.34/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   70|       {
#   71|         jd->tmpl = l + 256;
#   72|->       jd->tmp = solv_realloc(jd->tmp, jd->tmpl);
#   73|       }
#   74|     p = jd->tmp;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def213]
libsolv-0.7.34/ext/tools_util.h:72:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.34/ext/repo_releasefile_products.c:152:21: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   70|       {
#   71|         jd->tmpl = l + 256;
#   72|->       jd->tmp = solv_realloc(jd->tmp, jd->tmpl);
#   73|       }
#   74|     p = jd->tmp;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
libsolv-0.7.34/ext/tools_util.h:72:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirpath)’
libsolv-0.7.34/ext/repo_products.c:295:1: enter_function: entry to ‘repo_add_code11_products’
libsolv-0.7.34/ext/repo_products.c:312:9: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_products.c:313:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_products.c:320:16: branch_true: ...to here
libsolv-0.7.34/ext/repo_products.c:320:16: call_function: calling ‘join2’ from ‘repo_add_code11_products’
#   70|       {
#   71|         jd->tmpl = l + 256;
#   72|->       jd->tmp = solv_realloc(jd->tmp, jd->tmpl);
#   73|       }
#   74|     p = jd->tmp;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def215]
libsolv-0.7.34/ext/tools_util.h:77:7: warning[-Wanalyzer-null-argument]: use of NULL ‘p’ where non-null expected
libsolv-0.7.34/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#   75|     if (s1)
#   76|       {
#   77|->       strcpy(p, s1);
#   78|         p += strlen(s1);
#   79|       }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def216]
libsolv-0.7.34/ext/tools_util.h:82:7: warning[-Wanalyzer-null-argument]: use of NULL ‘p’ where non-null expected
libsolv-0.7.34/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.34/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.34/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#   80|     if (s2)
#   81|       {
#   82|->       strcpy(p, s2);
#   83|         p += strlen(s2);
#   84|       }

Error: CPPCHECK_WARNING (CWE-476): [#def217]
libsolv-0.7.34/redhat-linux-build/bindings/perl/solv_perl.c:1450: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mg->mg_virtual
# 1448|     mg = mg_find(sv,'U');
# 1449|     mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
# 1450|->   mg->mg_virtual->svt_get = (SwigMagicFunc) get;
# 1451|     mg->mg_virtual->svt_set = (SwigMagicFunc) set;
# 1452|     mg->mg_virtual->svt_len = 0;

Error: CPPCHECK_WARNING (CWE-758): [#def218]
libsolv-0.7.34/redhat-linux-build/bindings/perl/solv_perl.c:24977: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#24975|     /*@SWIG:/usr/share/swig/4.4.0/perl5/perltypemaps.swg,67,%set_constant@*/ do {
#24976|       SV *sv = get_sv((char*) SWIG_prefix "Selection_SELECTION_FILTER_SWAPPED", TRUE | 0x2 | GV_ADDMULTI);
#24977|->     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(SELECTION_FILTER_SWAPPED)));
#24978|       SvREADONLY_on(sv);
#24979|     } while(0) /*@SWIG@*/;

Error: CPPCHECK_WARNING (CWE-457): [#def219]
libsolv-0.7.34/redhat-linux-build/bindings/python/solv_python.c:875: warning[uninitvar]: Uninitialized variable: buff
#  873|       *r = 0;
#  874|     }
#  875|->   return buff;
#  876|   }
#  877|   

Error: CPPCHECK_WARNING (CWE-476): [#def220]
libsolv-0.7.34/redhat-linux-build/bindings/python/solv_python.c:1904: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1902|       SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
# 1903|       /* the klass element */
# 1904|->     data->klass = obj;
# 1905|       SWIG_Py_INCREF(data->klass);
# 1906|       /* the newraw method and newargs arguments used to create a new raw instance */

Error: CPPCHECK_WARNING (CWE-476): [#def221]
libsolv-0.7.34/redhat-linux-build/bindings/python/solv_python.c:1905: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1903|       /* the klass element */
# 1904|       data->klass = obj;
# 1905|->     SWIG_Py_INCREF(data->klass);
# 1906|       /* the newraw method and newargs arguments used to create a new raw instance */
# 1907|       if (PyClass_Check(obj)) {

Error: CPPCHECK_WARNING (CWE-758): [#def222]
libsolv-0.7.34/redhat-linux-build/bindings/python/solv_python.c:23644: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#23642|     SWIG_Python_SetConstant(d, "Selection_SELECTION_FILTER",SWIG_From_int((int)(SELECTION_FILTER)));
#23643|     SWIG_Python_SetConstant(d, "Selection_SELECTION_FILTER_KEEP_IFEMPTY",SWIG_From_int((int)(SELECTION_FILTER_KEEP_IFEMPTY)));
#23644|->   SWIG_Python_SetConstant(d, "Selection_SELECTION_FILTER_SWAPPED",SWIG_From_int((int)(SELECTION_FILTER_SWAPPED)));
#23645|     SWIG_Python_SetConstant(d, "Dataiterator_SEARCH_STRING",SWIG_From_int((int)(SEARCH_STRING)));
#23646|     SWIG_Python_SetConstant(d, "Dataiterator_SEARCH_STRINGSTART",SWIG_From_int((int)(SEARCH_STRINGSTART)));

Error: CPPCHECK_WARNING (CWE-476): [#def223]
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c:1661: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: klass_name
# 1659|     size_t klass_len = 4 + strlen(type->name) + 1;
# 1660|     char *klass_name = (char *) malloc(klass_len);
# 1661|->   SWIG_snprintf(klass_name, klass_len, "TYPE%s", type->name);
# 1662|     if (NIL_P(_cSWIG_Pointer)) {
# 1663|       _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);

Error: COMPILER_WARNING (CWE-477): [#def224]
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c: scope_hint: In function ‘SWIG_Ruby_NewPointerObj’
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c:1707:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1707 |     obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
#      |     ^~~
/usr/include/ruby/internal/core.h:27: included_from: Included from here.
/usr/include/ruby/ruby.h:29: included_from: Included from here.
/usr/include/ruby.h:38: included_from: Included from here.
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c:1008: included_from: Included from here.
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1705|   
# 1706|       /* Create a new Ruby object */
# 1707|->     obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), 
# 1708|   			   ( own ? VOIDFUNC(sklass->destroy) : 
# 1709|   			     (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )

Error: CPPCHECK_WARNING (CWE-476): [#def225]
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c:1719: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: klass_name
# 1717|       size_t klass_len = 4 + strlen(type->name) + 1;
# 1718|       klass_name = (char *) malloc(klass_len);
# 1719|->     SWIG_snprintf(klass_name, klass_len, "TYPE%s", type->name);
# 1720|       klass = rb_const_get(_mSWIG, rb_intern(klass_name));
# 1721|       free((void *) klass_name);

Error: COMPILER_WARNING (CWE-477): [#def226]
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c:1722:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1722 |     obj = Data_Wrap_Struct(klass, 0, 0, ptr);
#      |     ^~~
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1720|       klass = rb_const_get(_mSWIG, rb_intern(klass_name));
# 1721|       free((void *) klass_name);
# 1722|->     obj = Data_Wrap_Struct(klass, 0, 0, ptr);
# 1723|     }
# 1724|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));

Error: COMPILER_WARNING (CWE-477): [#def227]
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c: scope_hint: In function ‘SWIG_Ruby_NewClassInstance’
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c:1735:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1735 |   obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
#      |   ^~~
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1733|     VALUE obj;
# 1734|     swig_class *sklass = (swig_class *) type->clientdata;
# 1735|->   obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
# 1736|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
# 1737|     return obj;

Error: COMPILER_WARNING (CWE-477): [#def228]
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c: scope_hint: In function ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c:1783:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1783 |     Data_Get_Struct(obj, void, vptr);
#      |     ^~~~~~~~~~~~~~~
/usr/include/ruby/internal/core/rdata.h:325:1: note: declared here
#  325 | rb_data_object_get_warning(VALUE obj)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
# 1781|         return SWIG_ERROR;
# 1782|       }
# 1783|->     Data_Get_Struct(obj, void, vptr);
# 1784|     }
# 1785|     

Error: COMPILER_WARNING (CWE-477): [#def229]
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c: scope_hint: In function ‘SWIG_Ruby_GetModule’
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c:1919:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1919 |     Data_Get_Struct(pointer, swig_module_info, ret);
#      |     ^~~~~~~~~~~~~~~
/usr/include/ruby/internal/core/rdata.h:325:1: note: declared here
#  325 | rb_data_object_get_warning(VALUE obj)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
# 1917|     pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
# 1918|     if (pointer != Qnil) {
# 1919|->     Data_Get_Struct(pointer, swig_module_info, ret);
# 1920|     }
# 1921|   

Error: COMPILER_WARNING (CWE-477): [#def230]
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c: scope_hint: In function ‘SWIG_Ruby_SetModule’
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c:1934:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1934 |   swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
#      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1932|     rb_undef_alloc_func(cl);
# 1933|     /* create and store the structure pointer to a global variable */
# 1934|->   swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
# 1935|     rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
# 1936|   }

Error: CPPCHECK_WARNING (CWE-457): [#def231]
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c:2391: error[uninitvar]: Uninitialized variable: v
# 2389|       a[1] = (VALUE)(&v);
# 2390|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 2391|->       if (val) *val = v;
# 2392|         return SWIG_OK;
# 2393|       }

Error: CPPCHECK_WARNING (CWE-457): [#def232]
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c:2746: error[uninitvar]: Uninitialized variable: v
# 2744|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 2745|           return SWIG_OverflowError;
# 2746|->       if (val) *val = v;
# 2747|         return SWIG_OK;
# 2748|       }

Error: CPPCHECK_WARNING (CWE-457): [#def233]
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c:3107: error[uninitvar]: Uninitialized variable: v
# 3105|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 3106|           return SWIG_OverflowError;
# 3107|->       if (val) *val = v;
# 3108|         return SWIG_OK;
# 3109|       }

Error: CPPCHECK_WARNING (CWE-758): [#def234]
libsolv-0.7.34/redhat-linux-build/bindings/ruby/solv_ruby.c:21020: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#21018|     rb_define_const(SwigClassSelection.klass, "SELECTION_FILTER", SWIG_From_int((int)(SELECTION_FILTER)));
#21019|     rb_define_const(SwigClassSelection.klass, "SELECTION_FILTER_KEEP_IFEMPTY", SWIG_From_int((int)(SELECTION_FILTER_KEEP_IFEMPTY)));
#21020|->   rb_define_const(SwigClassSelection.klass, "SELECTION_FILTER_SWAPPED", SWIG_From_int((int)(SELECTION_FILTER_SWAPPED)));
#21021|     rb_define_method(SwigClassSelection.klass, "isempty?", _wrap_Selection_isemptyq___, -1);
#21022|     rb_define_method(SwigClassSelection.klass, "clone", _wrap_Selection_clone, -1);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def235]
libsolv-0.7.34/src/dirpool.c:93:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libsolv-0.7.34/src/dirpool.c:81:1: enter_function: entry to ‘dirpool_make_dirtraverse’
libsolv-0.7.34/src/dirpool.c:84:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/src/dirpool.c:86:14: branch_false: ...to here
libsolv-0.7.34/src/dirpool.c:87:17: call_function: calling ‘solv_calloc_block’ from ‘dirpool_make_dirtraverse’
libsolv-0.7.34/src/dirpool.c:87:17: return_function: returning to ‘dirpool_make_dirtraverse’ from ‘solv_calloc_block’
libsolv-0.7.34/src/dirpool.c:88:15: branch_true: following ‘true’ branch...
libsolv-0.7.34/src/dirpool.c:90:11: branch_true: ...to here
libsolv-0.7.34/src/dirpool.c:90:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/src/dirpool.c:92:7: branch_false: ...to here
libsolv-0.7.34/src/dirpool.c:93:18: release_memory: using NULL here
libsolv-0.7.34/src/dirpool.c:93:7: danger: dereference of NULL ‘solv_calloc_block((long unsigned int)*dp.ndirs, 4, 127) + (long unsigned int)i * 4’
#   91|   	continue;
#   92|         parent = -dp->dirs[i];
#   93|->       dirtraverse[i] = dirtraverse[parent];
#   94|         dirtraverse[parent] = i + 1;
#   95|       }

Error: CPPCHECK_WARNING (CWE-562): [#def236]
libsolv-0.7.34/src/fileprovides.c:462: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  460|       if (repo->pool->solvables[p].repo == repo)
#  461|         MAPSET(&todo, p - repo->start);
#  462|->   cbd->todo = &todo;
#  463|     cbd->todo_start = repo->start;
#  464|     cbd->todo_end = repo->end;

Error: CPPCHECK_WARNING (CWE-562): [#def237]
libsolv-0.7.34/src/fileprovides.c:477: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  475|   	{
#  476|   	  map_grow(&providedids, repo->pool->ss.nstrings);
#  477|-> 	  cbd->providedids = &providedids;
#  478|   	  provstart = data->start;
#  479|   	  provend = data->end;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def238]
libsolv-0.7.34/src/pool.h:347:10: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.34/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.34/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:51:11: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:50:11: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/deltarpm.c:53:17: branch_false: ...to here
libsolv-0.7.34/examples/solv/deltarpm.c:54:7: call_function: calling ‘pool_whatprovides’ from ‘trydeltadownload’
#  345|   	return pool->whatprovides_rel[v];
#  346|       }
#  347|->   return pool_addrelproviders(pool, d);
#  348|   }
#  349|   

Error: CPPCHECK_WARNING (CWE-758): [#def239]
libsolv-0.7.34/src/poolvendor.c:64: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   62|   	  if (vs == 0)
#   63|   	    break;
#   64|-> 	  if (m == (1 << 31))
#   65|   	    break;	/* sorry, out of bits */
#   66|   	  m <<= 1;	/* next vendor equivalence class */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def240]
libsolv-0.7.34/src/queue.h:78:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_appdata.c:520:1: enter_function: entry to ‘repo_add_appdata_dir’
libsolv-0.7.34/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:551:16: acquire_resource: opened here
libsolv-0.7.34/ext/repo_appdata.c:557:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:559:23: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:560:15: call_function: calling ‘queue_empty’ from ‘repo_add_appdata_dir’
libsolv-0.7.34/ext/repo_appdata.c:560:15: return_function: returning to ‘repo_add_appdata_dir’ from ‘queue_empty’
libsolv-0.7.34/ext/repo_appdata.c:561:18: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:564:31: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:565:25: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:565:24: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:566:51: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:566:23: call_function: calling ‘queue_push’ from ‘repo_add_appdata_dir’
#   76|   {
#   77|     if (!q->left)
#   78|->     queue_alloc_one(q);
#   79|     q->elements[q->count++] = id;
#   80|     q->left--;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def241]
libsolv-0.7.34/src/queue.h:78:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.34/ext/repo_appdata.c:520:1: enter_function: entry to ‘repo_add_appdata_dir’
libsolv-0.7.34/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:551:16: acquire_memory: allocated here
libsolv-0.7.34/ext/repo_appdata.c:557:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:559:23: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:560:15: call_function: calling ‘queue_empty’ from ‘repo_add_appdata_dir’
libsolv-0.7.34/ext/repo_appdata.c:560:15: return_function: returning to ‘repo_add_appdata_dir’ from ‘queue_empty’
libsolv-0.7.34/ext/repo_appdata.c:561:18: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:564:31: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:565:25: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:565:24: branch_true: following ‘true’ branch...
libsolv-0.7.34/ext/repo_appdata.c:566:51: branch_true: ...to here
libsolv-0.7.34/ext/repo_appdata.c:566:23: call_function: calling ‘queue_push’ from ‘repo_add_appdata_dir’
#   76|   {
#   77|     if (!q->left)
#   78|->     queue_alloc_one(q);
#   79|     q->elements[q->count++] = id;
#   80|     q->left--;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def242]
libsolv-0.7.34/src/repo.c:1181:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libsolv-0.7.34/src/repo.c:1507:1: enter_function: entry to ‘repo_set_deparray’
libsolv-0.7.34/src/repo.c:1512:6: branch_true: following ‘true’ branch (when ‘marker != 0’)...
libsolv-0.7.34/src/repo.c:1517:7: branch_true: ...to here
libsolv-0.7.34/src/repo.c:1518:7: call_function: calling ‘repo_lookup_deparray’ from ‘repo_set_deparray’
# 1179|   	case SOLVABLE_ENHANCES:
# 1180|   	  offp = solvable_offsetptr(repo->pool->solvables + entry, keyname);
# 1181|-> 	  if (*offp)
# 1182|   	    {
# 1183|   	      Id *p;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def243]
libsolv-0.7.34/src/repo.c:1492:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libsolv-0.7.34/src/repo.c:1473:1: enter_function: entry to ‘repo_add_deparray’
libsolv-0.7.34/src/repo.c:1478:6: branch_true: following ‘true’ branch (when ‘p >= 0’)...
libsolv-0.7.34/src/repo.c:1481:7: branch_true: ...to here
libsolv-0.7.34/src/repo.c:1481:7: branch_true: following ‘true’ branch...
libsolv-0.7.34/src/repo.c:1483:9: branch_true: ...to here
libsolv-0.7.34/src/repo.c:1491:18: call_function: calling ‘solvable_offsetptr’ from ‘repo_add_deparray’
libsolv-0.7.34/src/repo.c:1491:18: return_function: returning to ‘repo_add_deparray’ from ‘solvable_offsetptr’
libsolv-0.7.34/src/repo.c:1492:19: danger: dereference of NULL ‘solvable_offsetptr(*repo_21(D)->pool.solvables + (long unsigned int)p * 56, keyname)’
# 1490|   	case SOLVABLE_ENHANCES:
# 1491|   	  offp = solvable_offsetptr(repo->pool->solvables + p, keyname);
# 1492|-> 	  *offp = repo_addid_dep(repo, *offp, dep, marker);
# 1493|   	  return;
# 1494|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def244]
libsolv-0.7.34/src/repo.c:1556:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libsolv-0.7.34/src/repo.c:1507:1: enter_function: entry to ‘repo_set_deparray’
libsolv-0.7.34/src/repo.c:1512:6: branch_false: following ‘false’ branch (when ‘marker == 0’)...
libsolv-0.7.34/src/repo.c:1538:6: branch_false: ...to here
libsolv-0.7.34/src/repo.c:1538:6: branch_true: following ‘true’ branch (when ‘p >= 0’)...
libsolv-0.7.34/src/repo.c:1542:7: branch_true: ...to here
libsolv-0.7.34/src/repo.c:1542:7: branch_true: following ‘true’ branch...
 branch_true: ...to here
libsolv-0.7.34/src/repo.c:1553:23: branch_false: following ‘false’ branch...
libsolv-0.7.34/src/repo.c:1555:37: branch_false: ...to here
libsolv-0.7.34/src/repo.c:1555:18: call_function: calling ‘solvable_offsetptr’ from ‘repo_set_deparray’
libsolv-0.7.34/src/repo.c:1555:18: return_function: returning to ‘repo_set_deparray’ from ‘solvable_offsetptr’
libsolv-0.7.34/src/repo.c:1556:11: danger: dereference of NULL ‘solvable_offsetptr(*repo_45(D)->pool.solvables + (long unsigned int)p * 56, keyname)’
# 1554|   	    off = repo_addid_dep(repo, off, q->elements[i], 0);
# 1555|   	  offp = solvable_offsetptr(repo->pool->solvables + p, keyname);
# 1556|-> 	  *offp = off;
# 1557|   	  return;
# 1558|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def245]
libsolv-0.7.34/src/repo_write.c:1549:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘spool’
libsolv-0.7.34/src/repo_write.c:2277:1: enter_function: entry to ‘repodata_write_filtered’
libsolv-0.7.34/src/repo_write.c:2285:9: call_function: calling ‘repowriter_write’ from ‘repodata_write_filtered’
# 1547|      */
# 1548|   
# 1549|->   reloff = spool->nstrings;
# 1550|     if (cbdata.ownspool)
# 1551|       reloff = (reloff + NEEDID_BLOCK) & ~NEEDID_BLOCK;

Error: CPPCHECK_WARNING (CWE-758): [#def246]
libsolv-0.7.34/src/repodata.c:1544: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1542|     memset(di, 0, sizeof(*di));
# 1543|     di->pool = pool;
# 1544|->   di->flags = flags & ~SEARCH_THISSOLVID;
# 1545|     if (!pool || (repo && repo->pool != pool))
# 1546|       {

Error: CPPCHECK_WARNING (CWE-758): [#def247]
libsolv-0.7.34/src/repodata.c:1599: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1597|   dataiterator_set_match(Dataiterator *di, const char *match, int flags)
# 1598|   {
# 1599|->   di->flags = (flags & ~SEARCH_THISSOLVID) | (di->flags & SEARCH_THISSOLVID);
# 1600|     datamatcher_free(&di->matcher);
# 1601|     memset(&di->matcher, 0, sizeof(di->matcher));

Error: CPPCHECK_WARNING (CWE-758): [#def248]
libsolv-0.7.34/src/repodata.c:1619: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1617|     di->repo = repo;
# 1618|     di->repoid = 0;
# 1619|->   di->flags &= ~SEARCH_THISSOLVID;
# 1620|     di->nparents = 0;
# 1621|     di->rootlevel = 0;

Error: CPPCHECK_WARNING (CWE-758): [#def249]
libsolv-0.7.34/src/repodata.c:1719: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1717|   	  if (!di->repo || (di->repo->disabled && !(di->flags & SEARCH_DISABLED_REPOS)))
# 1718|   	    goto di_nextrepo;
# 1719|-> 	  if (!(di->flags & SEARCH_THISSOLVID))
# 1720|   	    {
# 1721|   	      di->solvid = di->repo->start - 1;	/* reset solvid iterator */

Error: CPPCHECK_WARNING (CWE-758): [#def250]
libsolv-0.7.34/src/repodata.c:1835: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1833|   
# 1834|   	case di_nextsolvable: di_nextsolvable:
# 1835|-> 	  if (!(di->flags & SEARCH_THISSOLVID))
# 1836|   	    {
# 1837|   	      if (di->solvid < 0)

Error: CPPCHECK_WARNING (CWE-758): [#def251]
libsolv-0.7.34/src/repodata.c:2039: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 2037|   {
# 2038|     di->state = from->state;
# 2039|->   di->flags &= ~SEARCH_THISSOLVID;
# 2040|     di->flags |= (from->flags & SEARCH_THISSOLVID);
# 2041|     di->repo = from->repo;

Error: CPPCHECK_WARNING (CWE-758): [#def252]
libsolv-0.7.34/src/repodata.c:2040: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 2038|     di->state = from->state;
# 2039|     di->flags &= ~SEARCH_THISSOLVID;
# 2040|->   di->flags |= (from->flags & SEARCH_THISSOLVID);
# 2041|     di->repo = from->repo;
# 2042|     di->data = from->data;

Error: CPPCHECK_WARNING (CWE-758): [#def253]
libsolv-0.7.34/src/repodata.c:2149: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 2147|   dataiterator_final_solvable(Dataiterator *di)
# 2148|   {
# 2149|->   di->flags |= SEARCH_THISSOLVID;
# 2150|     di->repoid = 0;
# 2151|   }

Error: CPPCHECK_WARNING (CWE-758): [#def254]
libsolv-0.7.34/src/repodata.c:2201: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 2199|     di->solvid = solvid;
# 2200|     if (solvid)
# 2201|->     di->flags |= SEARCH_THISSOLVID;
# 2202|     di->state = di_enterrepo;
# 2203|   }

Error: CPPCHECK_WARNING (CWE-758): [#def255]
libsolv-0.7.34/src/repodata.c:2215: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 2213|     di->repodataid = 1;
# 2214|     di->solvid = 0;
# 2215|->   di->flags &= ~SEARCH_THISSOLVID;
# 2216|     di->state = di_enterrepo;
# 2217|   }

Error: CPPCHECK_WARNING (CWE-758): [#def256]
libsolv-0.7.34/src/selection.c:1335: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1333|         if (ret || !(flags & SELECTION_FILTER_KEEP_IFEMPTY))
# 1334|   	{
# 1335|-> 	  if ((flags & SELECTION_FILTER_SWAPPED) != 0)
# 1336|   	    {
# 1337|   	      selection_filter(pool, sel2, sel1);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def257]
libsolv-0.7.34/src/solvable.c:367:57: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libsolv-0.7.34/src/solvable.c:340:1: enter_function: entry to ‘solvable_lookup_location’
libsolv-0.7.34/src/solvable.c:349:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/src/solvable.c:351:3: branch_false: ...to here
libsolv-0.7.34/src/solvable.c:360:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/src/solvable.c:363:14: branch_true: ...to here
libsolv-0.7.34/src/solvable.c:364:13: call_function: calling ‘evrid2vrstr’ from ‘solvable_lookup_location’
libsolv-0.7.34/src/solvable.c:364:13: return_function: returning to ‘solvable_lookup_location’ from ‘evrid2vrstr’
libsolv-0.7.34/src/solvable.c:367:57: danger: argument 1 (‘evrid2vrstr(pool, *s.evr)’) NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#  365|         arch = pool_id2str(pool, s->arch);
#  366|         /* name-vr.arch.rpm */
#  367|->       loc = pool_alloctmpspace(pool, l + strlen(name) + strlen(evr) + strlen(arch) + 7);
#  368|         if (mediadir)
#  369|   	sprintf(loc, "%s/%s-%s.%s.rpm", mediadir, name, evr, arch);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def258]
libsolv-0.7.34/src/solvable.c:367:57: warning[-Wanalyzer-null-argument]: use of NULL ‘mediadir’ where non-null expected
libsolv-0.7.34/src/solvable.c:340:1: enter_function: entry to ‘solvable_lookup_location’
libsolv-0.7.34/src/solvable.c:349:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/src/solvable.c:351:3: branch_false: ...to here
libsolv-0.7.34/src/solvable.c:354:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/src/solvable.c:357:16: branch_false: ...to here
libsolv-0.7.34/src/solvable.c:357:16: call_function: calling ‘solvable_lookup_str’ from ‘solvable_lookup_location’
libsolv-0.7.34/src/solvable.c:357:16: return_function: returning to ‘solvable_lookup_location’ from ‘solvable_lookup_str’
libsolv-0.7.34/src/solvable.c:358:6: branch_false: following ‘false’ branch (when ‘mediadir’ is NULL)...
libsolv-0.7.34/src/solvable.c:359:5: branch_false: ...to here
libsolv-0.7.34/src/solvable.c:360:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/src/solvable.c:363:14: branch_true: ...to here
libsolv-0.7.34/src/solvable.c:364:13: call_function: calling ‘evrid2vrstr’ from ‘solvable_lookup_location’
libsolv-0.7.34/src/solvable.c:364:13: return_function: returning to ‘solvable_lookup_location’ from ‘evrid2vrstr’
libsolv-0.7.34/src/solvable.c:367:57: danger: argument 1 (‘evrid2vrstr(pool, *s.evr)’) NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#  365|         arch = pool_id2str(pool, s->arch);
#  366|         /* name-vr.arch.rpm */
#  367|->       loc = pool_alloctmpspace(pool, l + strlen(name) + strlen(evr) + strlen(arch) + 7);
#  368|         if (mediadir)
#  369|   	sprintf(loc, "%s/%s-%s.%s.rpm", mediadir, name, evr, arch);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def259]
libsolv-0.7.34/src/util.h:53:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&buf, "r")’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:144:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:145:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:17: acquire_resource: opened here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:154:13: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:156:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:166:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:168:15: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:174:27: call_function: calling ‘solv_extend’ from ‘read_repoinfos_yum’
#   51|       {
#   52|         if ((len & block) == 0)
#   53|-> 	buf = solv_extend_realloc(buf, len + 1, size, block);
#   54|       }
#   55|     else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def260]
libsolv-0.7.34/src/util.h:53:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.34/ext/testcase.c:2148:1: enter_function: entry to ‘testcase_read’
libsolv-0.7.34/ext/testcase.c:2170:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.34/ext/testcase.c:2170:21: branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2170:21: acquire_resource: opened here
libsolv-0.7.34/ext/testcase.c:2170:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2175:17: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2200:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2202:7: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2221:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2223:20: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2223:20: call_function: inlined call to ‘solv_extend’ from ‘testcase_read’
 branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2223:20: call_function: inlined call to ‘solv_extend’ from ‘testcase_read’
#   51|       {
#   52|         if ((len & block) == 0)
#   53|-> 	buf = solv_extend_realloc(buf, len + 1, size, block);
#   54|       }
#   55|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def261]
libsolv-0.7.34/src/util.h:53:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&buf, "r")’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:142:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:144:18: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:145:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:17: acquire_memory: allocated here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:148:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:154:13: branch_true: following ‘true’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:156:15: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:166:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:168:15: branch_false: ...to here
libsolv-0.7.34/examples/solv/repoinfo_config_yum.c:174:27: call_function: calling ‘solv_extend’ from ‘read_repoinfos_yum’
#   51|       {
#   52|         if ((len & block) == 0)
#   53|-> 	buf = solv_extend_realloc(buf, len + 1, size, block);
#   54|       }
#   55|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def262]
libsolv-0.7.34/src/util.h:53:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/ext/testcase.c:2148:1: enter_function: entry to ‘testcase_read’
libsolv-0.7.34/ext/testcase.c:2170:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.34/ext/testcase.c:2170:21: branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2170:21: acquire_memory: allocated here
libsolv-0.7.34/ext/testcase.c:2170:7: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2175:17: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2200:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2202:7: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2221:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/ext/testcase.c:2223:20: branch_false: ...to here
libsolv-0.7.34/ext/testcase.c:2223:20: call_function: inlined call to ‘solv_extend’ from ‘testcase_read’
 branch_true: ...to here
libsolv-0.7.34/ext/testcase.c:2223:20: call_function: inlined call to ‘solv_extend’ from ‘testcase_read’
#   51|       {
#   52|         if ((len & block) == 0)
#   53|-> 	buf = solv_extend_realloc(buf, len + 1, size, block);
#   54|       }
#   55|     else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def263]
libsolv-0.7.34/tools/apk2solv.c:124:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.34/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.34/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.34/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.34/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:96:22: acquire_resource: opened here
libsolv-0.7.34/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:121:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/apk2solv.c:123:14: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:123:14: call_function: inlined call to ‘solv_extend’ from ‘main’
 branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:124:23: danger: ‘fp’ leaks here; was opened at [(8)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/7)
#  122|       {
#  123|         pkgs = solv_extend(pkgs, npkgs, 1, sizeof(char *), 15);
#  124|->       pkgs[npkgs++] = solv_strdup(argv[optind++]);
#  125|       }
#  126|     repo = repo_create(pool, "apk2solv");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def264]
libsolv-0.7.34/tools/apk2solv.c:124:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.34/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.34/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.34/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:96:22: acquire_memory: allocated here
libsolv-0.7.34/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:121:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/apk2solv.c:123:14: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:123:14: call_function: inlined call to ‘solv_extend’ from ‘main’
 branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:124:23: danger: ‘fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
#  122|       {
#  123|         pkgs = solv_extend(pkgs, npkgs, 1, sizeof(char *), 15);
#  124|->       pkgs[npkgs++] = solv_strdup(argv[optind++]);
#  125|       }
#  126|     repo = repo_create(pool, "apk2solv");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def265]
libsolv-0.7.34/tools/apk2solv.c:126:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.34/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.34/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.34/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:96:22: acquire_resource: opened here
libsolv-0.7.34/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:126:10: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  124|         pkgs[npkgs++] = solv_strdup(argv[optind++]);
#  125|       }
#  126|->   repo = repo_create(pool, "apk2solv");
#  127|     repo_add_repodata(repo, 0);
#  128|     res = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
libsolv-0.7.34/tools/apk2solv.c:126:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.34/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.34/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:96:22: acquire_memory: allocated here
libsolv-0.7.34/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:126:10: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  124|         pkgs[npkgs++] = solv_strdup(argv[optind++]);
#  125|       }
#  126|->   repo = repo_create(pool, "apk2solv");
#  127|     repo_add_repodata(repo, 0);
#  128|     res = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def267]
libsolv-0.7.34/tools/apk2solv.c:127:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.34/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.34/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.34/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:96:22: acquire_resource: opened here
libsolv-0.7.34/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:127:3: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  125|       }
#  126|     repo = repo_create(pool, "apk2solv");
#  127|->   repo_add_repodata(repo, 0);
#  128|     res = 0;
#  129|     if (isrepo)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
libsolv-0.7.34/tools/apk2solv.c:127:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.34/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.34/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:96:22: acquire_memory: allocated here
libsolv-0.7.34/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:127:3: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  125|       }
#  126|     repo = repo_create(pool, "apk2solv");
#  127|->   repo_add_repodata(repo, 0);
#  128|     res = 0;
#  129|     if (isrepo)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def269]
libsolv-0.7.34/tools/apk2solv.c:153:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "r")’
libsolv-0.7.34/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.34/tools/apk2solv.c:92:6: branch_false: following ‘false’ branch (when ‘manifest’ is NULL)...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:121:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/apk2solv.c:123:14: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:123:14: call_function: inlined call to ‘solv_extend’ from ‘main’
 branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:129:6: branch_true: following ‘true’ branch (when ‘isrepo != 0’)...
libsolv-0.7.34/tools/apk2solv.c:131:10: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:133:10: branch_false: following ‘false’ branch (when ‘npkgs != 0’)...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:143:23: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.34/tools/apk2solv.c:146:36: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:146:26: acquire_resource: opened here
libsolv-0.7.34/tools/apk2solv.c:146:18: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/apk2solv.c:153:23: branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:153:23: danger: ‘fopen(*<unknown>, "r")’ leaks here; was opened at [(15)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/14)
#  151|   	      else
#  152|   		{
#  153|-> 		  if (repo_add_apk_repo(repo, fp, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) != 0)
#  154|   		    {
#  155|   		      fprintf(stderr, "apk2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
libsolv-0.7.34/tools/apk2solv.c:153:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "r")’
libsolv-0.7.34/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.34/tools/apk2solv.c:92:6: branch_false: following ‘false’ branch (when ‘manifest’ is NULL)...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:121:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/apk2solv.c:123:14: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:123:14: call_function: inlined call to ‘solv_extend’ from ‘main’
 branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:129:6: branch_true: following ‘true’ branch (when ‘isrepo != 0’)...
libsolv-0.7.34/tools/apk2solv.c:131:10: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:133:10: branch_false: following ‘false’ branch (when ‘npkgs != 0’)...
 branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:143:23: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.34/tools/apk2solv.c:146:36: branch_true: ...to here
libsolv-0.7.34/tools/apk2solv.c:146:26: acquire_memory: allocated here
libsolv-0.7.34/tools/apk2solv.c:146:18: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/apk2solv.c:153:23: branch_false: ...to here
libsolv-0.7.34/tools/apk2solv.c:153:23: danger: ‘fopen(*<unknown>, "r")’ leaks here; was allocated at [(15)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/14)
#  151|   	      else
#  152|   		{
#  153|-> 		  if (repo_add_apk_repo(repo, fp, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) != 0)
#  154|   		    {
#  155|   		      fprintf(stderr, "apk2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def271]
libsolv-0.7.34/tools/archpkgs2solv.c:111:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.34/tools/archpkgs2solv.c:50:1: enter_function: entry to ‘main’
libsolv-0.7.34/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.34/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.34/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:83:22: acquire_resource: opened here
libsolv-0.7.34/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:108:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/archpkgs2solv.c:110:14: branch_true: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:110:14: call_function: inlined call to ‘solv_extend’ from ‘main’
 branch_true: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:111:23: danger: ‘fp’ leaks here; was opened at [(8)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/7)
#  109|       {
#  110|         pkgs = solv_extend(pkgs, npkgs, 1, sizeof(char *), 15);
#  111|->       pkgs[npkgs++] = solv_strdup(argv[optind++]);
#  112|       }
#  113|     repo = repo_create(pool, "archpkgs2solv");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
libsolv-0.7.34/tools/archpkgs2solv.c:111:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/tools/archpkgs2solv.c:50:1: enter_function: entry to ‘main’
libsolv-0.7.34/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.34/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.34/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:83:22: acquire_memory: allocated here
libsolv-0.7.34/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:108:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/archpkgs2solv.c:110:14: branch_true: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:110:14: call_function: inlined call to ‘solv_extend’ from ‘main’
 branch_true: ...to here
libsolv-0.7.34/tools/archpkgs2solv.c:111:23: danger: ‘fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
#  109|       {
#  110|         pkgs = solv_extend(pkgs, npkgs, 1, sizeof(char *), 15);
#  111|->       pkgs[npkgs++] = solv_strdup(argv[optind++]);
#  112|       }
#  113|     repo = repo_create(pool, "archpkgs2solv");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def273]
libsolv-0.7.34/tools/deb2solv.c:135:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "r")’
libsolv-0.7.34/tools/deb2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.34/tools/deb2solv.c:63:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/deb2solv.c:65:7: branch_true: ...to here
libsolv-0.7.34/tools/deb2solv.c:109:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/deb2solv.c:111:14: branch_true: ...to here
libsolv-0.7.34/tools/deb2solv.c:111:14: call_function: inlined call to ‘solv_extend’ from ‘main’
 branch_true: ...to here
libsolv-0.7.34/tools/deb2solv.c:109:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/deb2solv.c:114:10: branch_false: ...to here
libsolv-0.7.34/tools/deb2solv.c:125:15: branch_true: following ‘true’ branch (when ‘i < ndebs’)...
libsolv-0.7.34/tools/deb2solv.c:127:10: branch_true: ...to here
libsolv-0.7.34/tools/deb2solv.c:127:10: branch_true: following ‘true’ branch (when ‘is_repo != 0’)...
libsolv-0.7.34/tools/deb2solv.c:129:31: branch_true: ...to here
libsolv-0.7.34/tools/deb2solv.c:129:21: acquire_resource: opened here
libsolv-0.7.34/tools/deb2solv.c:129:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/deb2solv.c:135:15: branch_false: ...to here
libsolv-0.7.34/tools/deb2solv.c:135:15: danger: ‘fopen(*<unknown>, "r")’ leaks here; was opened at [(15)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/14)
#  133|   	      continue;
#  134|   	    }
#  135|-> 	  if (repo_add_debpackages(repo, fp, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE))
#  136|   	    {
#  137|   	      fprintf(stderr, "deb2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
libsolv-0.7.34/tools/deb2solv.c:135:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "r")’
libsolv-0.7.34/tools/deb2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.34/tools/deb2solv.c:63:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/deb2solv.c:65:7: branch_true: ...to here
libsolv-0.7.34/tools/deb2solv.c:109:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/deb2solv.c:111:14: branch_true: ...to here
libsolv-0.7.34/tools/deb2solv.c:111:14: call_function: inlined call to ‘solv_extend’ from ‘main’
 branch_true: ...to here
libsolv-0.7.34/tools/deb2solv.c:109:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/deb2solv.c:114:10: branch_false: ...to here
libsolv-0.7.34/tools/deb2solv.c:125:15: branch_true: following ‘true’ branch (when ‘i < ndebs’)...
libsolv-0.7.34/tools/deb2solv.c:127:10: branch_true: ...to here
libsolv-0.7.34/tools/deb2solv.c:127:10: branch_true: following ‘true’ branch (when ‘is_repo != 0’)...
libsolv-0.7.34/tools/deb2solv.c:129:31: branch_true: ...to here
libsolv-0.7.34/tools/deb2solv.c:129:21: acquire_memory: allocated here
libsolv-0.7.34/tools/deb2solv.c:129:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/deb2solv.c:135:15: branch_false: ...to here
libsolv-0.7.34/tools/deb2solv.c:135:15: danger: ‘fopen(*<unknown>, "r")’ leaks here; was allocated at [(15)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/14)
#  133|   	      continue;
#  134|   	    }
#  135|-> 	  if (repo_add_debpackages(repo, fp, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE))
#  136|   	    {
#  137|   	      fprintf(stderr, "deb2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def275]
libsolv-0.7.34/tools/mergesolv.c:54:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(repodata_lookup_str(data, -1, 33), "r")’
libsolv-0.7.34/tools/mergesolv.c:45:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/mergesolv.c:47:3: branch_false: ...to here
libsolv-0.7.34/tools/mergesolv.c:48:8: acquire_resource: opened here
libsolv-0.7.34/tools/mergesolv.c:49:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/mergesolv.c:54:7: branch_false: ...to here
libsolv-0.7.34/tools/mergesolv.c:54:7: danger: ‘fopen(repodata_lookup_str(data, -1, 33), "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   52|         return 0;
#   53|       }
#   54|->   r = repo_add_solv(data->repo, fp, REPO_USE_LOADING|REPO_LOCALPOOL);
#   55|     fclose(fp);
#   56|     return r ? 0 : 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
libsolv-0.7.34/tools/mergesolv.c:54:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(repodata_lookup_str(data, -1, 33), "r")’
libsolv-0.7.34/tools/mergesolv.c:45:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/mergesolv.c:47:3: branch_false: ...to here
libsolv-0.7.34/tools/mergesolv.c:48:8: acquire_memory: allocated here
libsolv-0.7.34/tools/mergesolv.c:49:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/mergesolv.c:54:7: branch_false: ...to here
libsolv-0.7.34/tools/mergesolv.c:54:7: danger: ‘fopen(repodata_lookup_str(data, -1, 33), "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   52|         return 0;
#   53|       }
#   54|->   r = repo_add_solv(data->repo, fp, REPO_USE_LOADING|REPO_LOCALPOOL);
#   55|     fclose(fp);
#   56|     return r ? 0 : 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def277]
libsolv-0.7.34/tools/mergesolv.c:104:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "r")’
libsolv-0.7.34/tools/mergesolv.c:96:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/mergesolv.c:99:27: branch_true: ...to here
libsolv-0.7.34/tools/mergesolv.c:99:17: acquire_resource: opened here
libsolv-0.7.34/tools/mergesolv.c:99:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/mergesolv.c:104:11: branch_false: ...to here
libsolv-0.7.34/tools/mergesolv.c:104:11: danger: ‘fopen(*<unknown>, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  102|   	  exit(1);
#  103|   	}
#  104|->       if (repo_add_solv(repo, fp, 0))
#  105|   	{
#  106|   	  fprintf(stderr, "repo %s: %s\n", argv[optind], pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
libsolv-0.7.34/tools/mergesolv.c:104:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "r")’
libsolv-0.7.34/tools/mergesolv.c:96:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/mergesolv.c:99:27: branch_true: ...to here
libsolv-0.7.34/tools/mergesolv.c:99:17: acquire_memory: allocated here
libsolv-0.7.34/tools/mergesolv.c:99:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/mergesolv.c:104:11: branch_false: ...to here
libsolv-0.7.34/tools/mergesolv.c:104:11: danger: ‘fopen(*<unknown>, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  102|   	  exit(1);
#  103|   	}
#  104|->       if (repo_add_solv(repo, fp, 0))
#  105|   	{
#  106|   	  fprintf(stderr, "repo %s: %s\n", argv[optind], pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def279]
libsolv-0.7.34/tools/repo2solv.c:356:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(solv_dupjoin(dir, "/content", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:354:13: acquire_resource: opened here
libsolv-0.7.34/tools/repo2solv.c:354:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:356:11: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:356:11: danger: ‘fopen(solv_dupjoin(dir, "/content", 0), "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  354|     if ((fp = fopen(tmp, "r")) != 0)
#  355|       {
#  356|->       if (repo_add_content(repo, fp, REPO_REUSE_REPODATA))
#  357|           {
#  358|   	  fprintf(stderr, "%s: %s\n", tmp, pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
libsolv-0.7.34/tools/repo2solv.c:356:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(solv_dupjoin(dir, "/content", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:354:13: acquire_memory: allocated here
libsolv-0.7.34/tools/repo2solv.c:354:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:356:11: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:356:11: danger: ‘fopen(solv_dupjoin(dir, "/content", 0), "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  354|     if ((fp = fopen(tmp, "r")) != 0)
#  355|       {
#  356|->       if (repo_add_content(repo, fp, REPO_REUSE_REPODATA))
#  357|           {
#  358|   	  fprintf(stderr, "%s: %s\n", tmp, pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
libsolv-0.7.34/tools/repo2solv.c:376:16: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(solv_dupjoin(dir, "/",  descrdir))’
libsolv-0.7.34/tools/repo2solv.c:371:13: acquire_memory: allocated here
libsolv-0.7.34/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:376:16: danger: ‘opendir(solv_dupjoin(dir, "/",  descrdir))’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  374|         exit(1);
#  375|       }
#  376|->   while ((de = readdir(dp)) != 0)
#  377|       {
#  378|         if (de->d_name[0] == 0 || de->d_name[0] == '.')

Error: GCC_ANALYZER_WARNING (CWE-775): [#def282]
libsolv-0.7.34/tools/repo2solv.c:426:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.34/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:422:13: acquire_resource: opened here
libsolv-0.7.34/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:426:7: danger: ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’ leaks here; was opened at [(20)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/19)
#  424|         char pbuf[4096];
#  425|   
#  426|->       repo_add_repodata(repo, 0);
#  427|         while (fgets(pbuf, sizeof(pbuf), fp))
#  428|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
libsolv-0.7.34/tools/repo2solv.c:426:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.34/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:422:13: acquire_memory: allocated here
libsolv-0.7.34/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:426:7: danger: ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’ leaks here; was allocated at [(20)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/19)
#  424|         char pbuf[4096];
#  425|   
#  426|->       repo_add_repodata(repo, 0);
#  427|         while (fgets(pbuf, sizeof(pbuf), fp))
#  428|   	{

Error: GCC_ANALYZER_WARNING (CWE-775): [#def284]
libsolv-0.7.34/tools/repo2solv.c:435:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.34/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:422:13: acquire_resource: opened here
libsolv-0.7.34/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:427:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:431:15: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:431:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:433:20: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:433:14: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.34/tools/repo2solv.c:435:15: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:435:15: danger: ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’ leaks here; was opened at [(20)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/19)
#  433|   	  if ((p = strchr(pbuf, '\n')) != 0)
#  434|   	    *p = 0;
#  435|-> 	  if (*pbuf == 0)
#  436|   	    continue;
#  437|   	  solv_free(tmp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
libsolv-0.7.34/tools/repo2solv.c:435:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.34/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:422:13: acquire_memory: allocated here
libsolv-0.7.34/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:427:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:431:15: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:431:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:433:20: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:433:14: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.34/tools/repo2solv.c:435:15: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:435:15: danger: ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’ leaks here; was allocated at [(20)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/19)
#  433|   	  if ((p = strchr(pbuf, '\n')) != 0)
#  434|   	    *p = 0;
#  435|-> 	  if (*pbuf == 0)
#  436|   	    continue;
#  437|   	  solv_free(tmp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def286]
libsolv-0.7.34/tools/repo2solv.c:437:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.34/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:422:13: acquire_resource: opened here
libsolv-0.7.34/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:427:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:431:15: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:431:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:433:20: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:433:14: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.34/tools/repo2solv.c:435:15: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:435:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:437:11: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:437:11: danger: ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’ leaks here; was opened at [(20)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/19)
#  435|   	  if (*pbuf == 0)
#  436|   	    continue;
#  437|-> 	  solv_free(tmp);
#  438|   	  tmp = solv_dupjoin(ddir, "/", pbuf);
#  439|   	  if ((pfp = solv_xfopen(tmp, "r")) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
libsolv-0.7.34/tools/repo2solv.c:437:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.34/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:422:13: acquire_memory: allocated here
libsolv-0.7.34/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:427:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:431:15: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:431:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:433:20: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:433:14: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.34/tools/repo2solv.c:435:15: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:435:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:437:11: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:437:11: danger: ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’ leaks here; was allocated at [(20)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/19)
#  435|   	  if (*pbuf == 0)
#  436|   	    continue;
#  437|-> 	  solv_free(tmp);
#  438|   	  tmp = solv_dupjoin(ddir, "/", pbuf);
#  439|   	  if ((pfp = solv_xfopen(tmp, "r")) != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def288]
libsolv-0.7.34/tools/repo2solv.c:438:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.34/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:422:13: acquire_resource: opened here
libsolv-0.7.34/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:427:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:431:15: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:431:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:433:20: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:433:14: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.34/tools/repo2solv.c:435:15: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:435:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:437:11: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:438:17: danger: ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’ leaks here; was opened at [(20)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/19)
#  436|   	    continue;
#  437|   	  solv_free(tmp);
#  438|-> 	  tmp = solv_dupjoin(ddir, "/", pbuf);
#  439|   	  if ((pfp = solv_xfopen(tmp, "r")) != 0)
#  440|   	    {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
libsolv-0.7.34/tools/repo2solv.c:438:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.34/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:422:13: acquire_memory: allocated here
libsolv-0.7.34/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:427:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:431:15: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:431:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:433:20: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:433:14: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.34/tools/repo2solv.c:435:15: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:435:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:437:11: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:438:17: danger: ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’ leaks here; was allocated at [(20)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/19)
#  436|   	    continue;
#  437|   	  solv_free(tmp);
#  438|-> 	  tmp = solv_dupjoin(ddir, "/", pbuf);
#  439|   	  if ((pfp = solv_xfopen(tmp, "r")) != 0)
#  440|   	    {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def290]
libsolv-0.7.34/tools/repo2solv.c:439:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.34/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:422:13: acquire_resource: opened here
libsolv-0.7.34/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:427:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:431:15: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:431:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:433:20: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:433:14: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.34/tools/repo2solv.c:435:15: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:439:22: danger: ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’ leaks here; was opened at [(20)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/19)
#  437|   	  solv_free(tmp);
#  438|   	  tmp = solv_dupjoin(ddir, "/", pbuf);
#  439|-> 	  if ((pfp = solv_xfopen(tmp, "r")) != 0)
#  440|   	    {
#  441|   	      if (repo_add_susetags(repo, pfp, defvendor, 0, REPO_NO_INTERNALIZE|REPO_REUSE_REPODATA))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def291]
libsolv-0.7.34/tools/repo2solv.c:439:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.34/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:422:13: acquire_memory: allocated here
libsolv-0.7.34/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:427:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:431:15: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:431:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:433:20: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:433:14: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.34/tools/repo2solv.c:435:15: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:439:22: danger: ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’ leaks here; was allocated at [(20)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/19)
#  437|   	  solv_free(tmp);
#  438|   	  tmp = solv_dupjoin(ddir, "/", pbuf);
#  439|-> 	  if ((pfp = solv_xfopen(tmp, "r")) != 0)
#  440|   	    {
#  441|   	      if (repo_add_susetags(repo, pfp, defvendor, 0, REPO_NO_INTERNALIZE|REPO_REUSE_REPODATA))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def292]
libsolv-0.7.34/tools/repo2solv.c:441:19: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.34/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:422:13: acquire_resource: opened here
libsolv-0.7.34/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:427:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:431:15: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:431:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:433:20: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:433:14: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.34/tools/repo2solv.c:435:15: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:441:19: danger: ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’ leaks here; was opened at [(20)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/19)
#  439|   	  if ((pfp = solv_xfopen(tmp, "r")) != 0)
#  440|   	    {
#  441|-> 	      if (repo_add_susetags(repo, pfp, defvendor, 0, REPO_NO_INTERNALIZE|REPO_REUSE_REPODATA))
#  442|   		{
#  443|   		  fprintf(stderr, "%s: %s\n", tmp, pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def293]
libsolv-0.7.34/tools/repo2solv.c:441:19: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.34/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.34/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.34/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.34/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:422:13: acquire_memory: allocated here
libsolv-0.7.34/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:427:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/repo2solv.c:431:15: branch_true: ...to here
libsolv-0.7.34/tools/repo2solv.c:431:14: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/repo2solv.c:433:20: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:433:14: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.34/tools/repo2solv.c:435:15: branch_false: ...to here
libsolv-0.7.34/tools/repo2solv.c:441:19: danger: ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’ leaks here; was allocated at [(20)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/19)
#  439|   	  if ((pfp = solv_xfopen(tmp, "r")) != 0)
#  440|   	    {
#  441|-> 	      if (repo_add_susetags(repo, pfp, defvendor, 0, REPO_NO_INTERNALIZE|REPO_REUSE_REPODATA))
#  442|   		{
#  443|   		  fprintf(stderr, "%s: %s\n", tmp, pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def294]
libsolv-0.7.34/tools/rpmdb2solv.c:171:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘reffp’
libsolv-0.7.34/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:92:10: branch_false: following ‘false’ branch (when ‘c < 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: acquire_resource: opened here
libsolv-0.7.34/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:171:5: danger: ‘reffp’ leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  169|   
#  170|     if (root && *root)
#  171|->     pool_set_rootdir(pool, root);
#  172|   #ifdef ENABLE_PUBKEY
#  173|     if (dbpath && *dbpath && (!nopacks || pubkeys))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
libsolv-0.7.34/tools/rpmdb2solv.c:171:5: warning[-Wanalyzer-malloc-leak]: leak of ‘reffp’
libsolv-0.7.34/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:92:10: branch_false: following ‘false’ branch (when ‘c < 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: acquire_memory: allocated here
libsolv-0.7.34/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:171:5: danger: ‘reffp’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#  169|   
#  170|     if (root && *root)
#  171|->     pool_set_rootdir(pool, root);
#  172|   #ifdef ENABLE_PUBKEY
#  173|     if (dbpath && *dbpath && (!nopacks || pubkeys))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def296]
libsolv-0.7.34/tools/rpmdb2solv.c:179:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘reffp’
libsolv-0.7.34/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:92:10: branch_false: following ‘false’ branch (when ‘c < 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: acquire_resource: opened here
libsolv-0.7.34/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:179:21: danger: ‘reffp’ leaks here; was opened at [(13)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/12)
#  177|       {
#  178|   #ifdef ENABLE_RPMDB_LIBRPM
#  179|->       char *macro = solv_dupjoin("_dbpath ", dbpath, 0);
#  180|         rpmDefineMacro(NULL, macro, 0);
#  181|         free(macro);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
libsolv-0.7.34/tools/rpmdb2solv.c:179:21: warning[-Wanalyzer-malloc-leak]: leak of ‘reffp’
libsolv-0.7.34/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:92:10: branch_false: following ‘false’ branch (when ‘c < 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: acquire_memory: allocated here
libsolv-0.7.34/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:179:21: danger: ‘reffp’ leaks here; was allocated at [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
#  177|       {
#  178|   #ifdef ENABLE_RPMDB_LIBRPM
#  179|->       char *macro = solv_dupjoin("_dbpath ", dbpath, 0);
#  180|         rpmDefineMacro(NULL, macro, 0);
#  181|         free(macro);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def298]
libsolv-0.7.34/tools/rpmdb2solv.c:180:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘reffp’
libsolv-0.7.34/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:92:10: branch_false: following ‘false’ branch (when ‘c < 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: acquire_resource: opened here
libsolv-0.7.34/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:180:7: danger: ‘reffp’ leaks here; was opened at [(13)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/12)
#  178|   #ifdef ENABLE_RPMDB_LIBRPM
#  179|         char *macro = solv_dupjoin("_dbpath ", dbpath, 0);
#  180|->       rpmDefineMacro(NULL, macro, 0);
#  181|         free(macro);
#  182|   #else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
libsolv-0.7.34/tools/rpmdb2solv.c:180:7: warning[-Wanalyzer-malloc-leak]: leak of ‘reffp’
libsolv-0.7.34/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:92:10: branch_false: following ‘false’ branch (when ‘c < 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: acquire_memory: allocated here
libsolv-0.7.34/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:180:7: danger: ‘reffp’ leaks here; was allocated at [(13)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/12)
#  178|   #ifdef ENABLE_RPMDB_LIBRPM
#  179|         char *macro = solv_dupjoin("_dbpath ", dbpath, 0);
#  180|->       rpmDefineMacro(NULL, macro, 0);
#  181|         free(macro);
#  182|   #else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def300]
libsolv-0.7.34/tools/rpmdb2solv.c:188:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘reffp’
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: acquire_resource: opened here
libsolv-0.7.34/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: following ‘false’ branch (when ‘dbpath’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:188:10: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:188:10: danger: ‘reffp’ leaks here; was opened at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  186|       }
#  187|   
#  188|->   repo = repo_create(pool, "installed");
#  189|     data = repo_add_repodata(repo, 0);
#  190|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
libsolv-0.7.34/tools/rpmdb2solv.c:188:10: warning[-Wanalyzer-malloc-leak]: leak of ‘reffp’
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: acquire_memory: allocated here
libsolv-0.7.34/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: following ‘false’ branch (when ‘dbpath’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:188:10: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:188:10: danger: ‘reffp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  186|       }
#  187|   
#  188|->   repo = repo_create(pool, "installed");
#  189|     data = repo_add_repodata(repo, 0);
#  190|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def302]
libsolv-0.7.34/tools/rpmdb2solv.c:189:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘reffp’
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: acquire_resource: opened here
libsolv-0.7.34/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: following ‘false’ branch (when ‘dbpath’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:188:10: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:189:10: danger: ‘reffp’ leaks here; was opened at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  187|   
#  188|     repo = repo_create(pool, "installed");
#  189|->   data = repo_add_repodata(repo, 0);
#  190|   
#  191|     if (!nopacks)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
libsolv-0.7.34/tools/rpmdb2solv.c:189:10: warning[-Wanalyzer-malloc-leak]: leak of ‘reffp’
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: acquire_memory: allocated here
libsolv-0.7.34/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: following ‘false’ branch (when ‘dbpath’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:188:10: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:189:10: danger: ‘reffp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  187|   
#  188|     repo = repo_create(pool, "installed");
#  189|->   data = repo_add_repodata(repo, 0);
#  190|   
#  191|     if (!nopacks)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def304]
libsolv-0.7.34/tools/rpmdb2solv.c:198:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘reffp’
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: acquire_resource: opened here
libsolv-0.7.34/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: following ‘false’ branch (when ‘dbpath’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:188:10: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:191:6: branch_true: following ‘true’ branch (when ‘nopacks == 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:194:10: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:198:11: danger: ‘reffp’ leaks here; was opened at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  196|         if (add_changelog)
#  197|   	flags |= RPM_ADD_WITH_CHANGELOG;
#  198|->       if (repo_add_rpmdb_reffp(repo, reffp, flags))
#  199|   	{
#  200|   	  fprintf(stderr, "rpmdb2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def305]
libsolv-0.7.34/tools/rpmdb2solv.c:198:11: warning[-Wanalyzer-malloc-leak]: leak of ‘reffp’
libsolv-0.7.34/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:159:20: acquire_memory: allocated here
libsolv-0.7.34/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:175:6: branch_false: following ‘false’ branch (when ‘dbpath’ is NULL)...
libsolv-0.7.34/tools/rpmdb2solv.c:188:10: branch_false: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:191:6: branch_true: following ‘true’ branch (when ‘nopacks == 0’)...
libsolv-0.7.34/tools/rpmdb2solv.c:194:10: branch_true: ...to here
libsolv-0.7.34/tools/rpmdb2solv.c:198:11: danger: ‘reffp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  196|         if (add_changelog)
#  197|   	flags |= RPM_ADD_WITH_CHANGELOG;
#  198|->       if (repo_add_rpmdb_reffp(repo, reffp, flags))
#  199|   	{
#  200|   	  fprintf(stderr, "rpmdb2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def306]
libsolv-0.7.34/tools/rpms2solv.c:142:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.34/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.34/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.34/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.34/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.34/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:112:22: acquire_resource: opened here
libsolv-0.7.34/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.34/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:142:10: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  140|         rpms[nrpms++] = strdup(argv[optind++]);
#  141|       }
#  142|->   repo = repo_create(pool, "rpms2solv");
#  143|     repo_add_repodata(repo, 0);
#  144|     res = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
libsolv-0.7.34/tools/rpms2solv.c:142:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.34/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.34/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.34/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.34/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:112:22: acquire_memory: allocated here
libsolv-0.7.34/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.34/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:142:10: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  140|         rpms[nrpms++] = strdup(argv[optind++]);
#  141|       }
#  142|->   repo = repo_create(pool, "rpms2solv");
#  143|     repo_add_repodata(repo, 0);
#  144|     res = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def308]
libsolv-0.7.34/tools/rpms2solv.c:143:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.34/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.34/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.34/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.34/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.34/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:112:22: acquire_resource: opened here
libsolv-0.7.34/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.34/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:143:3: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  141|       }
#  142|     repo = repo_create(pool, "rpms2solv");
#  143|->   repo_add_repodata(repo, 0);
#  144|     res = 0;
#  145|     for (i = 0; i < nrpms; i++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
libsolv-0.7.34/tools/rpms2solv.c:143:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.34/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.34/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.34/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.34/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.34/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:112:22: acquire_memory: allocated here
libsolv-0.7.34/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.34/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.34/tools/rpms2solv.c:143:3: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  141|       }
#  142|     repo = repo_create(pool, "rpms2solv");
#  143|->   repo_add_repodata(repo, 0);
#  144|     res = 0;
#  145|     for (i = 0; i < nrpms; i++)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def310]
libsolv-0.7.34/tools/susetags2solv.c:116:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(contentfile, "r")’
libsolv-0.7.34/tools/susetags2solv.c:74:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/susetags2solv.c:76:7: branch_true: ...to here
libsolv-0.7.34/tools/susetags2solv.c:108:6: branch_true: following ‘true’ branch (when ‘contentfile’ is non-NULL)...
libsolv-0.7.34/tools/susetags2solv.c:110:18: branch_true: ...to here
libsolv-0.7.34/tools/susetags2solv.c:110:18: acquire_resource: opened here
libsolv-0.7.34/tools/susetags2solv.c:111:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/susetags2solv.c:116:11: branch_false: ...to here
libsolv-0.7.34/tools/susetags2solv.c:116:11: danger: ‘fopen(contentfile, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  114|   	  exit(1);
#  115|   	}
#  116|->       if (repo_add_content(repo, fp, REPO_REUSE_REPODATA))
#  117|   	{
#  118|   	  fprintf(stderr, "susetags2solv: %s: %s\n", contentfile, pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
libsolv-0.7.34/tools/susetags2solv.c:116:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(contentfile, "r")’
libsolv-0.7.34/tools/susetags2solv.c:74:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.34/tools/susetags2solv.c:76:7: branch_true: ...to here
libsolv-0.7.34/tools/susetags2solv.c:108:6: branch_true: following ‘true’ branch (when ‘contentfile’ is non-NULL)...
libsolv-0.7.34/tools/susetags2solv.c:110:18: branch_true: ...to here
libsolv-0.7.34/tools/susetags2solv.c:110:18: acquire_memory: allocated here
libsolv-0.7.34/tools/susetags2solv.c:111:10: branch_false: following ‘false’ branch...
libsolv-0.7.34/tools/susetags2solv.c:116:11: branch_false: ...to here
libsolv-0.7.34/tools/susetags2solv.c:116:11: danger: ‘fopen(contentfile, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  114|   	  exit(1);
#  115|   	}
#  116|->       if (repo_add_content(repo, fp, REPO_REUSE_REPODATA))
#  117|   	{
#  118|   	  fprintf(stderr, "susetags2solv: %s: %s\n", contentfile, pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def312]
libsolv-0.7.34/tools/testsolv.c:284:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "r")’
libsolv-0.7.34/tools/testsolv.c:267:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/testsolv.c:269:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/testsolv.c:271:14: branch_true: ...to here
libsolv-0.7.34/tools/testsolv.c:276:12: acquire_resource: opened here
libsolv-0.7.34/tools/testsolv.c:277:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/testsolv.c:282:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/testsolv.c:284:11: branch_true: ...to here
libsolv-0.7.34/tools/testsolv.c:284:11: danger: ‘fopen(*<unknown>, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  282|         while (!feof(fp))
#  283|   	{
#  284|-> 	  queue_init(&job);
#  285|   	  result = 0;
#  286|   	  resultflags = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
libsolv-0.7.34/tools/testsolv.c:284:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "r")’
libsolv-0.7.34/tools/testsolv.c:267:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/testsolv.c:269:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/testsolv.c:271:14: branch_true: ...to here
libsolv-0.7.34/tools/testsolv.c:276:12: acquire_memory: allocated here
libsolv-0.7.34/tools/testsolv.c:277:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/testsolv.c:282:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/testsolv.c:284:11: branch_true: ...to here
libsolv-0.7.34/tools/testsolv.c:284:11: danger: ‘fopen(*<unknown>, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  282|         while (!feof(fp))
#  283|   	{
#  284|-> 	  queue_init(&job);
#  285|   	  result = 0;
#  286|   	  resultflags = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def314]
libsolv-0.7.34/tools/testsolv.c:287:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "r")’
libsolv-0.7.34/tools/testsolv.c:267:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/testsolv.c:269:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/testsolv.c:271:14: branch_true: ...to here
libsolv-0.7.34/tools/testsolv.c:276:12: acquire_resource: opened here
libsolv-0.7.34/tools/testsolv.c:277:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/testsolv.c:282:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/testsolv.c:284:11: branch_true: ...to here
libsolv-0.7.34/tools/testsolv.c:287:18: danger: ‘fopen(*<unknown>, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  285|   	  result = 0;
#  286|   	  resultflags = 0;
#  287|-> 	  solv = testcase_read(pool, fp, argv[optind], &job, &result, &resultflags);
#  288|   	  if (!solv)
#  289|   	    {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def315]
libsolv-0.7.34/tools/testsolv.c:287:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "r")’
libsolv-0.7.34/tools/testsolv.c:267:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/testsolv.c:269:10: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/testsolv.c:271:14: branch_true: ...to here
libsolv-0.7.34/tools/testsolv.c:276:12: acquire_memory: allocated here
libsolv-0.7.34/tools/testsolv.c:277:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
libsolv-0.7.34/tools/testsolv.c:282:14: branch_true: following ‘true’ branch...
libsolv-0.7.34/tools/testsolv.c:284:11: branch_true: ...to here
libsolv-0.7.34/tools/testsolv.c:287:18: danger: ‘fopen(*<unknown>, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  285|   	  result = 0;
#  286|   	  resultflags = 0;
#  287|-> 	  solv = testcase_read(pool, fp, argv[optind], &job, &result, &resultflags);
#  288|   	  if (!solv)
#  289|   	    {

Error: CPPCHECK_WARNING (CWE-758): [#def316]
libsolv-0.7.34/tools/testsolv.c:402: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  400|   	      solv->solution_callback = 0;
#  401|   	      solv->solution_callback_data = 0;
#  402|-> 	      if ((resultflags & ~TESTCASE_RESULT_REUSE_SOLVER) == 0)
#  403|   		resultflags |= TESTCASE_RESULT_TRANSACTION | TESTCASE_RESULT_PROBLEMS;
#  404|   	      myresult = testcase_solverresult(solv, resultflags);

Error: CPPCHECK_WARNING (CWE-758): [#def317]
libsolv-0.7.34/tools/testsolv.c:521: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  519|   	    }
#  520|   	  queue_free(&job);
#  521|-> 	  if ((resultflags & TESTCASE_RESULT_REUSE_SOLVER) != 0 && !feof(fp))
#  522|   	    reusesolv = solv;
#  523|   	  else

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-118.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-namelibsolv-0.7.34-5.fc44
store-results-to/tmp/tmpnvt6um17/libsolv-0.7.34-5.fc44.tar.xz
time-created2025-10-28 19:23:21
time-finished2025-10-28 19:26:18
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpnvt6um17/libsolv-0.7.34-5.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpnvt6um17/libsolv-0.7.34-5.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9