libsolv-0.7.35-3.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
libsolv-0.7.35/examples/solv/checksig.c:62:19: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(pool_tmpjoin(sigpool,  gpgdir, "/keys", 0), "w")’
libsolv-0.7.35/examples/solv/checksig.c:53:6: branch_false: following ‘false’ branch (when ‘gpgdir’ is non-NULL)...
libsolv-0.7.35/examples/solv/checksig.c:55:14: branch_false: ...to here
libsolv-0.7.35/examples/solv/checksig.c:56:15: acquire_resource: opened here
libsolv-0.7.35/examples/solv/checksig.c:56:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/checksig.c:62:19: branch_false: ...to here
libsolv-0.7.35/examples/solv/checksig.c:62:43: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/checksig.c:64:12: branch_true: ...to here
libsolv-0.7.35/examples/solv/checksig.c:66:16: throw: if ‘solvable_lookup_str’ throws an exception...
libsolv-0.7.35/examples/solv/checksig.c:62:19: 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)
#   60|       }
#   61|     nkeys = 0;
#   62|->   for (p = 1, s = sigpool->solvables + p; p < sigpool->nsolvables; p++, s++)
#   63|       {
#   64|         if (!s->repo)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libsolv-0.7.35/examples/solv/checksig.c:62:19: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(pool_tmpjoin(sigpool,  gpgdir, "/keys", 0), "w")’
libsolv-0.7.35/examples/solv/checksig.c:53:6: branch_false: following ‘false’ branch (when ‘gpgdir’ is non-NULL)...
libsolv-0.7.35/examples/solv/checksig.c:55:14: branch_false: ...to here
libsolv-0.7.35/examples/solv/checksig.c:56:15: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/checksig.c:56:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/checksig.c:62:19: branch_false: ...to here
libsolv-0.7.35/examples/solv/checksig.c:62:43: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/checksig.c:64:12: branch_true: ...to here
libsolv-0.7.35/examples/solv/checksig.c:66:16: throw: if ‘solvable_lookup_str’ throws an exception...
libsolv-0.7.35/examples/solv/checksig.c:62:19: 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)
#   60|       }
#   61|     nkeys = 0;
#   62|->   for (p = 1, s = sigpool->solvables + p; p < sigpool->nsolvables; p++, s++)
#   63|       {
#   64|         if (!s->repo)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
libsolv-0.7.35/examples/solv/deltarpm.c:20:8: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:100:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: branch_false: ...to here
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:23:7: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:100:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: branch_false: ...to here
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:43:3: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:43:3: throw: if ‘dataiterator_init’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:44:3: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:44:3: throw: if ‘dataiterator_prepend_keyname’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: throw: if ‘dataiterator_step’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:49:7: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: throw: if ‘dataiterator_setpos_parent’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:50:11: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:50:11: throw: if ‘pool_lookup_id’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:51:11: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:51:11: throw: if ‘pool_lookup_id’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:53:17: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:53:17: throw: if ‘pool_lookup_id’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:70:21: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:70:21: throw: if ‘pool_id2str’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:74:17: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: throw: if ‘pool_lookup_str’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:75:17: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:75:17: throw: if ‘pool_lookup_str’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:83:15: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:83:15: throw: if ‘system’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:83:22: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:83:22: throw: if ‘pool_tmpjoin’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:87:20: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:87:20: throw: if ‘pool_lookup_bin_checksum’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:90:18: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:90:18: throw: if ‘pool_lookup_deltalocation’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:96:37: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:94:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:96:37: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:96:37: throw: if ‘repo_lookup_str’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:97:22: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:94:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:96:37: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:97:22: throw: if ‘pool_tmpjoin’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:100:21: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:94:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:100:21: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:100:21: throw: if ‘curlfopen’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:109:11: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:100:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: return_function: returning to ‘trydeltadownload’ from ‘opentmpfile’
libsolv-0.7.35/examples/solv/deltarpm.c:109:11: throw: if ‘fcntl’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:110:15: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:100:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: return_function: returning to ‘trydeltadownload’ from ‘opentmpfile’
libsolv-0.7.35/examples/solv/deltarpm.c:110:15: throw: if ‘system’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:112:15: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:100:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: return_function: returning to ‘trydeltadownload’ from ‘opentmpfile’
libsolv-0.7.35/examples/solv/deltarpm.c:110:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:112:15: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:112:15: throw: if ‘close’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:118:20: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:83:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:86:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:88:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:90:18: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:91:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:94:15: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:100:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: return_function: returning to ‘trydeltadownload’ from ‘opentmpfile’
libsolv-0.7.35/examples/solv/deltarpm.c:110:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:116:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:118:20: throw: if ‘solvable_lookup_bin_checksum’ throws an exception...
libsolv-0.7.35/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.35/examples/solv/deltarpm.c:119:30: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: return_function: returning to ‘trydeltadownload’ from ‘opentmpfile’
libsolv-0.7.35/examples/solv/deltarpm.c:119:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:119:30: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:119:30: throw: if ‘verify_checksum’ throws an exception...
libsolv-0.7.35/examples/solv/deltarpm.c:119:30: danger: ‘matchname’ leaks here; was allocated at [(2)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/1)
#  117|   	  chksumtype = 0;
#  118|   	  chksum = solvable_lookup_bin_checksum(s, SOLVABLE_CHECKSUM, &chksumtype);
#  119|-> 	  if (chksumtype && !verify_checksum(newfd, loc, chksum, chksumtype))
#  120|   	    {
#  121|   	      close(newfd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
libsolv-0.7.35/examples/solv/deltarpm.c:121:15: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: return_function: returning to ‘trydeltadownload’ from ‘opentmpfile’
libsolv-0.7.35/examples/solv/deltarpm.c:119:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:121:15: throw: if ‘close’ throws an exception...
libsolv-0.7.35/examples/solv/deltarpm.c:121:15: danger: ‘matchname’ leaks here; was allocated at [(2)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/1)
#  119|   	  if (chksumtype && !verify_checksum(newfd, loc, chksum, chksumtype))
#  120|   	    {
#  121|-> 	      close(newfd);
#  122|   	      fclose(fp);
#  123|   	      continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
libsolv-0.7.35/examples/solv/deltarpm.c:130:3: warning[-Wanalyzer-malloc-leak]: leak of ‘matchname’
libsolv-0.7.35/examples/solv/deltarpm.c:41:21: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:130:3: throw: if ‘dataiterator_free’ throws an exception...
libsolv-0.7.35/examples/solv/deltarpm.c:130:3: danger: ‘matchname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/29/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): [#def29]
libsolv-0.7.35/examples/solv/deltarpm.c:130:3: warning[-Wanalyzer-malloc-leak]: leak of ‘retfp’
libsolv-0.7.35/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: return_function: returning to ‘trydeltadownload’ from ‘opentmpfile’
libsolv-0.7.35/examples/solv/deltarpm.c:125:19: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:130:3: throw: if ‘dataiterator_free’ throws an exception...
libsolv-0.7.35/examples/solv/deltarpm.c:130:3: danger: ‘retfp’ leaks here; was allocated at [(15)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/14)
#  128|   	}
#  129|       }
#  130|->   dataiterator_free(&di);
#  131|     solv_free(matchname);
#  132|     return retfp;

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
libsolv-0.7.35/examples/solv/deltarpm.c:131:3: warning[-Wanalyzer-malloc-leak]: leak of ‘retfp’
libsolv-0.7.35/examples/solv/deltarpm.c:31:1: enter_function: entry to ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:45:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:49:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:71:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:74:17: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:76:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/deltarpm.c:79:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: call_function: calling ‘opentmpfile’ from ‘trydeltadownload’
libsolv-0.7.35/examples/solv/deltarpm.c:103:19: return_function: returning to ‘trydeltadownload’ from ‘opentmpfile’
libsolv-0.7.35/examples/solv/deltarpm.c:125:19: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/deltarpm.c:131:3: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/examples/solv/deltarpm.c:131:3: danger: ‘retfp’ leaks here; was allocated at [(15)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/14)
#  129|       }
#  130|     dataiterator_free(&di);
#  131|->   solv_free(matchname);
#  132|     return retfp;
#  133|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
libsolv-0.7.35/examples/solv/repoinfo_cache.c:109:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(calc_cachepath(repo,  repoext,  forcesystemloc), "r")’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:86:1: enter_function: entry to ‘usecachedrepo’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:90:27: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:90:57: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:90:56: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:98:20: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:107:20: call_function: calling ‘calc_cachepath’ from ‘usecachedrepo’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:107:20: return_function: returning to ‘usecachedrepo’ from ‘calc_cachepath’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:107:14: acquire_resource: opened here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:107:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:109:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:109:6: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:109:20: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:118:7: throw: if ‘fseek’ throws an exception...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:109:20: danger: ‘fopen(calc_cachepath(repo,  repoext,  forcesystemloc), "r")’ leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  107|     if (!(fp = fopen(calc_cachepath(repo, repoext, forcesystemloc), "r")))
#  108|       return 0;
#  109|->   if (!repoext && !cinfo->cookieset && cinfo->autorefresh && cinfo->metadata_expire != -1)
#  110|       {
#  111|         struct stat stb;		/* no cookie set yet, check cache expiry time */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
libsolv-0.7.35/examples/solv/repoinfo_cache.c:109:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(calc_cachepath(repo,  repoext,  forcesystemloc), "r")’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:86:1: enter_function: entry to ‘usecachedrepo’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:90:27: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:90:57: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:90:56: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:98:20: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:107:20: call_function: calling ‘calc_cachepath’ from ‘usecachedrepo’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:107:20: return_function: returning to ‘usecachedrepo’ from ‘calc_cachepath’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:107:14: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:107:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:109:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:109:6: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:109:20: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:118:7: throw: if ‘fseek’ throws an exception...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:109:20: danger: ‘fopen(calc_cachepath(repo,  repoext,  forcesystemloc), "r")’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#  107|     if (!(fp = fopen(calc_cachepath(repo, repoext, forcesystemloc), "r")))
#  108|       return 0;
#  109|->   if (!repoext && !cinfo->cookieset && cinfo->autorefresh && cinfo->metadata_expire != -1)
#  110|       {
#  111|         struct stat stb;		/* no cookie set yet, check cache expiry time */

Error: GCC_ANALYZER_WARNING (CWE-457): [#def34]
libsolv-0.7.35/examples/solv/repoinfo_cache.c:154:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘myextcookie’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:86:1: enter_function: entry to ‘usecachedrepo’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:90:27: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:90:57: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:90:56: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:98:20: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:107:20: call_function: calling ‘calc_cachepath’ from ‘usecachedrepo’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:107:20: return_function: returning to ‘usecachedrepo’ from ‘calc_cachepath’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:107:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:109:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:109:6: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:109:20: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:118:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:123:6: branch_false: following ‘false’ branch (when ‘cookie’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:128:7: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:128:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:136:3: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:139:6: branch_false: following ‘false’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:145:7: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:145:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:150:7: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:150:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:154:7: danger: use of uninitialized value ‘myextcookie’ here
#  152|         memcpy(cinfo->cookie, mycookie, sizeof(mycookie));
#  153|         cinfo->cookieset = 1;
#  154|->       memcpy(cinfo->extcookie, myextcookie, sizeof(myextcookie));
#  155|         cinfo->extcookieset = 1;
#  156|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def35]
libsolv-0.7.35/examples/solv/repoinfo_cache.c:184:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tmpl, "r")’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:178:8: acquire_resource: opened here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:181:6: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:184:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:184:7: throw: if ‘repo_empty’ throws an exception...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:184:7: danger: ‘fopen(tmpl, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/11/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): [#def36]
libsolv-0.7.35/examples/solv/repoinfo_cache.c:184:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tmpl, "r")’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:178:8: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:181:6: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:184:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:184:7: throw: if ‘repo_empty’ throws an exception...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:184:7: danger: ‘fopen(tmpl, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/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): [#def37]
libsolv-0.7.35/examples/solv/repoinfo_cache.c:185:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tmpl, "r")’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:178:8: acquire_resource: opened here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:181:6: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:184:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:185:11: throw: if ‘repo_add_solv’ throws an exception...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:185:11: danger: ‘fopen(tmpl, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/13/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): [#def38]
libsolv-0.7.35/examples/solv/repoinfo_cache.c:185:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tmpl, "r")’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:178:8: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:181:6: branch_true: following ‘true’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:184:7: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:185:11: throw: if ‘repo_add_solv’ throws an exception...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:185:11: danger: ‘fopen(tmpl, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/14/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): [#def39]
libsolv-0.7.35/examples/solv/repoinfo_cache.c:197:52: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tmpl, "r")’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:178:8: acquire_resource: opened here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:181:6: branch_false: following ‘false’ branch (when ‘repoext’ is non-NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:197:52: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:197:7: throw: if ‘repodata_extend_block’ throws an exception...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:197:52: danger: ‘fopen(tmpl, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/15/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): [#def40]
libsolv-0.7.35/examples/solv/repoinfo_cache.c:197:52: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tmpl, "r")’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:170:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:172:8: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:175:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:178:8: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:178:8: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:179:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:181:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:181:6: branch_false: following ‘false’ branch (when ‘repoext’ is non-NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:197:52: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:197:7: throw: if ‘repodata_extend_block’ throws an exception...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:197:52: danger: ‘fopen(tmpl, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/16/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): [#def41]
libsolv-0.7.35/examples/solv/repoinfo_cache.c:238:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:215:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:223:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:228:3: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:229:14: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:229:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:237:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:237:6: branch_true: following ‘true’ branch (when ‘repodata’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:238:5: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:238:5: throw: if ‘repo_write’ throws an exception...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:238:5: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/19/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): [#def42]
libsolv-0.7.35/examples/solv/repoinfo_cache.c:240:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:215:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:223:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:228:3: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:229:14: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:229:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:237:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:237:6: branch_false: following ‘false’ branch (when ‘repodata’ is non-NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:239:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:239:11: branch_true: following ‘true’ branch (when ‘repoext’ is non-NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:240:5: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:240:5: throw: if ‘repodata_write’ throws an exception...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:240:5: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/20/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): [#def43]
libsolv-0.7.35/examples/solv/repoinfo_cache.c:245:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/examples/solv/repoinfo_cache.c:215:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:223:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:228:3: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:229:14: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:229:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:237:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:237:6: branch_false: following ‘false’ branch (when ‘repodata’ is non-NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:239:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:239:11: branch_false: following ‘false’ branch (when ‘repoext’ is NULL)...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:243:11: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_cache.c:245:7: throw: if ‘repo_write’ throws an exception...
libsolv-0.7.35/examples/solv/repoinfo_cache.c:245:7: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/21/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: CPPCHECK_WARNING (CWE-682): [#def44]
libsolv-0.7.35/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): [#def45]
libsolv-0.7.35/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): [#def46]
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:105:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘basearch’
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:71:10: branch_true: following ‘true’ branch (when ‘p2’ is non-NULL)...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:73:12: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:94:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:96:15: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:96:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:99:19: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:99:18: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:104:26: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:104:26: acquire_memory: this call could return NULL
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:105:19: danger: ‘strdup(&un.machine)’ could be NULL: unchecked value from [(10)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/9)
#  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): [#def47]
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:140:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/etc/yum.repos.d")’
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:134:9: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:135:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:140:17: throw: if ‘readdir’ throws an exception...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:140:17: danger: ‘opendir("/etc/yum.repos.d")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/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): [#def48]
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:159:29: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&buf, "r")’
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:135:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:148:17: acquire_resource: opened here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:166:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:168:15: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:174:27: call_function: calling ‘solv_extend’ from ‘read_repoinfos_yum’
#  157|   	  if (l == 0)
#  158|   	    continue;
#  159|-> 	  while (l && (buf2[l - 1] == '\n' || buf2[l - 1] == ' ' || buf2[l - 1] == '\t'))
#  160|   	    buf2[--l] = 0;
#  161|   	  kp = buf2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:159:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&buf, "r")’
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:121:1: enter_function: entry to ‘read_repoinfos_yum’
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:135:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:135:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:140:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:142:11: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:148:17: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:159:18: branch_true: following ‘true’ branch (when ‘l != 0’)...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:159:29: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:166:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:168:15: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_config_yum.c:174:27: call_function: calling ‘solv_extend’ from ‘read_repoinfos_yum’
#  157|   	  if (l == 0)
#  158|   	    continue;
#  159|-> 	  while (l && (buf2[l - 1] == '\n' || buf2[l - 1] == ' ' || buf2[l - 1] == '\t'))
#  160|   	    buf2[--l] = 0;
#  161|   	  kp = buf2;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
libsolv-0.7.35/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.35/examples/solv/repoinfo_system_rpm.c:89:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_system_rpm.c:94:3: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_system_rpm.c:103:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_system_rpm.c:115:15: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_system_rpm.c:115:9: acquire_resource: opened here
libsolv-0.7.35/examples/solv/repoinfo_system_rpm.c:116:7: throw: if ‘repo_add_rpmdb_reffp’ throws an exception...
libsolv-0.7.35/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): [#def51]
libsolv-0.7.35/examples/solv/repoinfo_system_rpm.c:116:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(calc_cachepath(repo, 0, 0), "r")’
libsolv-0.7.35/examples/solv/repoinfo_system_rpm.c:89:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_system_rpm.c:94:3: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_system_rpm.c:103:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_system_rpm.c:115:15: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_system_rpm.c:115:9: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/repoinfo_system_rpm.c:116:7: throw: if ‘repo_add_rpmdb_reffp’ throws an exception...
libsolv-0.7.35/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): [#def52]
libsolv-0.7.35/examples/solv/repoinfo_type_debian.c:41:11: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘basearch’
libsolv-0.7.35/examples/solv/repoinfo_type_debian.c:32:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/examples/solv/repoinfo_type_debian.c:35:11: branch_true: ...to here
libsolv-0.7.35/examples/solv/repoinfo_type_debian.c:35:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_type_debian.c:40:18: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_type_debian.c:40:18: acquire_memory: this call could return NULL
libsolv-0.7.35/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): [#def53]
libsolv-0.7.35/examples/solv/repoinfo_type_plaindir.c:57:16: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(*cinfo.path)’
libsolv-0.7.35/examples/solv/repoinfo_type_plaindir.c:39:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_type_plaindir.c:44:53: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_type_plaindir.c:46:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_type_plaindir.c:51:3: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_type_plaindir.c:52:13: acquire_memory: allocated here
libsolv-0.7.35/examples/solv/repoinfo_type_plaindir.c:52:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/examples/solv/repoinfo_type_plaindir.c:52:6: branch_false: ...to here
libsolv-0.7.35/examples/solv/repoinfo_type_plaindir.c:57:16: throw: if ‘readdir’ throws an exception...
libsolv-0.7.35/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: [#def54]
libsolv-0.7.35/ext/repo_apk.c:262:13: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘fd’
libsolv-0.7.35/ext/repo_apk.c:686:1: enter_function: entry to ‘repo_add_apk_repo’
libsolv-0.7.35/ext/repo_apk.c:698:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_apk.c:700:3: branch_false: ...to here
libsolv-0.7.35/ext/repo_apk.c:702:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_apk.c:704:10: branch_true: ...to here
libsolv-0.7.35/ext/repo_apk.c:704:9: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_apk.c:706:10: branch_false: ...to here
libsolv-0.7.35/ext/repo_apk.c:706:9: branch_true: following ‘true’ branch...
libsolv-0.7.35/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): [#def55]
libsolv-0.7.35/ext/repo_apk.c:293:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘cfp’ where non-null expected
libsolv-0.7.35/ext/repo_apk.c:686:1: enter_function: entry to ‘repo_add_apk_repo’
libsolv-0.7.35/ext/repo_apk.c:698:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_apk.c:700:3: branch_false: ...to here
libsolv-0.7.35/ext/repo_apk.c:702:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_apk.c:704:10: branch_true: ...to here
libsolv-0.7.35/ext/repo_apk.c:704:9: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_apk.c:706:10: branch_false: ...to here
libsolv-0.7.35/ext/repo_apk.c:706:9: branch_true: following ‘true’ branch...
libsolv-0.7.35/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-775): [#def56]
libsolv-0.7.35/ext/repo_apk.c:410:34: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(<unknown>, 0)’
libsolv-0.7.35/ext/repo_apk.c:388:1: enter_function: entry to ‘repo_add_apk_pkg’
libsolv-0.7.35/ext/repo_apk.c:405:13: acquire_resource: opened here
libsolv-0.7.35/ext/repo_apk.c:405:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_apk.c:410:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_apk.c:410:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_apk.c:411:12: call_function: calling ‘add_apkv3_pkg’ from ‘repo_add_apk_pkg’
#  408|         return 0;
#  409|       }
#  410|->   if (read(fd, first, 4) == 4 && first[0] == 'A' && first[1] == 'D' && first[2] == 'B')
#  411|       return add_apkv3_pkg(repo, data, fn, flags, fd, first[3]);
#  412|     if (lseek(fd, 0, SEEK_SET)) 

Error: GCC_ANALYZER_WARNING (CWE-457): [#def57]
libsolv-0.7.35/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): [#def58]
libsolv-0.7.35/ext/repo_appdata.c:218:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filepath, "r")’
libsolv-0.7.35/ext/repo_appdata.c:211:14: acquire_resource: opened here
libsolv-0.7.35/ext/repo_appdata.c:211:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_appdata.c:211:6: branch_false: ...to here
libsolv-0.7.35/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:257:37: throw: if ‘pool_tmpjoin’ throws an exception...
libsolv-0.7.35/ext/repo_appdata.c:218:15: danger: ‘fopen(filepath, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  216|         if (!l)
#  217|   	continue;
#  218|->       if (buf[l - 1] != '\n')
#  219|   	{
#  220|   	  /* ignore overlong lines */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
libsolv-0.7.35/ext/repo_appdata.c:218:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filepath, "r")’
libsolv-0.7.35/ext/repo_appdata.c:211:14: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_appdata.c:211:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_appdata.c:211:6: branch_false: ...to here
libsolv-0.7.35/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:213:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:215:18: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:257:37: throw: if ‘pool_tmpjoin’ throws an exception...
libsolv-0.7.35/ext/repo_appdata.c:218:15: danger: ‘fopen(filepath, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  216|         if (!l)
#  217|   	continue;
#  218|->       if (buf[l - 1] != '\n')
#  219|   	{
#  220|   	  /* ignore overlong lines */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
libsolv-0.7.35/ext/repo_appdata.c:540:23: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirpath)’
libsolv-0.7.35/ext/repo_appdata.c:537:14: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:537:6: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:540:23: throw: if ‘readdir’ throws an exception...
libsolv-0.7.35/ext/repo_appdata.c:540:23: danger: ‘opendir(dirpath)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/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): [#def61]
libsolv-0.7.35/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.35/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:537:6: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:551:16: acquire_resource: opened here
libsolv-0.7.35/ext/repo_appdata.c:557:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:559:23: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:559:23: throw: if ‘pool_str2id’ throws an exception...
libsolv-0.7.35/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/7/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): [#def62]
libsolv-0.7.35/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.35/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:537:6: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:551:16: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_appdata.c:557:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:559:23: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:559:23: throw: if ‘pool_str2id’ throws an exception...
libsolv-0.7.35/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/8/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-775): [#def63]
libsolv-0.7.35/ext/repo_appdata.c:569:136: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.35/ext/repo_appdata.c:520:1: enter_function: entry to ‘repo_add_appdata_dir’
libsolv-0.7.35/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:537:6: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:551:16: acquire_resource: opened here
libsolv-0.7.35/ext/repo_appdata.c:557:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_appdata.c:569:136: branch_false: ...to here
libsolv-0.7.35/ext/repo_appdata.c:569:11: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:569:11: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:569:11: call_function: calling ‘repo_add_appdata_fn’ from ‘repo_add_appdata_dir’
#  567|   		}
#  568|   	    }
#  569|-> 	  repo_add_appdata_fn(repo, fp, flags | REPO_NO_INTERNALIZE | REPO_REUSE_REPODATA | APPDATA_CHECK_DESKTOP_FILE, entry->d_name, oq.count ? &oq : 0);
#  570|   	  fclose(fp);
#  571|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
libsolv-0.7.35/ext/repo_appdata.c:569:136: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(pool_tmpjoin(*repo.pool,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.35/ext/repo_appdata.c:520:1: enter_function: entry to ‘repo_add_appdata_dir’
libsolv-0.7.35/ext/repo_appdata.c:537:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:537:6: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:540:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:544:28: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:551:16: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_appdata.c:557:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_appdata.c:569:136: branch_false: ...to here
libsolv-0.7.35/ext/repo_appdata.c:569:11: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_appdata.c:569:11: branch_true: ...to here
libsolv-0.7.35/ext/repo_appdata.c:569:11: call_function: calling ‘repo_add_appdata_fn’ from ‘repo_add_appdata_dir’
#  567|   		}
#  568|   	    }
#  569|-> 	  repo_add_appdata_fn(repo, fp, flags | REPO_NO_INTERNALIZE | REPO_REUSE_REPODATA | APPDATA_CHECK_DESKTOP_FILE, entry->d_name, oq.count ? &oq : 0);
#  570|   	  fclose(fp);
#  571|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
libsolv-0.7.35/ext/repo_arch.c:533:20: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dir)’
libsolv-0.7.35/ext/repo_arch.c:530:8: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_arch.c:531:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_arch.c:531:6: branch_true: ...to here
libsolv-0.7.35/ext/repo_arch.c:533:20: throw: if ‘readdir’ throws an exception...
libsolv-0.7.35/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): [#def66]
libsolv-0.7.35/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.35/ext/repo_arch.c:531:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_arch.c:531:6: branch_true: ...to here
libsolv-0.7.35/ext/repo_arch.c:533:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_arch.c:535:16: branch_true: ...to here
libsolv-0.7.35/ext/repo_arch.c:540:21: acquire_resource: opened here
libsolv-0.7.35/ext/repo_arch.c:543:15: throw: if ‘tarhead_init’ throws an exception...
libsolv-0.7.35/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): [#def67]
libsolv-0.7.35/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.35/ext/repo_arch.c:531:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_arch.c:531:6: branch_true: ...to here
libsolv-0.7.35/ext/repo_arch.c:533:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_arch.c:535:16: branch_true: ...to here
libsolv-0.7.35/ext/repo_arch.c:540:21: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_arch.c:543:15: throw: if ‘tarhead_init’ throws an exception...
libsolv-0.7.35/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): [#def68]
libsolv-0.7.35/ext/repo_conda.c:405:30: warning[-Wanalyzer-malloc-leak]: leak of ‘pd.subdir’
libsolv-0.7.35/ext/repo_conda.c:465:1: enter_function: entry to ‘repo_add_conda’
libsolv-0.7.35/ext/repo_conda.c:485:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_conda.c:487:20: branch_false: ...to here
libsolv-0.7.35/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): [#def69]
libsolv-0.7.35/ext/repo_deb.c:675:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.35/ext/repo_deb.c:668:13: acquire_resource: opened here
libsolv-0.7.35/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_deb.c:673:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_deb.c:675:50: branch_true: ...to here
libsolv-0.7.35/ext/repo_deb.c:675:7: throw: if ‘pool_error’ throws an exception...
libsolv-0.7.35/ext/repo_deb.c:675:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/14/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): [#def70]
libsolv-0.7.35/ext/repo_deb.c:675:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.35/ext/repo_deb.c:668:13: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_deb.c:673:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_deb.c:675:50: branch_true: ...to here
libsolv-0.7.35/ext/repo_deb.c:675:7: throw: if ‘pool_error’ throws an exception...
libsolv-0.7.35/ext/repo_deb.c:675:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/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): [#def71]
libsolv-0.7.35/ext/repo_deb.c:682:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.35/ext/repo_deb.c:668:13: acquire_resource: opened here
libsolv-0.7.35/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_deb.c:682:7: throw: if ‘pool_error’ throws an exception...
libsolv-0.7.35/ext/repo_deb.c:682:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/16/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): [#def72]
libsolv-0.7.35/ext/repo_deb.c:682:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.35/ext/repo_deb.c:668:13: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_deb.c:668:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_deb.c:673:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_deb.c:673:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_deb.c:679:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_deb.c:682:7: throw: if ‘pool_error’ throws an exception...
libsolv-0.7.35/ext/repo_deb.c:682:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/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): [#def73]
libsolv-0.7.35/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.35/ext/repo_products.c:295:1: enter_function: entry to ‘repo_add_code11_products’
libsolv-0.7.35/ext/repo_products.c:313:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_products.c:320:16: branch_true: ...to here
libsolv-0.7.35/ext/repo_products.c:320:16: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.35/ext/repo_products.c:320:16: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.35/ext/repo_products.c:325:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_products.c:327:28: branch_true: ...to here
libsolv-0.7.35/ext/repo_products.c:331:22: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.35/ext/repo_products.c:331:22: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.35/ext/repo_products.c:332:16: acquire_resource: opened here
libsolv-0.7.35/ext/repo_products.c:340:15: throw: if ‘pool_error’ throws an exception...
libsolv-0.7.35/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/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-401): [#def74]
libsolv-0.7.35/ext/repo_products.c:340:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.35/ext/repo_products.c:295:1: enter_function: entry to ‘repo_add_code11_products’
libsolv-0.7.35/ext/repo_products.c:313:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_products.c:320:16: branch_true: ...to here
libsolv-0.7.35/ext/repo_products.c:320:16: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.35/ext/repo_products.c:320:16: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.35/ext/repo_products.c:325:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_products.c:327:28: branch_true: ...to here
libsolv-0.7.35/ext/repo_products.c:331:22: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.35/ext/repo_products.c:331:22: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.35/ext/repo_products.c:332:16: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_products.c:340:15: throw: if ‘pool_error’ throws an exception...
libsolv-0.7.35/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/4/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): [#def75]
libsolv-0.7.35/ext/repo_products.c:344:31: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.35/ext/repo_products.c:295:1: enter_function: entry to ‘repo_add_code11_products’
libsolv-0.7.35/ext/repo_products.c:313:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_products.c:320:16: branch_true: ...to here
libsolv-0.7.35/ext/repo_products.c:320:16: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.35/ext/repo_products.c:320:16: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.35/ext/repo_products.c:325:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_products.c:327:28: branch_true: ...to here
libsolv-0.7.35/ext/repo_products.c:331:22: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.35/ext/repo_products.c:331:22: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.35/ext/repo_products.c:332:16: acquire_resource: opened here
libsolv-0.7.35/ext/repo_products.c:348:15: throw: if ‘solv_xmlparser_parse’ throws an exception...
libsolv-0.7.35/ext/repo_products.c:344:31: danger: ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’ leaks here; was opened at [(28)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/27)
#  342|   	      continue;
#  343|   	    }
#  344|-> 	  pd.currentproduct = st.st_ino;
#  345|   	  pd.ctime = (unsigned int)st.st_ctime;
#  346|   	  pd.filename = fullpath;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
libsolv-0.7.35/ext/repo_products.c:344:31: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.35/ext/repo_products.c:295:1: enter_function: entry to ‘repo_add_code11_products’
libsolv-0.7.35/ext/repo_products.c:313:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_products.c:320:16: branch_true: ...to here
libsolv-0.7.35/ext/repo_products.c:320:16: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.35/ext/repo_products.c:320:16: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.35/ext/repo_products.c:325:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_products.c:327:28: branch_true: ...to here
libsolv-0.7.35/ext/repo_products.c:331:22: call_function: calling ‘join2’ from ‘repo_add_code11_products’
libsolv-0.7.35/ext/repo_products.c:331:22: return_function: returning to ‘repo_add_code11_products’ from ‘join2’
libsolv-0.7.35/ext/repo_products.c:332:16: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_products.c:348:15: throw: if ‘solv_xmlparser_parse’ throws an exception...
libsolv-0.7.35/ext/repo_products.c:344:31: danger: ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’ leaks here; was allocated at [(28)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/27)
#  342|   	      continue;
#  343|   	    }
#  344|-> 	  pd.currentproduct = st.st_ino;
#  345|   	  pd.ctime = (unsigned int)st.st_ctime;
#  346|   	  pd.filename = fullpath;

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
libsolv-0.7.35/ext/repo_products.c:429:7: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(pool_get_rootdir(*repo.pool))’
libsolv-0.7.35/ext/repo_products.c:404:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_products.c:413:6: branch_false: ...to here
libsolv-0.7.35/ext/repo_products.c:416:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_products.c:423:14: branch_false: ...to here
libsolv-0.7.35/ext/repo_products.c:424:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_products.c:426:13: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_products.c:427:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_products.c:429:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_products.c:429:7: danger: ‘opendir(pool_get_rootdir(*repo.pool))’ leaks here; was allocated at [(7)](sarif:/runs/0/results/10/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): [#def81]
libsolv-0.7.35/ext/repo_releasefile_products.c:55:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.35/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.35/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.35/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.35/ext/repo_releasefile_products.c:152:21: acquire_resource: opened here
libsolv-0.7.35/ext/repo_releasefile_products.c:152:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:157:11: branch_false: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   53|         /* remove trailing \n */
#   54|         int l = strlen(buf);
#   55|->       if (l && buf[l - 1] == '\n')
#   56|   	buf[--l] = 0;
#   57|         ++lnum;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
libsolv-0.7.35/ext/repo_releasefile_products.c:55:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.35/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.35/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.35/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.35/ext/repo_releasefile_products.c:152:21: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_releasefile_products.c:152:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:157:11: branch_false: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   53|         /* remove trailing \n */
#   54|         int l = strlen(buf);
#   55|->       if (l && buf[l - 1] == '\n')
#   56|   	buf[--l] = 0;
#   57|         ++lnum;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def83]
libsolv-0.7.35/ext/repo_releasefile_products.c:69:28: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.35/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.35/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.35/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.35/ext/repo_releasefile_products.c:152:21: acquire_resource: opened here
libsolv-0.7.35/ext/repo_releasefile_products.c:152:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:157:11: branch_false: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   67|   	    }
#   68|   	  else
#   69|-> 	    ptr1 = buf + l - 1;
#   70|   
#   71|   	  /* track back until non-blank, non-digit */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
libsolv-0.7.35/ext/repo_releasefile_products.c:69:28: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.35/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.35/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.35/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.35/ext/repo_releasefile_products.c:152:21: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_releasefile_products.c:152:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:157:11: branch_false: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   67|   	    }
#   68|   	  else
#   69|-> 	    ptr1 = buf + l - 1;
#   70|   
#   71|   	  /* track back until non-blank, non-digit */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def85]
libsolv-0.7.35/ext/repo_releasefile_products.c:73:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.35/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.35/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.35/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.35/ext/repo_releasefile_products.c:152:21: acquire_resource: opened here
libsolv-0.7.35/ext/repo_releasefile_products.c:152:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:157:11: branch_false: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   71|   	  /* track back until non-blank, non-digit */
#   72|   	  while (ptr1 > buf
#   73|-> 		 && (*ptr1 == ' ' || isdigit(*ptr1) || *ptr1 == '.'))
#   74|   	    --ptr1;
#   75|   	  *(++ptr1) = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
libsolv-0.7.35/ext/repo_releasefile_products.c:73:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.35/ext/repo_releasefile_products.c:121:1: enter_function: entry to ‘repo_add_releasefile_products’
libsolv-0.7.35/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:143:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:145:24: branch_true: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:151:22: call_function: calling ‘join2’ from ‘repo_add_releasefile_products’
libsolv-0.7.35/ext/repo_releasefile_products.c:151:22: return_function: returning to ‘repo_add_releasefile_products’ from ‘join2’
libsolv-0.7.35/ext/repo_releasefile_products.c:152:21: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_releasefile_products.c:152:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:157:11: branch_false: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:157:11: call_function: calling ‘add_releasefile_product’ from ‘repo_add_releasefile_products’
#   71|   	  /* track back until non-blank, non-digit */
#   72|   	  while (ptr1 > buf
#   73|-> 		 && (*ptr1 == ' ' || isdigit(*ptr1) || *ptr1 == '.'))
#   74|   	    --ptr1;
#   75|   	  *(++ptr1) = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
libsolv-0.7.35/ext/repo_releasefile_products.c:143:19: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirpath)’
libsolv-0.7.35/ext/repo_releasefile_products.c:133:9: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_releasefile_products.c:134:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_releasefile_products.c:141:3: branch_false: ...to here
libsolv-0.7.35/ext/repo_releasefile_products.c:143:19: throw: if ‘readdir’ throws an exception...
libsolv-0.7.35/ext/repo_releasefile_products.c:143:19: danger: ‘opendir(dirpath)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/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-476): [#def88]
libsolv-0.7.35/ext/repo_rpmdb.c:686:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ignq’
libsolv-0.7.35/ext/repo_rpmdb.c:1136:1: enter_function: entry to ‘rpmhead2solv’
libsolv-0.7.35/ext/repo_rpmdb.c:1144:10: call_function: calling ‘headstring’ from ‘rpmhead2solv’
libsolv-0.7.35/ext/repo_rpmdb.c:1144:10: return_function: returning to ‘rpmhead2solv’ from ‘headstring’
libsolv-0.7.35/ext/repo_rpmdb.c:1145:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:1150:8: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:1153:15: call_function: calling ‘headstring’ from ‘rpmhead2solv’
libsolv-0.7.35/ext/repo_rpmdb.c:1153:15: return_function: returning to ‘rpmhead2solv’ from ‘headstring’
libsolv-0.7.35/ext/repo_rpmdb.c:1163:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:1165:9: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:1165:9: call_function: calling ‘headtoevr’ from ‘rpmhead2solv’
libsolv-0.7.35/ext/repo_rpmdb.c:1165:9: return_function: returning to ‘rpmhead2solv’ from ‘headtoevr’
libsolv-0.7.35/ext/repo_rpmdb.c:1172:17: call_function: calling ‘makedeps’ from ‘rpmhead2solv’
#  684|         olddeps = 0;
#  685|         queue_prealloc(ignq, cc);
#  686|->       ida = ignq->elements + ignq->count;
#  687|       }
#  688|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def89]
libsolv-0.7.35/ext/repo_rpmdb.c:1971:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.35/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.35/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:1969:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:1971:50: branch_true: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:1971:7: throw: if ‘pool_error’ throws an exception...
libsolv-0.7.35/ext/repo_rpmdb.c:1971:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/72/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): [#def90]
libsolv-0.7.35/ext/repo_rpmdb.c:1971:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.35/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:1969:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:1971:50: branch_true: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:1971:7: throw: if ‘pool_error’ throws an exception...
libsolv-0.7.35/ext/repo_rpmdb.c:1971:7: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/73/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): [#def91]
libsolv-0.7.35/ext/repo_rpmdb.c:1982:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(<unknown>, "r")’
libsolv-0.7.35/ext/repo_rpmdb.c:1964:13: acquire_resource: opened here
libsolv-0.7.35/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.35/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:1982:15: throw: if ‘solv_chksum_create’ throws an exception...
libsolv-0.7.35/ext/repo_rpmdb.c:1982:15: danger: ‘fopen(<unknown>, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/74/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): [#def92]
libsolv-0.7.35/ext/repo_rpmdb.c:1982:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(<unknown>, "r")’
libsolv-0.7.35/ext/repo_rpmdb.c:1964:13: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_rpmdb.c:1964:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:1969:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:1969:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:1977:3: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:1981:6: branch_true: following ‘true’ branch (when ‘chksumtype != 0’)...
libsolv-0.7.35/ext/repo_rpmdb.c:1982:15: branch_true: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:1982:15: throw: if ‘solv_chksum_create’ throws an exception...
libsolv-0.7.35/ext/repo_rpmdb.c:1982:15: danger: ‘fopen(<unknown>, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/75/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-688): [#def93]
libsolv-0.7.35/ext/repo_rpmdb.c:2346:11: warning[-Wanalyzer-null-argument]: use of NULL ‘space’ where non-null expected
libsolv-0.7.35/ext/repo_rpmdb.c:2232:1: enter_function: entry to ‘rpm_iterate_filelist’
libsolv-0.7.35/ext/repo_rpmdb.c:2252:8: call_function: inlined call to ‘headstringarray’ from ‘rpm_iterate_filelist’
libsolv-0.7.35/ext/repo_rpmdb.c:2252:8: call_function: inlined call to ‘headstringarray’ from ‘rpm_iterate_filelist’
libsolv-0.7.35/ext/repo_rpmdb.c:2253:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:2255:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:2255:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:2262:8: call_function: inlined call to ‘headstringarray’ from ‘rpm_iterate_filelist’
libsolv-0.7.35/ext/repo_rpmdb.c:2262:8: call_function: inlined call to ‘headstringarray’ from ‘rpm_iterate_filelist’
libsolv-0.7.35/ext/repo_rpmdb.c:2263:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:2268:8: call_function: inlined call to ‘headint32array’ from ‘rpm_iterate_filelist’
libsolv-0.7.35/ext/repo_rpmdb.c:2268:8: call_function: inlined call to ‘headint32array’ from ‘rpm_iterate_filelist’
libsolv-0.7.35/ext/repo_rpmdb.c:2269:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:2276:8: call_function: inlined call to ‘headint16array’ from ‘rpm_iterate_filelist’
libsolv-0.7.35/ext/repo_rpmdb.c:2277:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:2285:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:2298:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:2312:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:2327:3: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:2330:15: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_rpmdb.c:2332:10: branch_true: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:2332:10: branch_false: following ‘false’ branch (when ‘ff’ is NULL)...
libsolv-0.7.35/ext/repo_rpmdb.c:2334:17: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:2335:10: branch_false: following ‘false’ branch (when ‘lastdir > diidx’)...
libsolv-0.7.35/ext/repo_rpmdb.c:2337:7: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:2337:7: branch_true: following ‘true’ branch (when ‘lastdir != diidx’)...
libsolv-0.7.35/ext/repo_rpmdb.c:2337:51: branch_true: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:2339:10: branch_false: following ‘false’ branch (when ‘spacen >= l’)...
libsolv-0.7.35/ext/repo_rpmdb.c:2344:10: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:2344:10: branch_true: following ‘true’ branch (when ‘lastdir != diidx’)...
libsolv-0.7.35/ext/repo_rpmdb.c:2346:27: branch_true: ...to here
libsolv-0.7.35/ext/repo_rpmdb.c:2346:11: danger: argument 1 (‘space’) NULL where non-null expected
# 2344|         if (lastdir != diidx)
# 2345|   	{
# 2346|->           strcpy(space, dn[diidx]);
# 2347|   	  lastdir = diidx;
# 2348|   	  lastdirl = l1;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def94]
libsolv-0.7.35/ext/repo_rpmdb_librpm.h:206:10: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libsolv-0.7.35/ext/repo_rpmdb_librpm.h:168:1: enter_function: entry to ‘getinstalledrpmdbids’
libsolv-0.7.35/ext/repo_rpmdb_librpm.h:183:5: release_memory: ‘*namedatap’ is NULL
libsolv-0.7.35/ext/repo_rpmdb_librpm.h:185:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_rpmdb_librpm.h:188:6: branch_false: ...to here
libsolv-0.7.35/ext/repo_rpmdb_librpm.h:192:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_rpmdb_librpm.h:195:10: branch_true: ...to here
libsolv-0.7.35/ext/repo_rpmdb_librpm.h:205:21: call_function: calling ‘solv_extend’ from ‘getinstalledrpmdbids’
libsolv-0.7.35/ext/repo_rpmdb_librpm.h:205:21: return_function: returning to ‘getinstalledrpmdbids’ from ‘solv_extend’
libsolv-0.7.35/ext/repo_rpmdb_librpm.h:206:17: release_memory: using NULL here
libsolv-0.7.35/ext/repo_rpmdb_librpm.h:206:10: danger: argument 1 (‘solv_extend(namedata, (long unsigned int)namedatal,  keylen + 1, 1, 1023) + <unknown>’) NULL where non-null expected
#  204|          {
#  205|            namedata = solv_extend(namedata, namedatal, keylen + 1, 1, NAMEDATA_BLOCK);
#  206|->          memcpy(namedata + namedatal, key, keylen);
#  207|            namedata[namedatal + keylen] = 0;
#  208|            namedatal += keylen + 1;

Error: CPPCHECK_WARNING (CWE-786): [#def95]
libsolv-0.7.35/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): [#def96]
libsolv-0.7.35/ext/repo_zyppdb.c:170:23: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirpath)’
libsolv-0.7.35/ext/repo_zyppdb.c:167:9: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_zyppdb.c:168:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_zyppdb.c:168:6: branch_true: ...to here
libsolv-0.7.35/ext/repo_zyppdb.c:170:23: throw: if ‘readdir’ throws an exception...
libsolv-0.7.35/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): [#def97]
libsolv-0.7.35/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.35/ext/repo_zyppdb.c:149:1: enter_function: entry to ‘repo_add_zyppdb_products’
libsolv-0.7.35/ext/repo_zyppdb.c:168:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_zyppdb.c:168:6: branch_true: ...to here
libsolv-0.7.35/ext/repo_zyppdb.c:170:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_zyppdb.c:172:15: branch_true: ...to here
libsolv-0.7.35/ext/repo_zyppdb.c:174:22: call_function: calling ‘join2’ from ‘repo_add_zyppdb_products’
libsolv-0.7.35/ext/repo_zyppdb.c:174:22: return_function: returning to ‘repo_add_zyppdb_products’ from ‘join2’
libsolv-0.7.35/ext/repo_zyppdb.c:175:21: acquire_resource: opened here
libsolv-0.7.35/ext/repo_zyppdb.c:181:15: throw: if ‘solv_xmlparser_parse’ throws an exception...
libsolv-0.7.35/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): [#def98]
libsolv-0.7.35/ext/repo_zyppdb.c:181:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(join2(&pd.jd,  dirpath, "/", &*<unknown>.d_name), "r")’
libsolv-0.7.35/ext/repo_zyppdb.c:149:1: enter_function: entry to ‘repo_add_zyppdb_products’
libsolv-0.7.35/ext/repo_zyppdb.c:168:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_zyppdb.c:168:6: branch_true: ...to here
libsolv-0.7.35/ext/repo_zyppdb.c:170:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_zyppdb.c:172:15: branch_true: ...to here
libsolv-0.7.35/ext/repo_zyppdb.c:174:22: call_function: calling ‘join2’ from ‘repo_add_zyppdb_products’
libsolv-0.7.35/ext/repo_zyppdb.c:174:22: return_function: returning to ‘repo_add_zyppdb_products’ from ‘join2’
libsolv-0.7.35/ext/repo_zyppdb.c:175:21: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_zyppdb.c:181:15: throw: if ‘solv_xmlparser_parse’ throws an exception...
libsolv-0.7.35/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): [#def99]
libsolv-0.7.35/ext/repo_zyppdb.c:189:3: warning[-Wanalyzer-null-argument]: use of NULL ‘opendir(dirpath)’ where non-null expected
libsolv-0.7.35/ext/repo_zyppdb.c:167:9: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_zyppdb.c:168:6: release_memory: assuming ‘opendir(dirpath)’ is NULL
libsolv-0.7.35/ext/repo_zyppdb.c:168:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/repo_zyppdb.c:189:3: branch_false: ...to here
libsolv-0.7.35/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): [#def100]
libsolv-0.7.35/ext/solv_xfopen.c:563:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libsolv-0.7.35/ext/solv_xfopen.c:552:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/solv_xfopen.c:554:6: branch_false: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:554:6: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
libsolv-0.7.35/ext/solv_xfopen.c:556:11: branch_true: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:556:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/solv_xfopen.c:557:14: branch_true: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:557:14: acquire_resource: opened here
libsolv-0.7.35/ext/solv_xfopen.c:560:10: branch_false: following ‘false’ branch (when ‘fd != -1’)...
libsolv-0.7.35/ext/solv_xfopen.c:563:7: branch_false: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:563:7: throw: if ‘zck_create’ throws an exception...
libsolv-0.7.35/ext/solv_xfopen.c:563:7: danger: ‘fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  561|   	return 0;
#  562|       }
#  563|->   f = zck_create();
#  564|     if (!f)
#  565|       {

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

Error: GCC_ANALYZER_WARNING (CWE-775): [#def102]
libsolv-0.7.35/ext/solv_xfopen.c:572:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libsolv-0.7.35/ext/solv_xfopen.c:552:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/solv_xfopen.c:554:6: branch_false: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:554:6: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
libsolv-0.7.35/ext/solv_xfopen.c:556:11: branch_true: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:556:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/solv_xfopen.c:557:14: branch_true: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:557:14: acquire_resource: opened here
libsolv-0.7.35/ext/solv_xfopen.c:560:10: branch_false: following ‘false’ branch (when ‘fd != -1’)...
libsolv-0.7.35/ext/solv_xfopen.c:563:7: branch_false: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:564:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/solv_xfopen.c:570:7: branch_false: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:570:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/solv_xfopen.c:572:11: branch_true: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:572:11: throw: if ‘zck_init_read’ throws an exception...
libsolv-0.7.35/ext/solv_xfopen.c:572:11: danger: ‘fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/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): [#def103]
libsolv-0.7.35/ext/solv_xfopen.c:582:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
libsolv-0.7.35/ext/solv_xfopen.c:552:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/solv_xfopen.c:554:6: branch_false: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:554:6: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
libsolv-0.7.35/ext/solv_xfopen.c:556:11: branch_true: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:556:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/solv_xfopen.c:557:14: branch_true: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:557:14: acquire_resource: opened here
libsolv-0.7.35/ext/solv_xfopen.c:560:10: branch_false: following ‘false’ branch (when ‘fd != -1’)...
libsolv-0.7.35/ext/solv_xfopen.c:563:7: branch_false: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:564:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/solv_xfopen.c:570:7: branch_false: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:570:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/solv_xfopen.c:582:11: branch_false: ...to here
libsolv-0.7.35/ext/solv_xfopen.c:582:11: throw: if ‘zck_init_write’ throws an exception...
libsolv-0.7.35/ext/solv_xfopen.c:582:11: danger: ‘fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/5/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): [#def104]
libsolv-0.7.35/ext/solv_xfopen.c: scope_hint: In function ‘solv_xfopen’
libsolv-0.7.35/ext/solv_xfopen.c:670:7: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  670 |   suf = strrchr(fn, '.');
#      |       ^
#  668|     if (!mode)
#  669|       mode = "r";
#  670|->   suf = strrchr(fn, '.');
#  671|   #ifdef ENABLE_ZLIB_COMPRESSION
#  672|     if (suf && !strcmp(suf, ".gz"))

Error: COMPILER_WARNING (CWE-704): [#def105]
libsolv-0.7.35/ext/solv_xfopen.c:670:7: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  668|     if (!mode)
#  669|       mode = "r";
#  670|->   suf = strrchr(fn, '.');
#  671|   #ifdef ENABLE_ZLIB_COMPRESSION
#  672|     if (suf && !strcmp(suf, ".gz"))

Error: COMPILER_WARNING (CWE-704): [#def106]
libsolv-0.7.35/ext/solv_xfopen.c: scope_hint: In function ‘solv_xfopen_fd’
libsolv-0.7.35/ext/solv_xfopen.c:737:7: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  737 |   suf = fn ? strrchr(fn, '.') : 0;
#      |       ^
#  735|     char *suf;
#  736|   
#  737|->   suf = fn ? strrchr(fn, '.') : 0;
#  738|     if (!mode)
#  739|       {

Error: COMPILER_WARNING (CWE-704): [#def107]
libsolv-0.7.35/ext/solv_xfopen.c:737:7: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  735|     char *suf;
#  736|   
#  737|->   suf = fn ? strrchr(fn, '.') : 0;
#  738|     if (!mode)
#  739|       {

Error: COMPILER_WARNING (CWE-704): [#def108]
libsolv-0.7.35/ext/solv_xmlparser.c: scope_hint: In function ‘parse_block’
libsolv-0.7.35/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): [#def109]
libsolv-0.7.35/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: GCC_ANALYZER_WARNING (CWE-775): [#def110]
libsolv-0.7.35/ext/testcase.c:1060:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/ext/testcase.c:2149:1: enter_function: entry to ‘testcase_read’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_resource: opened here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2626:6: branch_true: following ‘true’ branch (when ‘prepared == 0’)...
libsolv-0.7.35/ext/testcase.c:2628:7: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2631:6: branch_true: following ‘true’ branch (when ‘solv’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2633:14: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2634:7: call_function: calling ‘testcase_resetsolverflags’ from ‘testcase_read’
# 1058|     int i;
# 1059|     for (i = 0; solverflags2str[i].str; i++)
# 1060|->     solver_set_flag(solv, solverflags2str[i].flag, solverflags2str[i].def);
# 1061|   }
# 1062|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
libsolv-0.7.35/ext/testcase.c:1060:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/ext/testcase.c:2149:1: enter_function: entry to ‘testcase_read’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_memory: allocated here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2626:6: branch_true: following ‘true’ branch (when ‘prepared == 0’)...
libsolv-0.7.35/ext/testcase.c:2628:7: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2631:6: branch_true: following ‘true’ branch (when ‘solv’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2633:14: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2634:7: call_function: calling ‘testcase_resetsolverflags’ from ‘testcase_read’
# 1058|     int i;
# 1059|     for (i = 0; solverflags2str[i].str; i++)
# 1060|->     solver_set_flag(solv, solverflags2str[i].flag, solverflags2str[i].def);
# 1061|   }
# 1062|   

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

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

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

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

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

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

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

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-775): [#def122]
libsolv-0.7.35/ext/testcase.c:2620:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_resource: opened here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2619:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/testcase.c:2620:5: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2620:5: throw: if ‘pool_add_userinstalled_jobs’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2620:5: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
# 2618|       queue_push2(job, SOLVER_NOOP | SOLVER_SOLVABLE_PROVIDES, genid[--ngenid]);
# 2619|     if (autoinstq.count)
# 2620|->     pool_add_userinstalled_jobs(pool, &autoinstq, job, GET_USERINSTALLED_NAMES | GET_USERINSTALLED_INVERTED);
# 2621|     queue_free(&autoinstq);
# 2622|     genid = solv_free(genid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
libsolv-0.7.35/ext/testcase.c:2620:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_memory: allocated here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2619:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/testcase.c:2620:5: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2620:5: throw: if ‘pool_add_userinstalled_jobs’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2620:5: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
# 2618|       queue_push2(job, SOLVER_NOOP | SOLVER_SOLVABLE_PROVIDES, genid[--ngenid]);
# 2619|     if (autoinstq.count)
# 2620|->     pool_add_userinstalled_jobs(pool, &autoinstq, job, GET_USERINSTALLED_NAMES | GET_USERINSTALLED_INVERTED);
# 2621|     queue_free(&autoinstq);
# 2622|     genid = solv_free(genid);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def124]
libsolv-0.7.35/ext/testcase.c:2621:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_resource: opened here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2621:3: throw: if ‘queue_free’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2621:3: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
# 2619|     if (autoinstq.count)
# 2620|       pool_add_userinstalled_jobs(pool, &autoinstq, job, GET_USERINSTALLED_NAMES | GET_USERINSTALLED_INVERTED);
# 2621|->   queue_free(&autoinstq);
# 2622|     genid = solv_free(genid);
# 2623|     buf = solv_free(buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
libsolv-0.7.35/ext/testcase.c:2621:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_memory: allocated here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2621:3: throw: if ‘queue_free’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2621:3: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
# 2619|     if (autoinstq.count)
# 2620|       pool_add_userinstalled_jobs(pool, &autoinstq, job, GET_USERINSTALLED_NAMES | GET_USERINSTALLED_INVERTED);
# 2621|->   queue_free(&autoinstq);
# 2622|     genid = solv_free(genid);
# 2623|     buf = solv_free(buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def126]
libsolv-0.7.35/ext/testcase.c:2622:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_resource: opened here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2622:11: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2622:11: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
# 2620|       pool_add_userinstalled_jobs(pool, &autoinstq, job, GET_USERINSTALLED_NAMES | GET_USERINSTALLED_INVERTED);
# 2621|     queue_free(&autoinstq);
# 2622|->   genid = solv_free(genid);
# 2623|     buf = solv_free(buf);
# 2624|     pieces = solv_free(pieces);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
libsolv-0.7.35/ext/testcase.c:2622:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_memory: allocated here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2622:11: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2622:11: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
# 2620|       pool_add_userinstalled_jobs(pool, &autoinstq, job, GET_USERINSTALLED_NAMES | GET_USERINSTALLED_INVERTED);
# 2621|     queue_free(&autoinstq);
# 2622|->   genid = solv_free(genid);
# 2623|     buf = solv_free(buf);
# 2624|     pieces = solv_free(pieces);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def128]
libsolv-0.7.35/ext/testcase.c:2623:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_resource: opened here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2623:9: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2623:9: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
# 2621|     queue_free(&autoinstq);
# 2622|     genid = solv_free(genid);
# 2623|->   buf = solv_free(buf);
# 2624|     pieces = solv_free(pieces);
# 2625|     solv_free(testcasedir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
libsolv-0.7.35/ext/testcase.c:2623:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_memory: allocated here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2623:9: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2623:9: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
# 2621|     queue_free(&autoinstq);
# 2622|     genid = solv_free(genid);
# 2623|->   buf = solv_free(buf);
# 2624|     pieces = solv_free(pieces);
# 2625|     solv_free(testcasedir);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def130]
libsolv-0.7.35/ext/testcase.c:2624:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_resource: opened here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2624:12: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2624:12: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
# 2622|     genid = solv_free(genid);
# 2623|     buf = solv_free(buf);
# 2624|->   pieces = solv_free(pieces);
# 2625|     solv_free(testcasedir);
# 2626|     if (!prepared)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
libsolv-0.7.35/ext/testcase.c:2624:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_memory: allocated here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2624:12: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2624:12: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
# 2622|     genid = solv_free(genid);
# 2623|     buf = solv_free(buf);
# 2624|->   pieces = solv_free(pieces);
# 2625|     solv_free(testcasedir);
# 2626|     if (!prepared)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def132]
libsolv-0.7.35/ext/testcase.c:2625:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_resource: opened here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2625:3: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2625:3: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
# 2623|     buf = solv_free(buf);
# 2624|     pieces = solv_free(pieces);
# 2625|->   solv_free(testcasedir);
# 2626|     if (!prepared)
# 2627|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
libsolv-0.7.35/ext/testcase.c:2625:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_memory: allocated here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2625:3: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2625:3: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
# 2623|     buf = solv_free(buf);
# 2624|     pieces = solv_free(pieces);
# 2625|->   solv_free(testcasedir);
# 2626|     if (!prepared)
# 2627|       {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def134]
libsolv-0.7.35/ext/testcase.c:2628:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_resource: opened here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2626:6: branch_true: following ‘true’ branch (when ‘prepared == 0’)...
libsolv-0.7.35/ext/testcase.c:2628:7: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2628:7: throw: if ‘pool_addfileprovides’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2628:7: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
# 2626|     if (!prepared)
# 2627|       {
# 2628|->       pool_addfileprovides(pool);
# 2629|         pool_createwhatprovides(pool);
# 2630|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
libsolv-0.7.35/ext/testcase.c:2628:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_memory: allocated here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2626:6: branch_true: following ‘true’ branch (when ‘prepared == 0’)...
libsolv-0.7.35/ext/testcase.c:2628:7: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2628:7: throw: if ‘pool_addfileprovides’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2628:7: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
# 2626|     if (!prepared)
# 2627|       {
# 2628|->       pool_addfileprovides(pool);
# 2629|         pool_createwhatprovides(pool);
# 2630|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def136]
libsolv-0.7.35/ext/testcase.c:2629:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_resource: opened here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2626:6: branch_true: following ‘true’ branch (when ‘prepared == 0’)...
libsolv-0.7.35/ext/testcase.c:2628:7: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2629:7: throw: if ‘pool_createwhatprovides’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2629:7: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/2)
# 2627|       {
# 2628|         pool_addfileprovides(pool);
# 2629|->       pool_createwhatprovides(pool);
# 2630|       }
# 2631|     if (!solv)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
libsolv-0.7.35/ext/testcase.c:2629:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_memory: allocated here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2626:6: branch_true: following ‘true’ branch (when ‘prepared == 0’)...
libsolv-0.7.35/ext/testcase.c:2628:7: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2629:7: throw: if ‘pool_createwhatprovides’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2629:7: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/2)
# 2627|       {
# 2628|         pool_addfileprovides(pool);
# 2629|->       pool_createwhatprovides(pool);
# 2630|       }
# 2631|     if (!solv)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def138]
libsolv-0.7.35/ext/testcase.c:2633:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_resource: opened here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2626:6: branch_true: following ‘true’ branch (when ‘prepared == 0’)...
libsolv-0.7.35/ext/testcase.c:2628:7: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2631:6: branch_true: following ‘true’ branch (when ‘solv’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2633:14: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2633:14: throw: if ‘solver_create’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2633:14: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/2)
# 2631|     if (!solv)
# 2632|       {
# 2633|->       solv = solver_create(pool);
# 2634|         testcase_resetsolverflags(solv);
# 2635|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
libsolv-0.7.35/ext/testcase.c:2633:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_memory: allocated here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2617:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2619:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2626:6: branch_true: following ‘true’ branch (when ‘prepared == 0’)...
libsolv-0.7.35/ext/testcase.c:2628:7: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2631:6: branch_true: following ‘true’ branch (when ‘solv’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2633:14: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2633:14: throw: if ‘solver_create’ throws an exception...
libsolv-0.7.35/ext/testcase.c:2633:14: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/2)
# 2631|     if (!solv)
# 2632|       {
# 2633|->       solv = solver_create(pool);
# 2634|         testcase_resetsolverflags(solv);
# 2635|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
libsolv-0.7.35/ext/tools_util.h:64:7: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirpath)’
libsolv-0.7.35/ext/repo_products.c:383:1: enter_function: entry to ‘repo_add_products’
libsolv-0.7.35/ext/repo_products.c:388:6: branch_true: following ‘true’ branch (when ‘proddir’ is non-NULL)...
libsolv-0.7.35/ext/repo_products.c:390:21: branch_true: ...to here
libsolv-0.7.35/ext/repo_products.c:391:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_products.c:394:11: branch_true: ...to here
libsolv-0.7.35/ext/repo_products.c:395:18: call_function: calling ‘repo_add_code11_products’ from ‘repo_add_products’
#   62|   
#   63|     if (s1)
#   64|->     l += strlen(s1);
#   65|     if (s2)
#   66|       l += strlen(s2);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
libsolv-0.7.35/ext/tools_util.h:66:7: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirpath)’
libsolv-0.7.35/ext/repo_products.c:295:1: enter_function: entry to ‘repo_add_code11_products’
libsolv-0.7.35/ext/repo_products.c:312:9: acquire_memory: allocated here
libsolv-0.7.35/ext/repo_products.c:313:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/ext/repo_products.c:320:16: branch_true: ...to here
libsolv-0.7.35/ext/repo_products.c:320:16: call_function: calling ‘join2’ from ‘repo_add_code11_products’
#   64|       l += strlen(s1);
#   65|     if (s2)
#   66|->     l += strlen(s2);
#   67|     if (s3)
#   68|       l += strlen(s3);

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

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

Error: CPPCHECK_WARNING (CWE-476): [#def144]
libsolv-0.7.35/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): [#def145]
libsolv-0.7.35/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.1/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): [#def146]
libsolv-0.7.35/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): [#def147]
libsolv-0.7.35/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): [#def148]
libsolv-0.7.35/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): [#def149]
libsolv-0.7.35/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): [#def150]
libsolv-0.7.35/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): [#def151]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c: scope_hint: In function ‘SWIG_Ruby_NewPointerObj’
libsolv-0.7.35/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.35/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: COMPILER_WARNING (CWE-477): [#def152]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:1707:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 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): [#def153]
libsolv-0.7.35/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): [#def154]
libsolv-0.7.35/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): [#def155]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:1722:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 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): [#def156]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c: scope_hint: In function ‘SWIG_Ruby_NewClassInstance’
libsolv-0.7.35/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): [#def157]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:1735:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 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): [#def158]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c: scope_hint: In function ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/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): [#def159]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:1783:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1781|         return SWIG_ERROR;
# 1782|       }
# 1783|->     Data_Get_Struct(obj, void, vptr);
# 1784|     }
# 1785|     

Error: COMPILER_WARNING (CWE-477): [#def160]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c: scope_hint: In function ‘SWIG_Ruby_GetModule’
libsolv-0.7.35/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): [#def161]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:1919:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 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): [#def162]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c: scope_hint: In function ‘SWIG_Ruby_SetModule’
libsolv-0.7.35/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: COMPILER_WARNING (CWE-477): [#def163]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:1934:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 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): [#def164]
libsolv-0.7.35/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): [#def165]
libsolv-0.7.35/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): [#def166]
libsolv-0.7.35/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: GCC_ANALYZER_WARNING (CWE-476): [#def167]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4468:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17849:1: enter_function: entry to ‘_wrap_SolvFp_fileno’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17851:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17856:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17859:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17859:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_SolvFp_fileno’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17859:10: return_function: returning to ‘_wrap_SolvFp_fileno’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17860:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17863:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17863:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17864:12: call_function: inlined call to ‘SolvFp_fileno’ from ‘_wrap_SolvFp_fileno’
# 4466|     }
# 4467|   SWIGINTERN int SolvFp_fileno(SolvFp *self){
# 4468|->     return self->fp ? fileno(self->fp) : -1;
# 4469|     }
# 4470|   SWIGINTERN int SolvFp_dup(SolvFp *self){

Error: GCC_ANALYZER_WARNING (CWE-476): [#def168]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4471:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17881:1: enter_function: entry to ‘_wrap_SolvFp_dup’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17883:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17888:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17891:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17891:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_SolvFp_dup’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17891:10: return_function: returning to ‘_wrap_SolvFp_dup’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17892:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17895:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17895:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17896:12: call_function: calling ‘SolvFp_dup’ from ‘_wrap_SolvFp_dup’
# 4469|     }
# 4470|   SWIGINTERN int SolvFp_dup(SolvFp *self){
# 4471|->     return self->fp ? dup(fileno(self->fp)) : -1;
# 4472|     }
# 4473|   SWIGINTERN bool SolvFp_write(SolvFp *self,unsigned char const *str,size_t len){

Error: GCC_ANALYZER_WARNING (CWE-476): [#def169]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4477:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17947:1: enter_function: entry to ‘_wrap_SolvFp_flush’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17949:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17954:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17957:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17957:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_SolvFp_flush’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17957:10: return_function: returning to ‘_wrap_SolvFp_flush’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17958:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17961:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17961:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17962:12: call_function: calling ‘SolvFp_flush’ from ‘_wrap_SolvFp_flush’
# 4475|     }
# 4476|   SWIGINTERN bool SolvFp_flush(SolvFp *self){
# 4477|->     if (!self->fp)
# 4478|         return 1;
# 4479|       return fflush(self->fp) == 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def170]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4483:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17971:1: enter_function: entry to ‘_wrap_SolvFp_close’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17973:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17978:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17981:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17981:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_SolvFp_close’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17981:10: return_function: returning to ‘_wrap_SolvFp_close’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17982:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17985:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17985:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17986:12: call_function: calling ‘SolvFp_close’ from ‘_wrap_SolvFp_close’
# 4481|   SWIGINTERN bool SolvFp_close(SolvFp *self){
# 4482|       bool ret;
# 4483|->     if (!self->fp)
# 4484|         return 1;
# 4485|       ret = fclose(self->fp) == 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def171]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4490:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17995:1: enter_function: entry to ‘_wrap_SolvFp_cloexec’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:17998:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18003:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18006:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18006:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_SolvFp_cloexec’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18006:10: return_function: returning to ‘_wrap_SolvFp_cloexec’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18007:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18010:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18010:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18011:12: call_function: calling ‘SWIG_AsVal_bool’ from ‘_wrap_SolvFp_cloexec’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18011:12: return_function: returning to ‘_wrap_SolvFp_cloexec’ from ‘SWIG_AsVal_bool’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18012:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18015:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18016:3: call_function: calling ‘SolvFp_cloexec’ from ‘_wrap_SolvFp_cloexec’
# 4488|     }
# 4489|   SWIGINTERN void SolvFp_cloexec(SolvFp *self,bool state){
# 4490|->     if (!self->fp || fileno(self->fp) == -1)
# 4491|         return;
# 4492|       solv_setcloexec(fileno(self->fp), state);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def172]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4532:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18208:1: enter_function: entry to ‘_wrap_Problem_findproblemrule’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18210:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18215:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18218:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18218:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Problem_findproblemrule’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18218:10: return_function: returning to ‘_wrap_Problem_findproblemrule’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18219:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18222:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18222:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18223:12: call_function: calling ‘Problem_findproblemrule’ from ‘_wrap_Problem_findproblemrule’
# 4530|     }
# 4531|   SWIGINTERN XRule *Problem_findproblemrule(Problem *self){
# 4532|->     Id r = solver_findproblemrule(self->solv, self->id);
# 4533|       return new_XRule(self->solv, r);
# 4534|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def173]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4536:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18232:1: enter_function: entry to ‘_wrap_Problem_findallproblemrules’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18235:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18242:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18245:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18245:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Problem_findallproblemrules’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18245:10: return_function: returning to ‘_wrap_Problem_findallproblemrules’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18246:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18249:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18249:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18257:12: call_function: calling ‘Problem_findallproblemrules’ from ‘_wrap_Problem_findallproblemrules’
# 4534|     }
# 4535|   SWIGINTERN Queue Problem_findallproblemrules(Problem *self,int unfiltered){
# 4536|->     Solver *solv = self->solv;
# 4537|       Id probr;
# 4538|       int i, j;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def174]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4559:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18283:1: enter_function: entry to ‘_wrap_Problem_solution_count’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18285:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18290:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18293:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18293:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Problem_solution_count’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18293:10: return_function: returning to ‘_wrap_Problem_solution_count’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18294:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18297:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18297:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18298:12: call_function: inlined call to ‘Problem_solution_count’ from ‘_wrap_Problem_solution_count’
# 4557|     }
# 4558|   SWIGINTERN int Problem_solution_count(Problem *self){
# 4559|->     return solver_solution_count(self->solv, self->id);
# 4560|     }
# 4561|   SWIGINTERN Queue Problem_solutions(Problem *self){

Error: GCC_ANALYZER_WARNING (CWE-476): [#def175]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4565:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18307:1: enter_function: entry to ‘_wrap_Problem_solutions’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18309:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18314:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18317:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18317:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Problem_solutions’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18317:10: return_function: returning to ‘_wrap_Problem_solutions’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18318:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18321:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18321:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18322:12: call_function: calling ‘Problem_solutions’ from ‘_wrap_Problem_solutions’
# 4563|       int i, cnt;
# 4564|       queue_init(&q);
# 4565|->     cnt = solver_solution_count(self->solv, self->id);
# 4566|       for (i = 1; i <= cnt; i++)
# 4567|         queue_push(&q, i);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def176]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4573:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18348:1: enter_function: entry to ‘_wrap_Problem_get_learnt’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18350:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18355:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18358:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18358:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Problem_get_learnt’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18358:10: return_function: returning to ‘_wrap_Problem_get_learnt’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18359:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18362:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18362:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18363:12: call_function: calling ‘Problem_get_learnt’ from ‘_wrap_Problem_get_learnt’
# 4571|       Queue q;
# 4572|       queue_init(&q);
# 4573|->     solver_get_learnt(self->solv, self->id, SOLVER_DECISIONLIST_PROBLEM, &q);
# 4574|       return q;
# 4575|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def177]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4579:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18389:1: enter_function: entry to ‘_wrap_Problem_get_decisionlist’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18391:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18396:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18399:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18399:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Problem_get_decisionlist’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18399:10: return_function: returning to ‘_wrap_Problem_get_decisionlist’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18400:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18403:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18403:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18404:12: call_function: calling ‘Problem_get_decisionlist’ from ‘_wrap_Problem_get_decisionlist’
# 4577|       Queue q;
# 4578|       queue_init(&q);
# 4579|->     solver_get_decisionlist(self->solv, self->id, SOLVER_DECISIONLIST_PROBLEM | SOLVER_DECISIONLIST_SORTED, &q);
# 4580|       return q;
# 4581|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def178]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4585:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18430:1: enter_function: entry to ‘_wrap_Problem_get_decisionsetlist’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18432:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18437:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18440:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18440:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Problem_get_decisionsetlist’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18440:10: return_function: returning to ‘_wrap_Problem_get_decisionsetlist’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18441:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18444:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18444:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18445:12: call_function: calling ‘Problem_get_decisionsetlist’ from ‘_wrap_Problem_get_decisionsetlist’
# 4583|       Queue q;
# 4584|       queue_init(&q);
# 4585|->     solver_get_decisionlist(self->solv, self->id, SOLVER_DECISIONLIST_PROBLEM | SOLVER_DECISIONLIST_SORTED | SOLVER_DECISIONLIST_WITHINFO | SOLVER_DECISIONLIST_MERGEDINFO, &q);
# 4586|       prepare_decisionset_queue(self->solv, &q);
# 4587|       return q;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def179]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4590:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18471:1: enter_function: entry to ‘_wrap_Problem_to_s’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18473:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18478:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18481:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18481:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Problem_to_s’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18481:10: return_function: returning to ‘_wrap_Problem_to_s’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18482:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18485:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18485:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18486:20: call_function: inlined call to ‘Problem___str__’ from ‘_wrap_Problem_to_s’
# 4588|     }
# 4589|   SWIGINTERN char const *Problem___str__(Problem *self){
# 4590|->     return solver_problem2str(self->solv, self->id);
# 4591|     }
# 4592|   SWIGINTERN Solution *new_Solution(Problem *p,Id id){

Error: GCC_ANALYZER_WARNING (CWE-476): [#def180]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4601:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18621:1: enter_function: entry to ‘_wrap_Solution_element_count’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18623:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18628:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18631:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18631:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solution_element_count’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18631:10: return_function: returning to ‘_wrap_Solution_element_count’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18632:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18635:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18635:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18636:12: call_function: calling ‘Solution_element_count’ from ‘_wrap_Solution_element_count’
# 4599|     }
# 4600|   SWIGINTERN int Solution_element_count(Solution *self){
# 4601|->     return solver_solutionelement_count(self->solv, self->problemid, self->id);
# 4602|     }
# 4603|   SWIGINTERN Queue Solution_elements(Solution *self,bool expandreplaces){

Error: GCC_ANALYZER_WARNING (CWE-476): [#def181]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4606:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18645:1: enter_function: entry to ‘_wrap_Solution_elements’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18648:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18655:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18658:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18658:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solution_elements’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18658:10: return_function: returning to ‘_wrap_Solution_elements’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18659:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18662:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18662:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18670:12: call_function: calling ‘Solution_elements’ from ‘_wrap_Solution_elements’
# 4604|       Queue q;
# 4605|       queue_init(&q);
# 4606|->     solver_all_solutionelements(self->solv, self->problemid, self->id, expandreplaces, &q);
# 4607|       return q;
# 4608|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def182]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4621:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18878:1: enter_function: entry to ‘_wrap_Solutionelement_str’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18880:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18885:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18888:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18888:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solutionelement_str’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18888:10: return_function: returning to ‘_wrap_Solutionelement_str’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18889:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18892:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18892:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18893:20: call_function: calling ‘Solutionelement_str’ from ‘_wrap_Solutionelement_str’
# 4619|     }
# 4620|   SWIGINTERN char const *Solutionelement_str(Solutionelement *self){
# 4621|->     return solver_solutionelementtype2str(self->solv, self->type, self->p, self->rp);
# 4622|     }
# 4623|   SWIGINTERN char const *Solutionelement___str__(Solutionelement *self){

Error: GCC_ANALYZER_WARNING (CWE-476): [#def183]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4624:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18902:1: enter_function: entry to ‘_wrap_Solutionelement_to_s’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18904:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18909:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18912:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18912:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solutionelement_to_s’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18912:10: return_function: returning to ‘_wrap_Solutionelement_to_s’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18913:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18916:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18916:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18917:20: call_function: calling ‘Solutionelement___str__’ from ‘_wrap_Solutionelement_to_s’
# 4622|     }
# 4623|   SWIGINTERN char const *Solutionelement___str__(Solutionelement *self){
# 4624|->     return solver_solutionelementtype2str(self->solv, self->type, self->p, self->rp);
# 4625|     }
# 4626|   SWIGINTERN Queue Solutionelement_replaceelements(Solutionelement *self){

Error: GCC_ANALYZER_WARNING (CWE-476): [#def184]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4631:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18926:1: enter_function: entry to ‘_wrap_Solutionelement_replaceelements’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18928:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18933:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18936:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18936:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solutionelement_replaceelements’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18936:10: return_function: returning to ‘_wrap_Solutionelement_replaceelements’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18937:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18940:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18940:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18941:12: call_function: calling ‘Solutionelement_replaceelements’ from ‘_wrap_Solutionelement_replaceelements’
# 4629|   
# 4630|       queue_init(&q);
# 4631|->     if (self->type != SOLVER_SOLUTION_REPLACE || self->p <= 0 || self->rp <= 0)
# 4632|         illegal = 0;
# 4633|       else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def185]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4648:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18967:1: enter_function: entry to ‘_wrap_Solutionelement_illegalreplace’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18969:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18974:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18977:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18977:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solutionelement_illegalreplace’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18977:10: return_function: returning to ‘_wrap_Solutionelement_illegalreplace’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18978:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18981:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18981:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18982:12: call_function: calling ‘Solutionelement_illegalreplace’ from ‘_wrap_Solutionelement_illegalreplace’
# 4646|     }
# 4647|   SWIGINTERN int Solutionelement_illegalreplace(Solutionelement *self){
# 4648|->     if (self->type != SOLVER_SOLUTION_REPLACE || self->p <= 0 || self->rp <= 0)
# 4649|         return 0;
# 4650|       return policy_is_illegal(self->solv, self->solv->pool->solvables + self->p, self->solv->pool->solvables + self->rp, 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def186]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4654:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18991:1: enter_function: entry to ‘_wrap_Solutionelement_solvable_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18993:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18998:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19001:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19001:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solutionelement_solvable_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19001:10: return_function: returning to ‘_wrap_Solutionelement_solvable_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19002:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19005:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19005:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19006:12: call_function: inlined call to ‘Solutionelement_solvable_get’ from ‘_wrap_Solutionelement_solvable_get’
# 4652|   
# 4653|       SWIGINTERN XSolvable *Solutionelement_solvable_get(Solutionelement *e) {
# 4654|->       return new_XSolvable(e->solv->pool, e->p);
# 4655|       }
# 4656|       SWIGINTERN XSolvable *Solutionelement_replacement_get(Solutionelement *e) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def187]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4657:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19015:1: enter_function: entry to ‘_wrap_Solutionelement_replacement_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19017:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19022:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19025:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19025:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solutionelement_replacement_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19025:10: return_function: returning to ‘_wrap_Solutionelement_replacement_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19026:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19029:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19029:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19030:12: call_function: inlined call to ‘Solutionelement_replacement_get’ from ‘_wrap_Solutionelement_replacement_get’
# 4655|       }
# 4656|       SWIGINTERN XSolvable *Solutionelement_replacement_get(Solutionelement *e) {
# 4657|->       return new_XSolvable(e->solv->pool, e->rp);
# 4658|       }
# 4659|       SWIGINTERN int Solutionelement_jobidx_get(Solutionelement *e) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def188]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4660:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19039:1: enter_function: entry to ‘_wrap_Solutionelement_jobidx_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19041:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19046:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19049:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19049:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solutionelement_jobidx_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19049:10: return_function: returning to ‘_wrap_Solutionelement_jobidx_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19050:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19053:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19053:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19054:12: call_function: inlined call to ‘Solutionelement_jobidx_get’ from ‘_wrap_Solutionelement_jobidx_get’
# 4658|       }
# 4659|       SWIGINTERN int Solutionelement_jobidx_get(Solutionelement *e) {
# 4660|->       if (e->type != SOLVER_SOLUTION_JOB && e->type != SOLVER_SOLUTION_POOLJOB)
# 4661|           return -1;
# 4662|         return (e->p - 1) / 2;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def189]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4666:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19063:1: enter_function: entry to ‘_wrap_Solutionelement_Job’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19065:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19070:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19073:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19073:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solutionelement_Job’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19073:10: return_function: returning to ‘_wrap_Solutionelement_Job’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19074:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19077:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19077:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19078:12: call_function: calling ‘Solutionelement_Job’ from ‘_wrap_Solutionelement_Job’
# 4664|     
# 4665|   SWIGINTERN Job *Solutionelement_Job(Solutionelement *self){
# 4666|->     Id extraflags = solver_solutionelement_extrajobflags(self->solv, self->problemid, self->solutionid);
# 4667|       if (self->type == SOLVER_SOLUTION_JOB || self->type == SOLVER_SOLUTION_POOLJOB)
# 4668|         return new_Job(self->solv->pool, SOLVER_NOOP, 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def190]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4679:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19225:1: enter_function: entry to ‘_wrap_Alternative_chosen_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19227:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19232:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19235:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19235:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Alternative_chosen_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19235:10: return_function: returning to ‘_wrap_Alternative_chosen_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19236:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19239:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19239:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19240:12: call_function: inlined call to ‘Alternative_chosen_get’ from ‘_wrap_Alternative_chosen_get’
# 4677|   
# 4678|       SWIGINTERN XSolvable *Alternative_chosen_get(Alternative *a) {
# 4679|->       return new_XSolvable(a->solv->pool, a->chosen_id);
# 4680|       }
# 4681|       SWIGINTERN XRule *Alternative_rule_get(Alternative *a) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def191]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4682:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19249:1: enter_function: entry to ‘_wrap_Alternative_rule_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19251:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19256:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19259:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19259:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Alternative_rule_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19259:10: return_function: returning to ‘_wrap_Alternative_rule_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19260:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19263:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19263:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19264:12: call_function: inlined call to ‘Alternative_rule_get’ from ‘_wrap_Alternative_rule_get’
# 4680|       }
# 4681|       SWIGINTERN XRule *Alternative_rule_get(Alternative *a) {
# 4682|->       return new_XRule(a->solv, a->rid);
# 4683|       }
# 4684|       SWIGINTERN XSolvable *Alternative_depsolvable_get(Alternative *a) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def192]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4685:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19273:1: enter_function: entry to ‘_wrap_Alternative_depsolvable_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19275:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19280:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19283:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19283:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Alternative_depsolvable_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19283:10: return_function: returning to ‘_wrap_Alternative_depsolvable_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19284:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19287:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19287:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19288:12: call_function: inlined call to ‘Alternative_depsolvable_get’ from ‘_wrap_Alternative_depsolvable_get’
# 4683|       }
# 4684|       SWIGINTERN XSolvable *Alternative_depsolvable_get(Alternative *a) {
# 4685|->       return new_XSolvable(a->solv->pool, a->from_id);
# 4686|       }
# 4687|       SWIGINTERN Dep *Alternative_dep_get(Alternative *a) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def193]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4688:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19297:1: enter_function: entry to ‘_wrap_Alternative_dep_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19299:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19304:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19307:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19307:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Alternative_dep_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19307:10: return_function: returning to ‘_wrap_Alternative_dep_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19308:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19311:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19311:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19312:12: call_function: inlined call to ‘Alternative_dep_get’ from ‘_wrap_Alternative_dep_get’
# 4686|       }
# 4687|       SWIGINTERN Dep *Alternative_dep_get(Alternative *a) {
# 4688|->       return new_Dep(a->solv->pool, a->dep_id);
# 4689|       }
# 4690|     

Error: GCC_ANALYZER_WARNING (CWE-476): [#def194]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4706:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19393:1: enter_function: entry to ‘_wrap_Alternative_to_s’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19395:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19400:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19403:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19403:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Alternative_to_s’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19403:10: return_function: returning to ‘_wrap_Alternative_to_s’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19404:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19407:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19407:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19408:20: call_function: calling ‘Alternative___str__’ from ‘_wrap_Alternative_to_s’
# 4704|     }
# 4705|   SWIGINTERN char const *Alternative___str__(Alternative *self){
# 4706|->     return solver_alternative2str(self->solv, self->type, self->type == SOLVER_ALTERNATIVE_TYPE_RULE ? self->rid : self->dep_id, self->from_id);
# 4707|     }
# 4708|   SWIGINTERN bool Transaction_isempty(Transaction *self){

Error: GCC_ANALYZER_WARNING (CWE-476): [#def195]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4712:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘s’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19476:1: enter_function: entry to ‘_wrap_Transaction_othersolvable’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19479:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19481:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19486:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19489:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19489:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Transaction_othersolvable’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19489:10: return_function: returning to ‘_wrap_Transaction_othersolvable’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19490:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19493:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19493:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19494:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Transaction_othersolvable’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19494:10: return_function: returning to ‘_wrap_Transaction_othersolvable’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19495:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19498:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19498:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19499:12: call_function: calling ‘Transaction_othersolvable’ from ‘_wrap_Transaction_othersolvable’
# 4710|     }
# 4711|   SWIGINTERN XSolvable *Transaction_othersolvable(Transaction *self,XSolvable *s){
# 4712|->     Id op = transaction_obs_pkg(self, s->id);
# 4713|       return new_XSolvable(self->pool, op);
# 4714|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def196]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4718:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘s’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19508:1: enter_function: entry to ‘_wrap_Transaction_allothersolvables’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19511:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19513:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19518:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19521:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19521:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Transaction_allothersolvables’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19521:10: return_function: returning to ‘_wrap_Transaction_allothersolvables’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19522:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19525:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19525:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19526:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Transaction_allothersolvables’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19526:10: return_function: returning to ‘_wrap_Transaction_allothersolvables’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19527:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19530:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19530:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19531:12: call_function: calling ‘Transaction_allothersolvables’ from ‘_wrap_Transaction_allothersolvables’
# 4716|       Queue q;
# 4717|       queue_init(&q);
# 4718|->     transaction_all_obs_pkgs(self, s->id, &q);
# 4719|       return q;
# 4720|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def197]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4797:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20108:1: enter_function: entry to ‘_wrap_TransactionClass_solvables’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20110:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20115:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20118:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20118:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_TransactionClass_solvables’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20118:10: return_function: returning to ‘_wrap_TransactionClass_solvables’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20119:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20122:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20122:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20123:12: call_function: calling ‘TransactionClass_solvables’ from ‘_wrap_TransactionClass_solvables’
# 4795|       Queue q;
# 4796|       queue_init(&q);
# 4797|->     transaction_classify_pkgs(self->transaction, self->mode, self->type, self->fromid, self->toid, &q);
# 4798|       return q;
# 4799|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def198]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4802:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20149:1: enter_function: entry to ‘_wrap_TransactionClass_fromstr_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20151:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20156:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20159:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20159:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_TransactionClass_fromstr_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20159:10: return_function: returning to ‘_wrap_TransactionClass_fromstr_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20160:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20163:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20163:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20164:20: call_function: inlined call to ‘TransactionClass_fromstr_get’ from ‘_wrap_TransactionClass_fromstr_get’
# 4800|   
# 4801|       SWIGINTERN const char *TransactionClass_fromstr_get(TransactionClass *cl) {
# 4802|->       return pool_id2str(cl->transaction->pool, cl->fromid);
# 4803|       }
# 4804|       SWIGINTERN const char *TransactionClass_tostr_get(TransactionClass *cl) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def199]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:4805:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20173:1: enter_function: entry to ‘_wrap_TransactionClass_tostr_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20175:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20180:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20183:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20183:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_TransactionClass_tostr_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20183:10: return_function: returning to ‘_wrap_TransactionClass_tostr_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20184:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20187:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20187:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20188:20: call_function: inlined call to ‘TransactionClass_tostr_get’ from ‘_wrap_TransactionClass_tostr_get’
# 4803|       }
# 4804|       SWIGINTERN const char *TransactionClass_tostr_get(TransactionClass *cl) {
# 4805|->       return pool_id2str(cl->transaction->pool, cl->toid);
# 4806|       }
# 4807|     

Error: GCC_ANALYZER_WARNING (CWE-476): [#def200]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18129:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18114:1: enter_function: entry to ‘_wrap_Problem_solv_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18116:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18121:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18124:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18124:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Problem_solv_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18124:10: return_function: returning to ‘_wrap_Problem_solv_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18125:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18128:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18128:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18129:3: danger: dereference of NULL ‘arg1’
#18127|     }
#18128|     arg1 = (Problem *)(argp1);
#18129|->   result = (Solver *)(Solver *) ((arg1)->solv);
#18130|     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Solver, 0 |  0 );
#18131|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def201]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18153:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18138:1: enter_function: entry to ‘_wrap_Problem_id_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18140:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18145:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18148:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18148:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Problem_id_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18148:10: return_function: returning to ‘_wrap_Problem_id_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18149:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18152:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18152:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18153:3: danger: dereference of NULL ‘arg1’
#18151|     }
#18152|     arg1 = (Problem *)(argp1);
#18153|->   result = (Id)(Id) ((arg1)->id);
#18154|     vresult = SWIG_From_int((int)(result));
#18155|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def202]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18518:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18503:1: enter_function: entry to ‘_wrap_Solution_solv_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18505:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18510:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18513:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18513:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solution_solv_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18513:10: return_function: returning to ‘_wrap_Solution_solv_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18514:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18517:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18517:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18518:3: danger: dereference of NULL ‘arg1’
#18516|     }
#18517|     arg1 = (Solution *)(argp1);
#18518|->   result = (Solver *)(Solver *) ((arg1)->solv);
#18519|     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Solver, 0 |  0 );
#18520|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def203]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18542:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18527:1: enter_function: entry to ‘_wrap_Solution_problemid_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18529:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18534:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18537:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18537:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solution_problemid_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18537:10: return_function: returning to ‘_wrap_Solution_problemid_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18538:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18541:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18541:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18542:3: danger: dereference of NULL ‘arg1’
#18540|     }
#18541|     arg1 = (Solution *)(argp1);
#18542|->   result = (Id)(Id) ((arg1)->problemid);
#18543|     vresult = SWIG_From_int((int)(result));
#18544|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def204]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18566:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18551:1: enter_function: entry to ‘_wrap_Solution_id_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18553:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18558:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18561:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18561:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solution_id_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18561:10: return_function: returning to ‘_wrap_Solution_id_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18562:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18565:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18565:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18566:3: danger: dereference of NULL ‘arg1’
#18564|     }
#18565|     arg1 = (Solution *)(argp1);
#18566|->   result = (Id)(Id) ((arg1)->id);
#18567|     vresult = SWIG_From_int((int)(result));
#18568|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def205]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18719:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18704:1: enter_function: entry to ‘_wrap_Solutionelement_solv_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18706:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18711:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18714:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18714:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solutionelement_solv_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18714:10: return_function: returning to ‘_wrap_Solutionelement_solv_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18715:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18718:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18718:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18719:3: danger: dereference of NULL ‘arg1’
#18717|     }
#18718|     arg1 = (Solutionelement *)(argp1);
#18719|->   result = (Solver *)(Solver *) ((arg1)->solv);
#18720|     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Solver, 0 |  0 );
#18721|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def206]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18743:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18728:1: enter_function: entry to ‘_wrap_Solutionelement_problemid_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18730:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18735:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18738:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18738:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solutionelement_problemid_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18738:10: return_function: returning to ‘_wrap_Solutionelement_problemid_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18739:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18742:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18742:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18743:3: danger: dereference of NULL ‘arg1’
#18741|     }
#18742|     arg1 = (Solutionelement *)(argp1);
#18743|->   result = (Id)(Id) ((arg1)->problemid);
#18744|     vresult = SWIG_From_int((int)(result));
#18745|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def207]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18767:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18752:1: enter_function: entry to ‘_wrap_Solutionelement_solutionid_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18754:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18759:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18762:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18762:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solutionelement_solutionid_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18762:10: return_function: returning to ‘_wrap_Solutionelement_solutionid_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18763:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18766:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18766:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18767:3: danger: dereference of NULL ‘arg1’
#18765|     }
#18766|     arg1 = (Solutionelement *)(argp1);
#18767|->   result = (Id)(Id) ((arg1)->solutionid);
#18768|     vresult = SWIG_From_int((int)(result));
#18769|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def208]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18791:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18776:1: enter_function: entry to ‘_wrap_Solutionelement_type_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18778:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18783:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18786:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18786:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Solutionelement_type_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18786:10: return_function: returning to ‘_wrap_Solutionelement_type_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18787:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18790:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18790:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:18791:3: danger: dereference of NULL ‘arg1’
#18789|     }
#18790|     arg1 = (Solutionelement *)(argp1);
#18791|->   result = (Id)(Id) ((arg1)->type);
#18792|     vresult = SWIG_From_int((int)(result));
#18793|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def209]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19110:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19095:1: enter_function: entry to ‘_wrap_Alternative_solv_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19097:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19102:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19105:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19105:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Alternative_solv_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19105:10: return_function: returning to ‘_wrap_Alternative_solv_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19106:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19109:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19109:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19110:3: danger: dereference of NULL ‘arg1’
#19108|     }
#19109|     arg1 = (Alternative *)(argp1);
#19110|->   result = (Solver *)(Solver *) ((arg1)->solv);
#19111|     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Solver, 0 |  0 );
#19112|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def210]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19134:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19119:1: enter_function: entry to ‘_wrap_Alternative_type_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19121:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19126:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19129:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19129:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Alternative_type_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19129:10: return_function: returning to ‘_wrap_Alternative_type_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19130:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19133:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19133:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19134:3: danger: dereference of NULL ‘arg1’
#19132|     }
#19133|     arg1 = (Alternative *)(argp1);
#19134|->   result = (Id)(Id) ((arg1)->type);
#19135|     vresult = SWIG_From_int((int)(result));
#19136|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def211]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19158:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19143:1: enter_function: entry to ‘_wrap_Alternative_dep_id_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19145:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19150:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19153:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19153:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Alternative_dep_id_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19153:10: return_function: returning to ‘_wrap_Alternative_dep_id_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19154:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19157:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19157:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19158:3: danger: dereference of NULL ‘arg1’
#19156|     }
#19157|     arg1 = (Alternative *)(argp1);
#19158|->   result = (Id)(Id) ((arg1)->dep_id);
#19159|     vresult = SWIG_From_int((int)(result));
#19160|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def212]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19182:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19167:1: enter_function: entry to ‘_wrap_Alternative_chosen_id_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19169:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19174:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19177:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19177:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Alternative_chosen_id_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19177:10: return_function: returning to ‘_wrap_Alternative_chosen_id_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19178:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19181:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19181:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19182:3: danger: dereference of NULL ‘arg1’
#19180|     }
#19181|     arg1 = (Alternative *)(argp1);
#19182|->   result = (Id)(Id) ((arg1)->chosen_id);
#19183|     vresult = SWIG_From_int((int)(result));
#19184|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def213]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19206:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19191:1: enter_function: entry to ‘_wrap_Alternative_level_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19193:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19198:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19201:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19201:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Alternative_level_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19201:10: return_function: returning to ‘_wrap_Alternative_level_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19202:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19205:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19205:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19206:3: danger: dereference of NULL ‘arg1’
#19204|     }
#19205|     arg1 = (Alternative *)(argp1);
#19206|->   result = (int)(int) ((arg1)->level);
#19207|     vresult = SWIG_From_int((int)(result));
#19208|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def214]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19377:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19352:1: enter_function: entry to ‘_wrap_Alternative_choices’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19354:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19359:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19362:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19362:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Alternative_choices’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19362:10: return_function: returning to ‘_wrap_Alternative_choices’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19363:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19366:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19366:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19373:17: branch_true: following ‘true’ branch (when ‘i < cnt’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19375:10: branch_true: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19377:42: danger: dereference of NULL ‘arg1’
#19375|         Id id = *idp;
#19376|   #define result resultx
#19377|->       XSolvable * result = new_XSolvable(arg1->solv->pool, id);
#19378|         vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XSolvable, 0 |  0 );
#19379|         rb_ary_store(o, i, vresult);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def215]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19434:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19419:1: enter_function: entry to ‘_wrap_Transaction_pool_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19421:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19426:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19429:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19429:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Transaction_pool_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19429:10: return_function: returning to ‘_wrap_Transaction_pool_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19430:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19433:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19433:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19434:3: danger: dereference of NULL ‘arg1’
#19432|     }
#19433|     arg1 = (Transaction *)(argp1);
#19434|->   result = (Pool *)(Pool *) ((arg1)->pool);
#19435|     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pool, 0 |  0 );
#19436|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def216]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19633:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19608:1: enter_function: entry to ‘_wrap_Transaction_newpackages’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19610:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19615:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19618:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19618:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Transaction_newpackages’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19618:10: return_function: returning to ‘_wrap_Transaction_newpackages’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19619:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19622:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19622:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19629:17: branch_true: following ‘true’ branch (when ‘i < cnt’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19631:10: branch_true: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19633:28: danger: dereference of NULL ‘arg1’
#19631|         Id id = *idp;
#19632|   #define result resultx
#19633|->       XSolvable * result = new_XSolvable(arg1->pool, id);
#19634|         vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XSolvable, SWIG_POINTER_OWN |  0 );
#19635|         rb_ary_store(o, i, vresult);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def217]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19674:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19649:1: enter_function: entry to ‘_wrap_Transaction_keptpackages’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19651:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19656:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19659:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19659:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Transaction_keptpackages’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19659:10: return_function: returning to ‘_wrap_Transaction_keptpackages’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19660:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19663:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19663:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19670:17: branch_true: following ‘true’ branch (when ‘i < cnt’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19672:10: branch_true: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19674:28: danger: dereference of NULL ‘arg1’
#19672|         Id id = *idp;
#19673|   #define result resultx
#19674|->       XSolvable * result = new_XSolvable(arg1->pool, id);
#19675|         vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XSolvable, SWIG_POINTER_OWN |  0 );
#19676|         rb_ary_store(o, i, vresult);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def218]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19715:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19690:1: enter_function: entry to ‘_wrap_Transaction_newsolvables’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19692:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19697:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19700:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19700:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Transaction_newsolvables’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19700:10: return_function: returning to ‘_wrap_Transaction_newsolvables’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19701:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19704:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19704:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19711:17: branch_true: following ‘true’ branch (when ‘i < cnt’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19713:10: branch_true: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19715:28: danger: dereference of NULL ‘arg1’
#19713|         Id id = *idp;
#19714|   #define result resultx
#19715|->       XSolvable * result = new_XSolvable(arg1->pool, id);
#19716|         vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XSolvable, SWIG_POINTER_OWN |  0 );
#19717|         rb_ary_store(o, i, vresult);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def219]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19756:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19731:1: enter_function: entry to ‘_wrap_Transaction_keptsolvables’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19733:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19738:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19741:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19741:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Transaction_keptsolvables’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19741:10: return_function: returning to ‘_wrap_Transaction_keptsolvables’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19742:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19745:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19745:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19752:17: branch_true: following ‘true’ branch (when ‘i < cnt’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19754:10: branch_true: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19756:28: danger: dereference of NULL ‘arg1’
#19754|         Id id = *idp;
#19755|   #define result resultx
#19756|->       XSolvable * result = new_XSolvable(arg1->pool, id);
#19757|         vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XSolvable, SWIG_POINTER_OWN |  0 );
#19758|         rb_ary_store(o, i, vresult);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def220]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19797:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19772:1: enter_function: entry to ‘_wrap_Transaction_steps’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19774:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19779:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19782:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19782:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_Transaction_steps’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19782:10: return_function: returning to ‘_wrap_Transaction_steps’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19783:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19786:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19786:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19793:17: branch_true: following ‘true’ branch (when ‘i < <unknown>’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19795:10: branch_true: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19797:28: danger: dereference of NULL ‘arg1’
#19795|         Id id = *idp;
#19796|   #define result resultx
#19797|->       XSolvable * result = new_XSolvable(arg1->pool, id);
#19798|         vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XSolvable, SWIG_POINTER_OWN |  0 );
#19799|         rb_ary_store(o, i, vresult);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def221]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19925:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19910:1: enter_function: entry to ‘_wrap_TransactionClass_transaction_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19912:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19917:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19920:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19920:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_TransactionClass_transaction_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19920:10: return_function: returning to ‘_wrap_TransactionClass_transaction_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19921:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19924:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19924:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19925:3: danger: dereference of NULL ‘arg1’
#19923|     }
#19924|     arg1 = (TransactionClass *)(argp1);
#19925|->   result = (Transaction *)(Transaction *) ((arg1)->transaction);
#19926|     vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Transaction, 0 |  0 );
#19927|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def222]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19949:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19934:1: enter_function: entry to ‘_wrap_TransactionClass_type_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19936:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19941:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19944:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19944:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_TransactionClass_type_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19944:10: return_function: returning to ‘_wrap_TransactionClass_type_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19945:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19948:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19948:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19949:3: danger: dereference of NULL ‘arg1’
#19947|     }
#19948|     arg1 = (TransactionClass *)(argp1);
#19949|->   result = (Id)(Id) ((arg1)->type);
#19950|     vresult = SWIG_From_int((int)(result));
#19951|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def223]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19973:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19958:1: enter_function: entry to ‘_wrap_TransactionClass_fromid_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19960:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19965:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19968:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19968:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_TransactionClass_fromid_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19968:10: return_function: returning to ‘_wrap_TransactionClass_fromid_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19969:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19972:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19972:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19973:3: danger: dereference of NULL ‘arg1’
#19971|     }
#19972|     arg1 = (TransactionClass *)(argp1);
#19973|->   result = (Id)(Id) ((arg1)->fromid);
#19974|     vresult = SWIG_From_int((int)(result));
#19975|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def224]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19997:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19982:1: enter_function: entry to ‘_wrap_TransactionClass_toid_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19984:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19989:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19992:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19992:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_TransactionClass_toid_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19992:10: return_function: returning to ‘_wrap_TransactionClass_toid_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19993:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19996:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19996:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:19997:3: danger: dereference of NULL ‘arg1’
#19995|     }
#19996|     arg1 = (TransactionClass *)(argp1);
#19997|->   result = (Id)(Id) ((arg1)->toid);
#19998|     vresult = SWIG_From_int((int)(result));
#19999|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def225]
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20021:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20006:1: enter_function: entry to ‘_wrap_TransactionClass_count_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20008:9: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20013:6: branch_false: following ‘false’ branch (when ‘argc == 0’)...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20016:10: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20016:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_TransactionClass_count_get’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20016:10: return_function: returning to ‘_wrap_TransactionClass_count_get’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20017:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20020:3: branch_false: ...to here
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20020:3: release_memory: ‘argp1’ is NULL
libsolv-0.7.35/redhat-linux-build/bindings/ruby/solv_ruby.c:20021:3: danger: dereference of NULL ‘arg1’
#20019|     }
#20020|     arg1 = (TransactionClass *)(argp1);
#20021|->   result = (int)(int) ((arg1)->count);
#20022|     vresult = SWIG_From_int((int)(result));
#20023|     return vresult;

Error: CPPCHECK_WARNING (CWE-758): [#def226]
libsolv-0.7.35/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): [#def227]
libsolv-0.7.35/src/dirpool.c:93:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libsolv-0.7.35/src/dirpool.c:100:1: enter_function: entry to ‘dirpool_add_dir’
libsolv-0.7.35/src/dirpool.c:113:6: branch_false: following ‘false’ branch (when ‘comp > 0’)...
libsolv-0.7.35/src/dirpool.c:115:7: branch_false: ...to here
libsolv-0.7.35/src/dirpool.c:115:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/src/dirpool.c:117:8: branch_false: ...to here
libsolv-0.7.35/src/dirpool.c:117:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/src/dirpool.c:118:5: branch_true: ...to here
libsolv-0.7.35/src/dirpool.c:118:5: call_function: calling ‘dirpool_make_dirtraverse’ from ‘dirpool_add_dir’
#   91|   	continue;
#   92|         parent = -dp->dirs[i];
#   93|->       dirtraverse[i] = dirtraverse[parent];
#   94|         dirtraverse[parent] = i + 1;
#   95|       }

Error: CPPCHECK_WARNING (CWE-562): [#def228]
libsolv-0.7.35/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): [#def229]
libsolv-0.7.35/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-404): [#def230]
libsolv-0.7.35/src/pool.c:337:22: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libsolv-0.7.35/src/pool.c:331:6: branch_false: following ‘false’ branch (when ‘pool’ is non-NULL)...
libsolv-0.7.35/src/pool.c:333:3: branch_false: ...to here
libsolv-0.7.35/src/pool.c:333:3: acquire_resource: ‘va_start’ called here
libsolv-0.7.35/src/pool.c:334:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/src/pool.c:336:7: branch_true: ...to here
libsolv-0.7.35/src/pool.c:337:22: throw: if ‘solv_malloc’ throws an exception...
libsolv-0.7.35/src/pool.c:337:22: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  335|       {
#  336|         pool->errstra = 1024;
#  337|->       pool->errstr = solv_malloc(pool->errstra);
#  338|       }
#  339|     if (!*format)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def231]
libsolv-0.7.35/src/pool.c:531:7: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libsolv-0.7.35/src/pool.c:521:1: enter_function: entry to ‘pool_tmpjoin’
libsolv-0.7.35/src/pool.c:525:3: branch_true: following ‘true’ branch (when ‘str1’ is non-NULL)...
libsolv-0.7.35/src/pool.c:525:15: branch_true: ...to here
libsolv-0.7.35/src/pool.c:526:3: branch_false: following ‘false’ branch (when ‘str2’ is NULL)...
libsolv-0.7.35/src/pool.c:527:3: branch_false: ...to here
libsolv-0.7.35/src/pool.c:527:3: branch_false: following ‘false’ branch (when ‘str3’ is NULL)...
libsolv-0.7.35/src/pool.c:528:38: branch_false: ...to here
libsolv-0.7.35/src/pool.c:528:13: call_function: calling ‘pool_alloctmpspace’ from ‘pool_tmpjoin’
libsolv-0.7.35/src/pool.c:528:13: return_function: returning to ‘pool_tmpjoin’ from ‘pool_alloctmpspace’
libsolv-0.7.35/src/pool.c:529:6: branch_true: following ‘true’ branch (when ‘l1 != 0’)...
libsolv-0.7.35/src/pool.c:531:7: branch_true: ...to here
libsolv-0.7.35/src/pool.c:531:7: danger: argument 1 (‘pool_alloctmpspace(pool,  l1 + l2 + l3 + 1)’) NULL where non-null expected
#  529|     if (l1)
#  530|       {
#  531|->       strcpy(s, str1);
#  532|         s += l1;
#  533|       }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def232]
libsolv-0.7.35/src/pool.c:536:7: warning[-Wanalyzer-null-argument]: use of NULL ‘s’ where non-null expected
libsolv-0.7.35/src/pool.c:521:1: enter_function: entry to ‘pool_tmpjoin’
libsolv-0.7.35/src/pool.c:525:3: branch_false: following ‘false’ branch (when ‘str1’ is NULL)...
libsolv-0.7.35/src/pool.c:526:3: branch_false: ...to here
libsolv-0.7.35/src/pool.c:526:3: branch_true: following ‘true’ branch (when ‘str2’ is non-NULL)...
libsolv-0.7.35/src/pool.c:526:15: branch_true: ...to here
libsolv-0.7.35/src/pool.c:527:3: branch_false: following ‘false’ branch (when ‘str3’ is NULL)...
libsolv-0.7.35/src/pool.c:528:38: branch_false: ...to here
libsolv-0.7.35/src/pool.c:528:13: call_function: calling ‘pool_alloctmpspace’ from ‘pool_tmpjoin’
libsolv-0.7.35/src/pool.c:528:13: return_function: returning to ‘pool_tmpjoin’ from ‘pool_alloctmpspace’
libsolv-0.7.35/src/pool.c:529:6: branch_false: following ‘false’ branch (when ‘l1 == 0’)...
libsolv-0.7.35/src/pool.c:534:6: branch_false: ...to here
libsolv-0.7.35/src/pool.c:534:6: branch_true: following ‘true’ branch (when ‘l2 != 0’)...
libsolv-0.7.35/src/pool.c:536:7: branch_true: ...to here
libsolv-0.7.35/src/pool.c:536:7: danger: argument 1 (‘s’) NULL where non-null expected
#  534|     if (l2)
#  535|       {
#  536|->       strcpy(s, str2);
#  537|         s += l2;
#  538|       }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def233]
libsolv-0.7.35/src/pool.c:566:9: warning[-Wanalyzer-null-argument]: use of NULL ‘str’ where non-null expected
libsolv-0.7.35/src/pool.c:549:1: enter_function: entry to ‘pool_tmpappend’
libsolv-0.7.35/src/pool.c:554:3: branch_true: following ‘true’ branch (when ‘str1’ is non-NULL)...
libsolv-0.7.35/src/pool.c:554:15: branch_true: ...to here
libsolv-0.7.35/src/pool.c:555:3: branch_false: following ‘false’ branch (when ‘str2’ is NULL)...
libsolv-0.7.35/src/pool.c:556:3: branch_false: ...to here
libsolv-0.7.35/src/pool.c:556:3: branch_false: following ‘false’ branch (when ‘str3’ is NULL)...
libsolv-0.7.35/src/pool.c:557:45: branch_false: ...to here
libsolv-0.7.35/src/pool.c:557:9: call_function: calling ‘pool_alloctmpspace_free’ from ‘pool_tmpappend’
libsolv-0.7.35/src/pool.c:557:9: return_function: returning to ‘pool_tmpappend’ from ‘pool_alloctmpspace_free’
libsolv-0.7.35/src/pool.c:558:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/src/pool.c:561:11: branch_false: ...to here
libsolv-0.7.35/src/pool.c:561:11: call_function: calling ‘pool_alloctmpspace’ from ‘pool_tmpappend’
libsolv-0.7.35/src/pool.c:561:11: return_function: returning to ‘pool_tmpappend’ from ‘pool_alloctmpspace’
libsolv-0.7.35/src/pool.c:563:6: branch_true: following ‘true’ branch (when ‘l1 != 0’)...
libsolv-0.7.35/src/pool.c:565:10: branch_true: ...to here
libsolv-0.7.35/src/pool.c:565:10: branch_true: following ‘true’ branch (when ‘str1 != str’)...
libsolv-0.7.35/src/pool.c:566:9: branch_true: ...to here
libsolv-0.7.35/src/pool.c:566:9: danger: argument 1 (‘str’) NULL where non-null expected
#  564|       {
#  565|         if (s != str1)
#  566|->         strcpy(s, str1);
#  567|         s += l1;
#  568|       }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def234]
libsolv-0.7.35/src/pool.c:571:7: warning[-Wanalyzer-null-argument]: use of NULL ‘s’ where non-null expected
libsolv-0.7.35/src/pool.c:549:1: enter_function: entry to ‘pool_tmpappend’
libsolv-0.7.35/src/pool.c:554:3: branch_false: following ‘false’ branch (when ‘str1’ is NULL)...
libsolv-0.7.35/src/pool.c:555:3: branch_false: ...to here
libsolv-0.7.35/src/pool.c:555:3: branch_true: following ‘true’ branch (when ‘str2’ is non-NULL)...
libsolv-0.7.35/src/pool.c:555:15: branch_true: ...to here
libsolv-0.7.35/src/pool.c:556:3: branch_false: following ‘false’ branch (when ‘str3’ is NULL)...
libsolv-0.7.35/src/pool.c:557:45: branch_false: ...to here
libsolv-0.7.35/src/pool.c:557:9: call_function: calling ‘pool_alloctmpspace_free’ from ‘pool_tmpappend’
libsolv-0.7.35/src/pool.c:557:9: return_function: returning to ‘pool_tmpappend’ from ‘pool_alloctmpspace_free’
libsolv-0.7.35/src/pool.c:558:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/src/pool.c:561:11: branch_false: ...to here
libsolv-0.7.35/src/pool.c:561:11: call_function: calling ‘pool_alloctmpspace’ from ‘pool_tmpappend’
libsolv-0.7.35/src/pool.c:561:11: return_function: returning to ‘pool_tmpappend’ from ‘pool_alloctmpspace’
libsolv-0.7.35/src/pool.c:563:6: branch_false: following ‘false’ branch (when ‘l1 == 0’)...
libsolv-0.7.35/src/pool.c:569:6: branch_false: ...to here
libsolv-0.7.35/src/pool.c:569:6: branch_true: following ‘true’ branch (when ‘l2 != 0’)...
libsolv-0.7.35/src/pool.c:571:7: branch_true: ...to here
libsolv-0.7.35/src/pool.c:571:7: danger: argument 1 (‘s’) NULL where non-null expected
#  569|     if (l2)
#  570|       {
#  571|->       strcpy(s, str2);
#  572|         s += l2;
#  573|       }

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

Error: CPPCHECK_WARNING (CWE-758): [#def236]
libsolv-0.7.35/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-476): [#def237]
libsolv-0.7.35/src/repo.c:1181:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libsolv-0.7.35/src/repo.c:1507:1: enter_function: entry to ‘repo_set_deparray’
libsolv-0.7.35/src/repo.c:1512:6: branch_true: following ‘true’ branch (when ‘marker != 0’)...
libsolv-0.7.35/src/repo.c:1517:7: branch_true: ...to here
libsolv-0.7.35/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): [#def238]
libsolv-0.7.35/src/repo.c:1492:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libsolv-0.7.35/src/repo.c:1473:1: enter_function: entry to ‘repo_add_deparray’
libsolv-0.7.35/src/repo.c:1478:6: branch_true: following ‘true’ branch (when ‘p >= 0’)...
libsolv-0.7.35/src/repo.c:1478:6: branch_true: ...to here
libsolv-0.7.35/src/repo.c:1481:7: branch_true: following ‘true’ branch...
libsolv-0.7.35/src/repo.c:1483:9: branch_true: ...to here
libsolv-0.7.35/src/repo.c:1491:18: call_function: calling ‘solvable_offsetptr’ from ‘repo_add_deparray’
libsolv-0.7.35/src/repo.c:1491:18: return_function: returning to ‘repo_add_deparray’ from ‘solvable_offsetptr’
libsolv-0.7.35/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): [#def239]
libsolv-0.7.35/src/repo.c:1556:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libsolv-0.7.35/src/repo.c:1507:1: enter_function: entry to ‘repo_set_deparray’
libsolv-0.7.35/src/repo.c:1512:6: branch_false: following ‘false’ branch (when ‘marker == 0’)...
libsolv-0.7.35/src/repo.c:1538:6: branch_false: ...to here
libsolv-0.7.35/src/repo.c:1538:6: branch_true: following ‘true’ branch (when ‘p >= 0’)...
libsolv-0.7.35/src/repo.c:1538:6: branch_true: ...to here
libsolv-0.7.35/src/repo.c:1542:7: branch_true: following ‘true’ branch...
libsolv-0.7.35/src/repo.c:1542:7: branch_true: ...to here
libsolv-0.7.35/src/repo.c:1553:23: branch_false: following ‘false’ branch...
libsolv-0.7.35/src/repo.c:1555:37: branch_false: ...to here
libsolv-0.7.35/src/repo.c:1555:18: call_function: calling ‘solvable_offsetptr’ from ‘repo_set_deparray’
libsolv-0.7.35/src/repo.c:1555:18: return_function: returning to ‘repo_set_deparray’ from ‘solvable_offsetptr’
libsolv-0.7.35/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): [#def240]
libsolv-0.7.35/src/repo_write.c:1549:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘spool’
libsolv-0.7.35/src/repo_write.c:2241:1: enter_function: entry to ‘repo_write’
libsolv-0.7.35/src/repo_write.c:2245:9: call_function: calling ‘repowriter_write’ from ‘repo_write’
# 1547|      */
# 1548|   
# 1549|->   reloff = spool->nstrings;
# 1550|     if (cbdata.ownspool)
# 1551|       reloff = (reloff + NEEDID_BLOCK) & ~NEEDID_BLOCK;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def241]
libsolv-0.7.35/src/repo_write.c:1630:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sp’
libsolv-0.7.35/src/repo_write.c:2264:1: enter_function: entry to ‘repo_write_filtered’
libsolv-0.7.35/src/repo_write.c:2271:9: call_function: calling ‘repowriter_write’ from ‘repo_write_filtered’
# 1628|       {
# 1629|         /* strip off REPOSITORY_SOLVABLES from the main schema */
# 1630|->       for (sp = mainschemakeys; *sp; sp++)
# 1631|   	;
# 1632|         sp[-1] = 0;	/* strip last entry */

Error: CPPCHECK_WARNING (CWE-758): [#def242]
libsolv-0.7.35/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): [#def243]
libsolv-0.7.35/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): [#def244]
libsolv-0.7.35/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): [#def245]
libsolv-0.7.35/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): [#def246]
libsolv-0.7.35/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): [#def247]
libsolv-0.7.35/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): [#def248]
libsolv-0.7.35/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): [#def249]
libsolv-0.7.35/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): [#def250]
libsolv-0.7.35/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): [#def251]
libsolv-0.7.35/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: COMPILER_WARNING (CWE-704): [#def252]
libsolv-0.7.35/src/selection.c: scope_hint: In function ‘selection_name_arch_rel’
libsolv-0.7.35/src/selection.c:907:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  907 |       if ((r = strpbrk(name, "<=>")) != 0)
#      |              ^
#  905|     if ((flags & SELECTION_REL) != 0)
#  906|       {
#  907|->       if ((r = strpbrk(name, "<=>")) != 0)
#  908|   	{
#  909|   	  rname = solv_strdup(name);

Error: COMPILER_WARNING (CWE-704): [#def253]
libsolv-0.7.35/src/selection.c:907:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  905|     if ((flags & SELECTION_REL) != 0)
#  906|       {
#  907|->       if ((r = strpbrk(name, "<=>")) != 0)
#  908|   	{
#  909|   	  rname = solv_strdup(name);

Error: COMPILER_WARNING (CWE-704): [#def254]
libsolv-0.7.35/src/selection.c: scope_hint: In function ‘selection_canon’
libsolv-0.7.35/src/selection.c:1175:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1175 |       if ((r = strchr(name, '_')) == 0)
#      |              ^
# 1173|     if (pool->disttype == DISTTYPE_DEB)
# 1174|       {
# 1175|->       if ((r = strchr(name, '_')) == 0)
# 1176|   	return 0;
# 1177|         rname = solv_strdup(name);	/* so we can modify it */

Error: COMPILER_WARNING (CWE-704): [#def255]
libsolv-0.7.35/src/selection.c:1175:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1173|     if (pool->disttype == DISTTYPE_DEB)
# 1174|       {
# 1175|->       if ((r = strchr(name, '_')) == 0)
# 1176|   	return 0;
# 1177|         rname = solv_strdup(name);	/* so we can modify it */

Error: COMPILER_WARNING (CWE-704): [#def256]
libsolv-0.7.35/src/selection.c:1198:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1198 |       if ((r = strchr(name, '-')) == 0)
#      |              ^
# 1196|     if (pool->disttype == DISTTYPE_HAIKU)
# 1197|       {
# 1198|->       if ((r = strchr(name, '-')) == 0)
# 1199|   	return 0;
# 1200|         rname = solv_strdup(name);	/* so we can modify it */

Error: COMPILER_WARNING (CWE-704): [#def257]
libsolv-0.7.35/src/selection.c:1198:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1196|     if (pool->disttype == DISTTYPE_HAIKU)
# 1197|       {
# 1198|->       if ((r = strchr(name, '-')) == 0)
# 1199|   	return 0;
# 1200|         rname = solv_strdup(name);	/* so we can modify it */

Error: COMPILER_WARNING (CWE-704): [#def258]
libsolv-0.7.35/src/selection.c:1219:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1219 |   if ((r = strrchr(name, '-')) == 0)
#      |          ^
# 1217|       }
# 1218|   
# 1219|->   if ((r = strrchr(name, '-')) == 0)
# 1220|       return 0;
# 1221|     rname = solv_strdup(name);	/* so we can modify it */

Error: COMPILER_WARNING (CWE-704): [#def259]
libsolv-0.7.35/src/selection.c:1219:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1217|       }
# 1218|   
# 1219|->   if ((r = strrchr(name, '-')) == 0)
# 1220|       return 0;
# 1221|     rname = solv_strdup(name);	/* so we can modify it */

Error: CPPCHECK_WARNING (CWE-758): [#def260]
libsolv-0.7.35/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): [#def261]
libsolv-0.7.35/src/solvable.c:367:57: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libsolv-0.7.35/src/solvable.c:340:1: enter_function: entry to ‘solvable_lookup_location’
libsolv-0.7.35/src/solvable.c:349:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/src/solvable.c:351:3: branch_false: ...to here
libsolv-0.7.35/src/solvable.c:360:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/src/solvable.c:363:14: branch_true: ...to here
libsolv-0.7.35/src/solvable.c:364:13: call_function: calling ‘evrid2vrstr’ from ‘solvable_lookup_location’
libsolv-0.7.35/src/solvable.c:364:13: return_function: returning to ‘solvable_lookup_location’ from ‘evrid2vrstr’
libsolv-0.7.35/src/solvable.c:367:57: danger: argument 1 (‘evrid2vrstr(pool, *s.evr)’) NULL where non-null expected
#  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): [#def262]
libsolv-0.7.35/src/util.h:53:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/ext/testcase.c:2149:1: enter_function: entry to ‘testcase_read’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_resource: opened here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2201:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2203:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2222:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2224:20: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2224: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): [#def263]
libsolv-0.7.35/src/util.h:53:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/ext/testcase.c:2149:1: enter_function: entry to ‘testcase_read’
libsolv-0.7.35/ext/testcase.c:2171:6: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
libsolv-0.7.35/ext/testcase.c:2171:21: branch_true: ...to here
libsolv-0.7.35/ext/testcase.c:2171:21: acquire_memory: allocated here
libsolv-0.7.35/ext/testcase.c:2171:7: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2176:17: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2201:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2203:7: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2222:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/ext/testcase.c:2224:20: branch_false: ...to here
libsolv-0.7.35/ext/testcase.c:2224: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): [#def264]
libsolv-0.7.35/tools/apk2solv.c:124:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_resource: opened here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:123:14: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:123:14: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/apk2solv.c:124:23: throw: if ‘solv_strdup’ throws an exception...
libsolv-0.7.35/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): [#def265]
libsolv-0.7.35/tools/apk2solv.c:124:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_memory: allocated here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:123:14: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:123:14: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/apk2solv.c:124:23: throw: if ‘solv_strdup’ throws an exception...
libsolv-0.7.35/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): [#def266]
libsolv-0.7.35/tools/apk2solv.c:126:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_resource: opened here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:126:10: throw: if ‘repo_create’ throws an exception...
libsolv-0.7.35/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): [#def267]
libsolv-0.7.35/tools/apk2solv.c:126:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_memory: allocated here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:126:10: throw: if ‘repo_create’ throws an exception...
libsolv-0.7.35/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): [#def268]
libsolv-0.7.35/tools/apk2solv.c:127:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_resource: opened here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:127:3: throw: if ‘repo_add_repodata’ throws an exception...
libsolv-0.7.35/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): [#def269]
libsolv-0.7.35/tools/apk2solv.c:127:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_memory: allocated here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:127:3: throw: if ‘repo_add_repodata’ throws an exception...
libsolv-0.7.35/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): [#def270]
libsolv-0.7.35/tools/apk2solv.c:135:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_resource: opened here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_true: following ‘true’ branch (when ‘isrepo != 0’)...
libsolv-0.7.35/tools/apk2solv.c:131:10: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_true: following ‘true’ branch (when ‘npkgs == 0’)...
libsolv-0.7.35/tools/apk2solv.c:135:15: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:135:15: throw: if ‘repo_add_apk_repo’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:135:15: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  133|         if (!npkgs)
#  134|   	{
#  135|-> 	  if (repo_add_apk_repo(repo, stdin, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) != 0)
#  136|   	    {
#  137|   	      fprintf(stderr, "apk2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def271]
libsolv-0.7.35/tools/apk2solv.c:135:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_memory: allocated here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_true: following ‘true’ branch (when ‘isrepo != 0’)...
libsolv-0.7.35/tools/apk2solv.c:131:10: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_true: following ‘true’ branch (when ‘npkgs == 0’)...
libsolv-0.7.35/tools/apk2solv.c:135:15: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:135:15: throw: if ‘repo_add_apk_repo’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:135:15: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  133|         if (!npkgs)
#  134|   	{
#  135|-> 	  if (repo_add_apk_repo(repo, stdin, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) != 0)
#  136|   	    {
#  137|   	      fprintf(stderr, "apk2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def272]
libsolv-0.7.35/tools/apk2solv.c:137:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_resource: opened here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_true: following ‘true’ branch (when ‘isrepo != 0’)...
libsolv-0.7.35/tools/apk2solv.c:131:10: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_true: following ‘true’ branch (when ‘npkgs == 0’)...
libsolv-0.7.35/tools/apk2solv.c:135:15: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:135:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:137:15: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:137:15: throw: if ‘pool_errstr’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:137:15: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  135|   	  if (repo_add_apk_repo(repo, stdin, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) != 0)
#  136|   	    {
#  137|-> 	      fprintf(stderr, "apk2solv: %s\n", pool_errstr(pool));
#  138|   	      res = 1;
#  139|   	    }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
libsolv-0.7.35/tools/apk2solv.c:137:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_memory: allocated here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:110:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:11: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_true: following ‘true’ branch (when ‘isrepo != 0’)...
libsolv-0.7.35/tools/apk2solv.c:131:10: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_true: following ‘true’ branch (when ‘npkgs == 0’)...
libsolv-0.7.35/tools/apk2solv.c:135:15: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:135:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:137:15: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:137:15: throw: if ‘pool_errstr’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:137:15: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  135|   	  if (repo_add_apk_repo(repo, stdin, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) != 0)
#  136|   	    {
#  137|-> 	      fprintf(stderr, "apk2solv: %s\n", pool_errstr(pool));
#  138|   	      res = 1;
#  139|   	    }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def274]
libsolv-0.7.35/tools/apk2solv.c:148:19: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_resource: opened here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:112:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/apk2solv.c:115:18: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:115:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/apk2solv.c:103:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/apk2solv.c:110:20: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_true: following ‘true’ branch (when ‘isrepo != 0’)...
libsolv-0.7.35/tools/apk2solv.c:131:10: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_false: following ‘false’ branch (when ‘npkgs != 0’)...
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:143:23: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/apk2solv.c:146:36: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:146:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:148:19: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:148:19: throw: if ‘perror’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:148:19: danger: ‘fp’ leaks here; was opened at [(8)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/7)
#  146|   	      if (!(fp = fopen(pkgs[i], "r")))
#  147|   		{
#  148|-> 		  perror(pkgs[i]);
#  149|   		  res = 1;
#  150|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
libsolv-0.7.35/tools/apk2solv.c:148:19: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_memory: allocated here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:112:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/apk2solv.c:115:18: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:115:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/apk2solv.c:103:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/apk2solv.c:110:20: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_true: following ‘true’ branch (when ‘isrepo != 0’)...
libsolv-0.7.35/tools/apk2solv.c:131:10: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_false: following ‘false’ branch (when ‘npkgs != 0’)...
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:143:23: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/apk2solv.c:146:36: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:146:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:148:19: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:148:19: throw: if ‘perror’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:148:19: danger: ‘fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/7)
#  146|   	      if (!(fp = fopen(pkgs[i], "r")))
#  147|   		{
#  148|-> 		  perror(pkgs[i]);
#  149|   		  res = 1;
#  150|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def276]
libsolv-0.7.35/tools/apk2solv.c:153:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "r")’
libsolv-0.7.35/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_false: following ‘false’ branch (when ‘manifest’ is NULL)...
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:123:14: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:123:14: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_true: following ‘true’ branch (when ‘isrepo != 0’)...
libsolv-0.7.35/tools/apk2solv.c:131:10: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_false: following ‘false’ branch (when ‘npkgs != 0’)...
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:143:23: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/apk2solv.c:146:36: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:146:26: acquire_resource: opened here
libsolv-0.7.35/tools/apk2solv.c:146:18: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:153:23: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:153:23: throw: if ‘repo_add_apk_repo’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:153:23: danger: ‘fopen(*<unknown>, "r")’ leaks here; was opened at [(17)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/16)
#  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): [#def277]
libsolv-0.7.35/tools/apk2solv.c:153:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_resource: opened here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:112:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/apk2solv.c:115:18: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:115:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/apk2solv.c:103:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/apk2solv.c:110:20: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_true: following ‘true’ branch (when ‘isrepo != 0’)...
libsolv-0.7.35/tools/apk2solv.c:131:10: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_false: following ‘false’ branch (when ‘npkgs != 0’)...
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:143:23: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/apk2solv.c:146:36: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:146:18: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:153:23: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:153:23: throw: if ‘repo_add_apk_repo’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:153:23: danger: ‘fp’ leaks here; was opened at [(8)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/7)
#  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): [#def278]
libsolv-0.7.35/tools/apk2solv.c:153:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "r")’
libsolv-0.7.35/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_false: following ‘false’ branch (when ‘manifest’ is NULL)...
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:123:14: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:123:14: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/apk2solv.c:121:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:126:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_true: following ‘true’ branch (when ‘isrepo != 0’)...
libsolv-0.7.35/tools/apk2solv.c:131:10: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_false: following ‘false’ branch (when ‘npkgs != 0’)...
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:143:23: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/apk2solv.c:146:36: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:146:26: acquire_memory: allocated here
libsolv-0.7.35/tools/apk2solv.c:146:18: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:153:23: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:153:23: throw: if ‘repo_add_apk_repo’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:153:23: danger: ‘fopen(*<unknown>, "r")’ leaks here; was allocated at [(17)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/16)
#  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): [#def279]
libsolv-0.7.35/tools/apk2solv.c:153:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_memory: allocated here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:112:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/apk2solv.c:115:18: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:115:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/apk2solv.c:103:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/apk2solv.c:110:20: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_true: following ‘true’ branch (when ‘isrepo != 0’)...
libsolv-0.7.35/tools/apk2solv.c:131:10: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_false: following ‘false’ branch (when ‘npkgs != 0’)...
libsolv-0.7.35/tools/apk2solv.c:133:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:143:23: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/apk2solv.c:146:36: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:146:18: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:153:23: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:153:23: throw: if ‘repo_add_apk_repo’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:153:23: danger: ‘fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/7)
#  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): [#def280]
libsolv-0.7.35/tools/apk2solv.c:166:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_resource: opened here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:112:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/apk2solv.c:115:18: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:115:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/apk2solv.c:103:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/apk2solv.c:110:20: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_false: following ‘false’ branch (when ‘isrepo == 0’)...
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:165:19: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/apk2solv.c:166:13: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:166:13: throw: if ‘repo_add_apk_pkg’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:166:13: danger: ‘fp’ leaks here; was opened at [(8)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/7)
#  164|       {
#  165|         for (i = 0; i < npkgs; i++)
#  166|-> 	if (repo_add_apk_pkg(repo, pkgs[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) == 0)
#  167|   	  {
#  168|   	    fprintf(stderr, "apk2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
libsolv-0.7.35/tools/apk2solv.c:166:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_memory: allocated here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:112:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/apk2solv.c:115:18: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:115:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/apk2solv.c:103:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/apk2solv.c:110:20: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_false: following ‘false’ branch (when ‘isrepo == 0’)...
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:165:19: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/apk2solv.c:166:13: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:166:13: throw: if ‘repo_add_apk_pkg’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:166:13: danger: ‘fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/7)
#  164|       {
#  165|         for (i = 0; i < npkgs; i++)
#  166|-> 	if (repo_add_apk_pkg(repo, pkgs[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) == 0)
#  167|   	  {
#  168|   	    fprintf(stderr, "apk2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def282]
libsolv-0.7.35/tools/apk2solv.c:168:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_resource: opened here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:112:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/apk2solv.c:115:18: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:115:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/apk2solv.c:103:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/apk2solv.c:110:20: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_false: following ‘false’ branch (when ‘isrepo == 0’)...
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:165:19: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/apk2solv.c:166:13: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:166:12: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:168:13: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:168:13: throw: if ‘pool_errstr’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:168:13: danger: ‘fp’ leaks here; was opened at [(8)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/7)
#  166|   	if (repo_add_apk_pkg(repo, pkgs[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) == 0)
#  167|   	  {
#  168|-> 	    fprintf(stderr, "apk2solv: %s\n", pool_errstr(pool));
#  169|   	    res = 1;
#  170|   	  }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
libsolv-0.7.35/tools/apk2solv.c:168:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/apk2solv.c:51:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/apk2solv.c:65:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/apk2solv.c:67:7: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:92:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/apk2solv.c:94:12: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:94:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/apk2solv.c:96:22: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:96:22: acquire_memory: allocated here
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:96:15: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:112:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/apk2solv.c:115:18: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:115:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/apk2solv.c:103:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/apk2solv.c:110:20: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/apk2solv.c:118:10: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_false: following ‘false’ branch (when ‘isrepo == 0’)...
libsolv-0.7.35/tools/apk2solv.c:129:6: branch_false: ...to here
libsolv-0.7.35/tools/apk2solv.c:165:19: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/apk2solv.c:166:13: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:166:12: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/apk2solv.c:168:13: branch_true: ...to here
libsolv-0.7.35/tools/apk2solv.c:168:13: throw: if ‘pool_errstr’ throws an exception...
libsolv-0.7.35/tools/apk2solv.c:168:13: danger: ‘fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/7)
#  166|   	if (repo_add_apk_pkg(repo, pkgs[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) == 0)
#  167|   	  {
#  168|-> 	    fprintf(stderr, "apk2solv: %s\n", pool_errstr(pool));
#  169|   	    res = 1;
#  170|   	  }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def284]
libsolv-0.7.35/tools/archpkgs2solv.c:111:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:50:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_resource: opened here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:110:14: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:110:14: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/archpkgs2solv.c:111:23: throw: if ‘solv_strdup’ throws an exception...
libsolv-0.7.35/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): [#def285]
libsolv-0.7.35/tools/archpkgs2solv.c:111:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:50:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_memory: allocated here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:110:14: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:110:14: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/archpkgs2solv.c:111:23: throw: if ‘solv_strdup’ throws an exception...
libsolv-0.7.35/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): [#def286]
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_resource: opened here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: throw: if ‘repo_create’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  111|         pkgs[npkgs++] = solv_strdup(argv[optind++]);
#  112|       }
#  113|->   repo = repo_create(pool, "archpkgs2solv");
#  114|     repo_add_repodata(repo, 0);
#  115|     res = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_memory: allocated here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: throw: if ‘repo_create’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  111|         pkgs[npkgs++] = solv_strdup(argv[optind++]);
#  112|       }
#  113|->   repo = repo_create(pool, "archpkgs2solv");
#  114|     repo_add_repodata(repo, 0);
#  115|     res = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def288]
libsolv-0.7.35/tools/archpkgs2solv.c:114:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_resource: opened here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:114:3: throw: if ‘repo_add_repodata’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:114:3: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  112|       }
#  113|     repo = repo_create(pool, "archpkgs2solv");
#  114|->   repo_add_repodata(repo, 0);
#  115|     res = 0;
#  116|     for (i = 0; i < npkgs; i++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
libsolv-0.7.35/tools/archpkgs2solv.c:114:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_memory: allocated here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:114:3: throw: if ‘repo_add_repodata’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:114:3: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  112|       }
#  113|     repo = repo_create(pool, "archpkgs2solv");
#  114|->   repo_add_repodata(repo, 0);
#  115|     res = 0;
#  116|     for (i = 0; i < npkgs; i++)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def290]
libsolv-0.7.35/tools/archpkgs2solv.c:117:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:50:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_resource: opened here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:99:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:102:18: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:102:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/archpkgs2solv.c:90:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:97:20: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:116:15: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:117:9: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:117:9: throw: if ‘repo_add_arch_pkg’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:117:9: danger: ‘fp’ leaks here; was opened at [(8)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/7)
#  115|     res = 0;
#  116|     for (i = 0; i < npkgs; i++)
#  117|->     if (repo_add_arch_pkg(repo, pkgs[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) == 0)
#  118|         {
#  119|   	fprintf(stderr, "archpkgs2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def291]
libsolv-0.7.35/tools/archpkgs2solv.c:117:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:50:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_memory: allocated here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:99:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:102:18: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:102:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/archpkgs2solv.c:90:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:97:20: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:116:15: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:117:9: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:117:9: throw: if ‘repo_add_arch_pkg’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:117:9: danger: ‘fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/7)
#  115|     res = 0;
#  116|     for (i = 0; i < npkgs; i++)
#  117|->     if (repo_add_arch_pkg(repo, pkgs[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) == 0)
#  118|         {
#  119|   	fprintf(stderr, "archpkgs2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def292]
libsolv-0.7.35/tools/archpkgs2solv.c:119:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:50:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_resource: opened here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:99:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:102:18: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:102:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/archpkgs2solv.c:90:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:97:20: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:116:15: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:117:9: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:117:8: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:119:9: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:119:9: throw: if ‘pool_errstr’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:119:9: danger: ‘fp’ leaks here; was opened at [(8)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/7)
#  117|       if (repo_add_arch_pkg(repo, pkgs[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) == 0)
#  118|         {
#  119|-> 	fprintf(stderr, "archpkgs2solv: %s\n", pool_errstr(pool));
#  120|   	res = 1;
#  121|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def293]
libsolv-0.7.35/tools/archpkgs2solv.c:119:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:50:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_memory: allocated here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:99:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:102:18: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:102:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/archpkgs2solv.c:90:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:97:20: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:116:15: branch_true: following ‘true’ branch (when ‘i < npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:117:9: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:117:8: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:119:9: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:119:9: throw: if ‘pool_errstr’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:119:9: danger: ‘fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/7)
#  117|       if (repo_add_arch_pkg(repo, pkgs[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) == 0)
#  118|         {
#  119|-> 	fprintf(stderr, "archpkgs2solv: %s\n", pool_errstr(pool));
#  120|   	res = 1;
#  121|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def294]
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_resource: opened here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:116:15: branch_false: following ‘false’ branch (when ‘i >= npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: throw: if ‘repo_internalize’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
#  120|   	res = 1;
#  121|         }
#  122|->   repo_internalize(repo);
#  123|     tool_write(repo, stdout);
#  124|     pool_free(pool);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_memory: allocated here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:116:15: branch_false: following ‘false’ branch (when ‘i >= npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: throw: if ‘repo_internalize’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
#  120|   	res = 1;
#  121|         }
#  122|->   repo_internalize(repo);
#  123|     tool_write(repo, stdout);
#  124|     pool_free(pool);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def296]
libsolv-0.7.35/tools/archpkgs2solv.c:123:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_resource: opened here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:116:15: branch_false: following ‘false’ branch (when ‘i >= npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:123:3: throw: if ‘tool_write’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:123:3: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/6)
#  121|         }
#  122|     repo_internalize(repo);
#  123|->   tool_write(repo, stdout);
#  124|     pool_free(pool);
#  125|     for (c = 0; c < npkgs; c++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
libsolv-0.7.35/tools/archpkgs2solv.c:123:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_memory: allocated here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:116:15: branch_false: following ‘false’ branch (when ‘i >= npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:123:3: throw: if ‘tool_write’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:123:3: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
#  121|         }
#  122|     repo_internalize(repo);
#  123|->   tool_write(repo, stdout);
#  124|     pool_free(pool);
#  125|     for (c = 0; c < npkgs; c++)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def298]
libsolv-0.7.35/tools/archpkgs2solv.c:124:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_resource: opened here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:116:15: branch_false: following ‘false’ branch (when ‘i >= npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:124:3: throw: if ‘pool_free’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:124:3: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6)
#  122|     repo_internalize(repo);
#  123|     tool_write(repo, stdout);
#  124|->   pool_free(pool);
#  125|     for (c = 0; c < npkgs; c++)
#  126|       solv_free((char *)pkgs[c]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
libsolv-0.7.35/tools/archpkgs2solv.c:124:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_memory: allocated here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:116:15: branch_false: following ‘false’ branch (when ‘i >= npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:124:3: throw: if ‘pool_free’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:124:3: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/6)
#  122|     repo_internalize(repo);
#  123|     tool_write(repo, stdout);
#  124|->   pool_free(pool);
#  125|     for (c = 0; c < npkgs; c++)
#  126|       solv_free((char *)pkgs[c]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def300]
libsolv-0.7.35/tools/archpkgs2solv.c:127:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_resource: opened here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:116:15: branch_false: following ‘false’ branch (when ‘i >= npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:125:15: branch_false: following ‘false’ branch (when ‘c >= npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:127:3: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:127:3: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:127:3: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/6)
#  125|     for (c = 0; c < npkgs; c++)
#  126|       solv_free((char *)pkgs[c]);
#  127|->   solv_free(pkgs);
#  128|     exit(res);
#  129|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
libsolv-0.7.35/tools/archpkgs2solv.c:127:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/archpkgs2solv.c:62:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/archpkgs2solv.c:64:7: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:79:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/archpkgs2solv.c:81:12: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:81:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:83:22: acquire_memory: allocated here
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:83:15: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:97:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:11: branch_true: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:105:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:108:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/archpkgs2solv.c:113:10: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:116:15: branch_false: following ‘false’ branch (when ‘i >= npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:122:3: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:125:15: branch_false: following ‘false’ branch (when ‘c >= npkgs’)...
libsolv-0.7.35/tools/archpkgs2solv.c:127:3: branch_false: ...to here
libsolv-0.7.35/tools/archpkgs2solv.c:127:3: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/tools/archpkgs2solv.c:127:3: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/6)
#  125|     for (c = 0; c < npkgs; c++)
#  126|       solv_free((char *)pkgs[c]);
#  127|->   solv_free(pkgs);
#  128|     exit(res);
#  129|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def302]
libsolv-0.7.35/tools/deb2solv.c:114:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/deb2solv.c:63:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/deb2solv.c:65:7: branch_true: ...to here
libsolv-0.7.35/tools/deb2solv.c:80:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/deb2solv.c:82:12: branch_true: ...to here
libsolv-0.7.35/tools/deb2solv.c:82:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/deb2solv.c:84:22: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:84:22: acquire_resource: opened here
libsolv-0.7.35/tools/deb2solv.c:84:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/deb2solv.c:84:15: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:98:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/deb2solv.c:106:11: branch_true: ...to here
libsolv-0.7.35/tools/deb2solv.c:106:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/deb2solv.c:106:10: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:109:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/deb2solv.c:114:10: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:114:10: throw: if ‘repo_create’ throws an exception...
libsolv-0.7.35/tools/deb2solv.c:114:10: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  112|         debs[ndebs++] = strdup(argv[optind++]);
#  113|       }
#  114|->   repo = repo_create(pool, "deb2solv");
#  115|     repo_add_repodata(repo, 0);
#  116|     res = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
libsolv-0.7.35/tools/deb2solv.c:114:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/deb2solv.c:63:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/deb2solv.c:65:7: branch_true: ...to here
libsolv-0.7.35/tools/deb2solv.c:80:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/deb2solv.c:82:12: branch_true: ...to here
libsolv-0.7.35/tools/deb2solv.c:82:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/deb2solv.c:84:22: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:84:22: acquire_memory: allocated here
libsolv-0.7.35/tools/deb2solv.c:84:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/deb2solv.c:84:15: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:98:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/deb2solv.c:106:11: branch_true: ...to here
libsolv-0.7.35/tools/deb2solv.c:106:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/deb2solv.c:106:10: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:109:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/deb2solv.c:114:10: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:114:10: throw: if ‘repo_create’ throws an exception...
libsolv-0.7.35/tools/deb2solv.c:114:10: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  112|         debs[ndebs++] = strdup(argv[optind++]);
#  113|       }
#  114|->   repo = repo_create(pool, "deb2solv");
#  115|     repo_add_repodata(repo, 0);
#  116|     res = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def304]
libsolv-0.7.35/tools/deb2solv.c:115:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/deb2solv.c:63:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/deb2solv.c:65:7: branch_true: ...to here
libsolv-0.7.35/tools/deb2solv.c:80:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/deb2solv.c:82:12: branch_true: ...to here
libsolv-0.7.35/tools/deb2solv.c:82:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/deb2solv.c:84:22: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:84:22: acquire_resource: opened here
libsolv-0.7.35/tools/deb2solv.c:84:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/deb2solv.c:84:15: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:98:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/deb2solv.c:106:11: branch_true: ...to here
libsolv-0.7.35/tools/deb2solv.c:106:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/deb2solv.c:106:10: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:109:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/deb2solv.c:114:10: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:115:3: throw: if ‘repo_add_repodata’ throws an exception...
libsolv-0.7.35/tools/deb2solv.c:115:3: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  113|       }
#  114|     repo = repo_create(pool, "deb2solv");
#  115|->   repo_add_repodata(repo, 0);
#  116|     res = 0;
#  117|     if (!ndebs && !manifest && is_repo)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def305]
libsolv-0.7.35/tools/deb2solv.c:115:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/deb2solv.c:63:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/deb2solv.c:65:7: branch_true: ...to here
libsolv-0.7.35/tools/deb2solv.c:80:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/deb2solv.c:82:12: branch_true: ...to here
libsolv-0.7.35/tools/deb2solv.c:82:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/deb2solv.c:84:22: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:84:22: acquire_memory: allocated here
libsolv-0.7.35/tools/deb2solv.c:84:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/deb2solv.c:84:15: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:98:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/deb2solv.c:106:11: branch_true: ...to here
libsolv-0.7.35/tools/deb2solv.c:106:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/deb2solv.c:106:10: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:109:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/deb2solv.c:114:10: branch_false: ...to here
libsolv-0.7.35/tools/deb2solv.c:115:3: throw: if ‘repo_add_repodata’ throws an exception...
libsolv-0.7.35/tools/deb2solv.c:115:3: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  113|       }
#  114|     repo = repo_create(pool, "deb2solv");
#  115|->   repo_add_repodata(repo, 0);
#  116|     res = 0;
#  117|     if (!ndebs && !manifest && is_repo)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def306]
libsolv-0.7.35/tools/mergesolv.c:54:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(repodata_lookup_str(data, -1, 33), "r")’
libsolv-0.7.35/tools/mergesolv.c:45:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/mergesolv.c:47:3: branch_false: ...to here
libsolv-0.7.35/tools/mergesolv.c:48:8: acquire_resource: opened here
libsolv-0.7.35/tools/mergesolv.c:49:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/mergesolv.c:54:7: branch_false: ...to here
libsolv-0.7.35/tools/mergesolv.c:54:7: throw: if ‘repo_add_solv’ throws an exception...
libsolv-0.7.35/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): [#def307]
libsolv-0.7.35/tools/mergesolv.c:54:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(repodata_lookup_str(data, -1, 33), "r")’
libsolv-0.7.35/tools/mergesolv.c:45:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/mergesolv.c:47:3: branch_false: ...to here
libsolv-0.7.35/tools/mergesolv.c:48:8: acquire_memory: allocated here
libsolv-0.7.35/tools/mergesolv.c:49:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/mergesolv.c:54:7: branch_false: ...to here
libsolv-0.7.35/tools/mergesolv.c:54:7: throw: if ‘repo_add_solv’ throws an exception...
libsolv-0.7.35/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): [#def308]
libsolv-0.7.35/tools/mergesolv.c:104:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "r")’
libsolv-0.7.35/tools/mergesolv.c:96:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/mergesolv.c:99:27: branch_true: ...to here
libsolv-0.7.35/tools/mergesolv.c:99:17: acquire_resource: opened here
libsolv-0.7.35/tools/mergesolv.c:99:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/mergesolv.c:104:11: branch_false: ...to here
libsolv-0.7.35/tools/mergesolv.c:104:11: throw: if ‘repo_add_solv’ throws an exception...
libsolv-0.7.35/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): [#def309]
libsolv-0.7.35/tools/mergesolv.c:104:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "r")’
libsolv-0.7.35/tools/mergesolv.c:96:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/mergesolv.c:99:27: branch_true: ...to here
libsolv-0.7.35/tools/mergesolv.c:99:17: acquire_memory: allocated here
libsolv-0.7.35/tools/mergesolv.c:99:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/mergesolv.c:104:11: branch_false: ...to here
libsolv-0.7.35/tools/mergesolv.c:104:11: throw: if ‘repo_add_solv’ throws an exception...
libsolv-0.7.35/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): [#def310]
libsolv-0.7.35/tools/repo2solv.c:356:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(solv_dupjoin(dir, "/content", 0), "r")’
libsolv-0.7.35/tools/repo2solv.c:354:13: acquire_resource: opened here
libsolv-0.7.35/tools/repo2solv.c:354:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/repo2solv.c:356:11: branch_true: ...to here
libsolv-0.7.35/tools/repo2solv.c:356:11: throw: if ‘repo_add_content’ throws an exception...
libsolv-0.7.35/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): [#def311]
libsolv-0.7.35/tools/repo2solv.c:356:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(solv_dupjoin(dir, "/content", 0), "r")’
libsolv-0.7.35/tools/repo2solv.c:354:13: acquire_memory: allocated here
libsolv-0.7.35/tools/repo2solv.c:354:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/repo2solv.c:356:11: branch_true: ...to here
libsolv-0.7.35/tools/repo2solv.c:356:11: throw: if ‘repo_add_content’ throws an exception...
libsolv-0.7.35/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): [#def312]
libsolv-0.7.35/tools/repo2solv.c:376:16: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(solv_dupjoin(dir, "/",  descrdir))’
libsolv-0.7.35/tools/repo2solv.c:371:13: acquire_memory: allocated here
libsolv-0.7.35/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:371:6: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:376:16: throw: if ‘readdir’ throws an exception...
libsolv-0.7.35/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): [#def313]
libsolv-0.7.35/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.35/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.35/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:371:6: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.35/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.35/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.35/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.35/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.35/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:422:13: acquire_resource: opened here
libsolv-0.7.35/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.35/tools/repo2solv.c:426:7: throw: if ‘repo_add_repodata’ throws an exception...
libsolv-0.7.35/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): [#def314]
libsolv-0.7.35/tools/repo2solv.c:426:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.35/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.35/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:371:6: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.35/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.35/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.35/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.35/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.35/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:422:13: acquire_memory: allocated here
libsolv-0.7.35/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.35/tools/repo2solv.c:426:7: throw: if ‘repo_add_repodata’ throws an exception...
libsolv-0.7.35/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): [#def315]
libsolv-0.7.35/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.35/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.35/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:371:6: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.35/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.35/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.35/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.35/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.35/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:422:13: acquire_resource: opened here
libsolv-0.7.35/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.35/tools/repo2solv.c:427:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/repo2solv.c:431:15: branch_true: ...to here
libsolv-0.7.35/tools/repo2solv.c:431:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:433:20: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:433:14: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/repo2solv.c:435:15: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:435:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:437:11: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:437:11: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/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): [#def316]
libsolv-0.7.35/tools/repo2solv.c:435:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(solv_dupjoin(solv_dupjoin(dir, "/",  descrdir), "/patterns", 0), "r")’
libsolv-0.7.35/tools/repo2solv.c:337:1: enter_function: entry to ‘read_susetags_repo’
libsolv-0.7.35/tools/repo2solv.c:371:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:371:6: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:384:6: branch_false: following ‘false’ branch (when ‘nfiles <= 1’)...
libsolv-0.7.35/tools/repo2solv.c:388:14: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:388:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.35/tools/repo2solv.c:388:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.35/tools/repo2solv.c:389:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:408:14: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:408:14: call_function: calling ‘susetags_find’ from ‘read_susetags_repo’
libsolv-0.7.35/tools/repo2solv.c:408:14: return_function: returning to ‘read_susetags_repo’ from ‘susetags_find’
libsolv-0.7.35/tools/repo2solv.c:409:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:421:9: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:422:13: acquire_memory: allocated here
libsolv-0.7.35/tools/repo2solv.c:422:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/repo2solv.c:426:7: branch_true: ...to here
libsolv-0.7.35/tools/repo2solv.c:427:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/repo2solv.c:431:15: branch_true: ...to here
libsolv-0.7.35/tools/repo2solv.c:431:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:433:20: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:433:14: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/repo2solv.c:435:15: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:435:14: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/repo2solv.c:437:11: branch_false: ...to here
libsolv-0.7.35/tools/repo2solv.c:437:11: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/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): [#def317]
libsolv-0.7.35/tools/rpmdb2solv.c:171:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘reffp’
libsolv-0.7.35/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: acquire_resource: opened here
libsolv-0.7.35/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:171:5: throw: if ‘pool_set_rootdir’ throws an exception...
libsolv-0.7.35/tools/rpmdb2solv.c:171:5: danger: ‘reffp’ leaks here; was opened at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  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): [#def318]
libsolv-0.7.35/tools/rpmdb2solv.c:171:5: warning[-Wanalyzer-malloc-leak]: leak of ‘reffp’
libsolv-0.7.35/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: acquire_memory: allocated here
libsolv-0.7.35/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:171:5: throw: if ‘pool_set_rootdir’ throws an exception...
libsolv-0.7.35/tools/rpmdb2solv.c:171:5: danger: ‘reffp’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  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): [#def319]
libsolv-0.7.35/tools/rpmdb2solv.c:179:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘reffp’
libsolv-0.7.35/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: acquire_resource: opened here
libsolv-0.7.35/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:179:21: throw: if ‘solv_dupjoin’ throws an exception...
libsolv-0.7.35/tools/rpmdb2solv.c:179:21: danger: ‘reffp’ leaks here; was opened at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  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): [#def320]
libsolv-0.7.35/tools/rpmdb2solv.c:179:21: warning[-Wanalyzer-malloc-leak]: leak of ‘reffp’
libsolv-0.7.35/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: acquire_memory: allocated here
libsolv-0.7.35/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:179:21: throw: if ‘solv_dupjoin’ throws an exception...
libsolv-0.7.35/tools/rpmdb2solv.c:179:21: danger: ‘reffp’ leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  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): [#def321]
libsolv-0.7.35/tools/rpmdb2solv.c:180:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘reffp’
libsolv-0.7.35/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: acquire_resource: opened here
libsolv-0.7.35/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:180:7: throw: if ‘rpmDefineMacro’ throws an exception...
libsolv-0.7.35/tools/rpmdb2solv.c:180:7: danger: ‘reffp’ leaks here; was opened at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
#  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): [#def322]
libsolv-0.7.35/tools/rpmdb2solv.c:180:7: warning[-Wanalyzer-malloc-leak]: leak of ‘reffp’
libsolv-0.7.35/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: acquire_memory: allocated here
libsolv-0.7.35/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:180:7: throw: if ‘rpmDefineMacro’ throws an exception...
libsolv-0.7.35/tools/rpmdb2solv.c:180:7: danger: ‘reffp’ leaks here; was allocated at [(9)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/8)
#  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): [#def323]
libsolv-0.7.35/tools/rpmdb2solv.c:188:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘reffp’
libsolv-0.7.35/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: acquire_resource: opened here
libsolv-0.7.35/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_false: following ‘false’ branch (when ‘dbpath’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:188:10: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:188:10: throw: if ‘repo_create’ throws an exception...
libsolv-0.7.35/tools/rpmdb2solv.c:188:10: danger: ‘reffp’ leaks here; was opened at [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
#  186|       }
#  187|   
#  188|->   repo = repo_create(pool, "installed");
#  189|     data = repo_add_repodata(repo, 0);
#  190|   

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-775): [#def327]
libsolv-0.7.35/tools/rpmdb2solv.c:198:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘reffp’
libsolv-0.7.35/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: acquire_resource: opened here
libsolv-0.7.35/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_false: following ‘false’ branch (when ‘dbpath’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:188:10: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:191:6: branch_true: following ‘true’ branch (when ‘nopacks == 0’)...
libsolv-0.7.35/tools/rpmdb2solv.c:194:10: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:198:11: throw: if ‘repo_add_rpmdb_reffp’ throws an exception...
libsolv-0.7.35/tools/rpmdb2solv.c:198:11: danger: ‘reffp’ leaks here; was opened at [(9)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/8)
#  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): [#def328]
libsolv-0.7.35/tools/rpmdb2solv.c:198:11: warning[-Wanalyzer-malloc-leak]: leak of ‘reffp’
libsolv-0.7.35/tools/rpmdb2solv.c:92:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpmdb2solv.c:93:5: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:143:6: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:154:7: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:154:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:155:19: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:157:6: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:159:20: acquire_memory: allocated here
libsolv-0.7.35/tools/rpmdb2solv.c:159:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:170:6: branch_false: following ‘false’ branch (when ‘root’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:175:6: branch_false: following ‘false’ branch (when ‘dbpath’ is NULL)...
libsolv-0.7.35/tools/rpmdb2solv.c:188:10: branch_false: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:191:6: branch_true: following ‘true’ branch (when ‘nopacks == 0’)...
libsolv-0.7.35/tools/rpmdb2solv.c:194:10: branch_true: ...to here
libsolv-0.7.35/tools/rpmdb2solv.c:198:11: throw: if ‘repo_add_rpmdb_reffp’ throws an exception...
libsolv-0.7.35/tools/rpmdb2solv.c:198:11: danger: ‘reffp’ leaks here; was allocated at [(9)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/8)
#  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): [#def329]
libsolv-0.7.35/tools/rpms2solv.c:142:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_resource: opened here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:142:10: throw: if ‘repo_create’ throws an exception...
libsolv-0.7.35/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): [#def330]
libsolv-0.7.35/tools/rpms2solv.c:142:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_memory: allocated here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:142:10: throw: if ‘repo_create’ throws an exception...
libsolv-0.7.35/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): [#def331]
libsolv-0.7.35/tools/rpms2solv.c:143:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_resource: opened here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:143:3: throw: if ‘repo_add_repodata’ throws an exception...
libsolv-0.7.35/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): [#def332]
libsolv-0.7.35/tools/rpms2solv.c:143:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_memory: allocated here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:143:3: throw: if ‘repo_add_repodata’ throws an exception...
libsolv-0.7.35/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): [#def333]
libsolv-0.7.35/tools/rpms2solv.c:175:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:57:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_resource: opened here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:128:24: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:128:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/rpms2solv.c:131:18: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:131:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/rpms2solv.c:119:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/rpms2solv.c:126:20: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:145:15: branch_true: following ‘true’ branch (when ‘i < nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:175:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:175:11: throw: if ‘repo_add_rpm’ throws an exception...
libsolv-0.7.35/tools/rpms2solv.c:175:11: danger: ‘fp’ leaks here; was opened at [(8)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/7)
#  173|           }
#  174|   #endif
#  175|->       if (repo_add_rpm(repo, rpms[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) == 0)
#  176|   	{
#  177|   	  fprintf(stderr, "rpms2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def334]
libsolv-0.7.35/tools/rpms2solv.c:175:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:57:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_memory: allocated here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:128:24: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:128:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/rpms2solv.c:131:18: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:131:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/rpms2solv.c:119:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/rpms2solv.c:126:20: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:145:15: branch_true: following ‘true’ branch (when ‘i < nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:175:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:175:11: throw: if ‘repo_add_rpm’ throws an exception...
libsolv-0.7.35/tools/rpms2solv.c:175:11: danger: ‘fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/7)
#  173|           }
#  174|   #endif
#  175|->       if (repo_add_rpm(repo, rpms[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) == 0)
#  176|   	{
#  177|   	  fprintf(stderr, "rpms2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def335]
libsolv-0.7.35/tools/rpms2solv.c:177:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:57:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_resource: opened here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:128:24: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:128:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/rpms2solv.c:131:18: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:131:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/rpms2solv.c:119:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/rpms2solv.c:126:20: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:145:15: branch_true: following ‘true’ branch (when ‘i < nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:175:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:175:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:177:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:177:11: throw: if ‘pool_errstr’ throws an exception...
libsolv-0.7.35/tools/rpms2solv.c:177:11: danger: ‘fp’ leaks here; was opened at [(8)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/7)
#  175|         if (repo_add_rpm(repo, rpms[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) == 0)
#  176|   	{
#  177|-> 	  fprintf(stderr, "rpms2solv: %s\n", pool_errstr(pool));
#  178|   	  res = 1;
#  179|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def336]
libsolv-0.7.35/tools/rpms2solv.c:177:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:57:1: enter_function: entry to ‘main’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_memory: allocated here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:128:24: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:128:18: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
libsolv-0.7.35/tools/rpms2solv.c:131:18: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:131:18: call_function: inlined call to ‘solv_extend’ from ‘main’
libsolv-0.7.35/tools/rpms2solv.c:119:14: branch_false: following ‘false’ branch (when ‘manifest0 == 0’)...
libsolv-0.7.35/tools/rpms2solv.c:126:20: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:145:15: branch_true: following ‘true’ branch (when ‘i < nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:175:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:175:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:177:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:177:11: throw: if ‘pool_errstr’ throws an exception...
libsolv-0.7.35/tools/rpms2solv.c:177:11: danger: ‘fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/7)
#  175|         if (repo_add_rpm(repo, rpms[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) == 0)
#  176|   	{
#  177|-> 	  fprintf(stderr, "rpms2solv: %s\n", pool_errstr(pool));
#  178|   	  res = 1;
#  179|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def337]
libsolv-0.7.35/tools/rpms2solv.c:181:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_resource: opened here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:145:15: branch_false: following ‘false’ branch (when ‘i >= nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:181:3: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:181:3: throw: if ‘repo_internalize’ throws an exception...
libsolv-0.7.35/tools/rpms2solv.c:181:3: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  179|   	}
#  180|       }
#  181|->   repo_internalize(repo);
#  182|   #ifdef SUSE
#  183|     if (add_auto)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def338]
libsolv-0.7.35/tools/rpms2solv.c:181:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_memory: allocated here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:145:15: branch_false: following ‘false’ branch (when ‘i >= nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:181:3: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:181:3: throw: if ‘repo_internalize’ throws an exception...
libsolv-0.7.35/tools/rpms2solv.c:181:3: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  179|   	}
#  180|       }
#  181|->   repo_internalize(repo);
#  182|   #ifdef SUSE
#  183|     if (add_auto)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def339]
libsolv-0.7.35/tools/rpms2solv.c:186:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_resource: opened here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:145:15: branch_false: following ‘false’ branch (when ‘i >= nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:181:3: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:186:3: throw: if ‘tool_write’ throws an exception...
libsolv-0.7.35/tools/rpms2solv.c:186:3: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
#  184|       repo_add_autopattern(repo, 0);
#  185|   #endif
#  186|->   tool_write(repo, stdout);
#  187|     pool_free(pool);
#  188|     for (c = 0; c < nrpms; c++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def340]
libsolv-0.7.35/tools/rpms2solv.c:186:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_memory: allocated here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:145:15: branch_false: following ‘false’ branch (when ‘i >= nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:181:3: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:186:3: throw: if ‘tool_write’ throws an exception...
libsolv-0.7.35/tools/rpms2solv.c:186:3: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
#  184|       repo_add_autopattern(repo, 0);
#  185|   #endif
#  186|->   tool_write(repo, stdout);
#  187|     pool_free(pool);
#  188|     for (c = 0; c < nrpms; c++)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def341]
libsolv-0.7.35/tools/rpms2solv.c:187:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_resource: opened here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:145:15: branch_false: following ‘false’ branch (when ‘i >= nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:181:3: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:187:3: throw: if ‘pool_free’ throws an exception...
libsolv-0.7.35/tools/rpms2solv.c:187:3: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/6)
#  185|   #endif
#  186|     tool_write(repo, stdout);
#  187|->   pool_free(pool);
#  188|     for (c = 0; c < nrpms; c++)
#  189|       free((char *)rpms[c]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
libsolv-0.7.35/tools/rpms2solv.c:187:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_memory: allocated here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:145:15: branch_false: following ‘false’ branch (when ‘i >= nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:181:3: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:187:3: throw: if ‘pool_free’ throws an exception...
libsolv-0.7.35/tools/rpms2solv.c:187:3: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
#  185|   #endif
#  186|     tool_write(repo, stdout);
#  187|->   pool_free(pool);
#  188|     for (c = 0; c < nrpms; c++)
#  189|       free((char *)rpms[c]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def343]
libsolv-0.7.35/tools/rpms2solv.c:190:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_resource: opened here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:145:15: branch_false: following ‘false’ branch (when ‘i >= nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:181:3: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:188:15: branch_false: following ‘false’ branch (when ‘c >= nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:190:3: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:190:3: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/tools/rpms2solv.c:190:3: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6)
#  188|     for (c = 0; c < nrpms; c++)
#  189|       free((char *)rpms[c]);
#  190|->   solv_free(rpms);
#  191|     exit(res);
#  192|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def344]
libsolv-0.7.35/tools/rpms2solv.c:190:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libsolv-0.7.35/tools/rpms2solv.c:75:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/rpms2solv.c:77:7: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:108:6: branch_true: following ‘true’ branch (when ‘manifest’ is non-NULL)...
libsolv-0.7.35/tools/rpms2solv.c:110:12: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:110:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libsolv-0.7.35/tools/rpms2solv.c:112:22: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:112:22: acquire_memory: allocated here
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:112:15: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:126:18: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:11: branch_true: ...to here
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:134:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:137:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/rpms2solv.c:142:10: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:145:15: branch_false: following ‘false’ branch (when ‘i >= nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:181:3: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:188:15: branch_false: following ‘false’ branch (when ‘c >= nrpms’)...
libsolv-0.7.35/tools/rpms2solv.c:190:3: branch_false: ...to here
libsolv-0.7.35/tools/rpms2solv.c:190:3: throw: if ‘solv_free’ throws an exception...
libsolv-0.7.35/tools/rpms2solv.c:190:3: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/6)
#  188|     for (c = 0; c < nrpms; c++)
#  189|       free((char *)rpms[c]);
#  190|->   solv_free(rpms);
#  191|     exit(res);
#  192|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def345]
libsolv-0.7.35/tools/susetags2solv.c:116:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(contentfile, "r")’
libsolv-0.7.35/tools/susetags2solv.c:74:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/susetags2solv.c:76:7: branch_true: ...to here
libsolv-0.7.35/tools/susetags2solv.c:74:10: branch_false: following ‘false’ branch (when ‘c < 0’)...
libsolv-0.7.35/tools/susetags2solv.c:103:10: branch_false: ...to here
libsolv-0.7.35/tools/susetags2solv.c:108:6: branch_true: following ‘true’ branch (when ‘contentfile’ is non-NULL)...
libsolv-0.7.35/tools/susetags2solv.c:110:18: branch_true: ...to here
libsolv-0.7.35/tools/susetags2solv.c:110:18: acquire_resource: opened here
libsolv-0.7.35/tools/susetags2solv.c:111:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/susetags2solv.c:116:11: branch_false: ...to here
libsolv-0.7.35/tools/susetags2solv.c:116:11: throw: if ‘repo_add_content’ throws an exception...
libsolv-0.7.35/tools/susetags2solv.c:116:11: danger: ‘fopen(contentfile, "r")’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  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): [#def346]
libsolv-0.7.35/tools/susetags2solv.c:116:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(contentfile, "r")’
libsolv-0.7.35/tools/susetags2solv.c:74:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/susetags2solv.c:76:7: branch_true: ...to here
libsolv-0.7.35/tools/susetags2solv.c:74:10: branch_false: following ‘false’ branch (when ‘c < 0’)...
libsolv-0.7.35/tools/susetags2solv.c:103:10: branch_false: ...to here
libsolv-0.7.35/tools/susetags2solv.c:108:6: branch_true: following ‘true’ branch (when ‘contentfile’ is non-NULL)...
libsolv-0.7.35/tools/susetags2solv.c:110:18: branch_true: ...to here
libsolv-0.7.35/tools/susetags2solv.c:110:18: acquire_memory: allocated here
libsolv-0.7.35/tools/susetags2solv.c:111:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/susetags2solv.c:116:11: branch_false: ...to here
libsolv-0.7.35/tools/susetags2solv.c:116:11: throw: if ‘repo_add_content’ throws an exception...
libsolv-0.7.35/tools/susetags2solv.c:116:11: danger: ‘fopen(contentfile, "r")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  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): [#def347]
libsolv-0.7.35/tools/susetags2solv.c:275:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(mergefile, "r")’
libsolv-0.7.35/tools/susetags2solv.c:74:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/susetags2solv.c:76:7: branch_true: ...to here
libsolv-0.7.35/tools/susetags2solv.c:108:6: branch_false: following ‘false’ branch (when ‘contentfile’ is NULL)...
libsolv-0.7.35/tools/susetags2solv.c:129:6: branch_false: ...to here
libsolv-0.7.35/tools/susetags2solv.c:129:6: branch_false: following ‘false’ branch (when ‘descrdir’ is NULL)...
libsolv-0.7.35/tools/susetags2solv.c:260:11: branch_false: ...to here
libsolv-0.7.35/tools/susetags2solv.c:260:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/susetags2solv.c:266:3: branch_false: ...to here
libsolv-0.7.35/tools/susetags2solv.c:267:6: branch_true: following ‘true’ branch (when ‘mergefile’ is non-NULL)...
libsolv-0.7.35/tools/susetags2solv.c:269:18: branch_true: ...to here
libsolv-0.7.35/tools/susetags2solv.c:269:18: acquire_resource: opened here
libsolv-0.7.35/tools/susetags2solv.c:270:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/susetags2solv.c:275:11: branch_false: ...to here
libsolv-0.7.35/tools/susetags2solv.c:275:11: throw: if ‘repo_add_solv’ throws an exception...
libsolv-0.7.35/tools/susetags2solv.c:275:11: danger: ‘fopen(mergefile, "r")’ leaks here; was opened at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  273|   	  exit(1);
#  274|   	}
#  275|->       if (repo_add_solv(repo, fp, 0))
#  276|   	{
#  277|   	  fprintf(stderr, "susetags2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def348]
libsolv-0.7.35/tools/susetags2solv.c:275:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(mergefile, "r")’
libsolv-0.7.35/tools/susetags2solv.c:74:10: branch_true: following ‘true’ branch (when ‘c >= 0’)...
libsolv-0.7.35/tools/susetags2solv.c:76:7: branch_true: ...to here
libsolv-0.7.35/tools/susetags2solv.c:108:6: branch_false: following ‘false’ branch (when ‘contentfile’ is NULL)...
libsolv-0.7.35/tools/susetags2solv.c:129:6: branch_false: ...to here
libsolv-0.7.35/tools/susetags2solv.c:129:6: branch_false: following ‘false’ branch (when ‘descrdir’ is NULL)...
libsolv-0.7.35/tools/susetags2solv.c:260:11: branch_false: ...to here
libsolv-0.7.35/tools/susetags2solv.c:260:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/susetags2solv.c:266:3: branch_false: ...to here
libsolv-0.7.35/tools/susetags2solv.c:267:6: branch_true: following ‘true’ branch (when ‘mergefile’ is non-NULL)...
libsolv-0.7.35/tools/susetags2solv.c:269:18: branch_true: ...to here
libsolv-0.7.35/tools/susetags2solv.c:269:18: acquire_memory: allocated here
libsolv-0.7.35/tools/susetags2solv.c:270:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/susetags2solv.c:275:11: branch_false: ...to here
libsolv-0.7.35/tools/susetags2solv.c:275:11: throw: if ‘repo_add_solv’ throws an exception...
libsolv-0.7.35/tools/susetags2solv.c:275:11: danger: ‘fopen(mergefile, "r")’ leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#  273|   	  exit(1);
#  274|   	}
#  275|->       if (repo_add_solv(repo, fp, 0))
#  276|   	{
#  277|   	  fprintf(stderr, "susetags2solv: %s\n", pool_errstr(pool));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def349]
libsolv-0.7.35/tools/testsolv.c:284:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "r")’
libsolv-0.7.35/tools/testsolv.c:267:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/testsolv.c:267:6: branch_false: ...to here
libsolv-0.7.35/tools/testsolv.c:269:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/testsolv.c:271:14: branch_true: ...to here
libsolv-0.7.35/tools/testsolv.c:276:12: acquire_resource: opened here
libsolv-0.7.35/tools/testsolv.c:277:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/testsolv.c:277:10: branch_false: ...to here
libsolv-0.7.35/tools/testsolv.c:282:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/testsolv.c:284:11: branch_true: ...to here
libsolv-0.7.35/tools/testsolv.c:284:11: throw: if ‘queue_init’ throws an exception...
libsolv-0.7.35/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): [#def350]
libsolv-0.7.35/tools/testsolv.c:284:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "r")’
libsolv-0.7.35/tools/testsolv.c:267:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/testsolv.c:267:6: branch_false: ...to here
libsolv-0.7.35/tools/testsolv.c:269:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/testsolv.c:271:14: branch_true: ...to here
libsolv-0.7.35/tools/testsolv.c:276:12: acquire_memory: allocated here
libsolv-0.7.35/tools/testsolv.c:277:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/testsolv.c:277:10: branch_false: ...to here
libsolv-0.7.35/tools/testsolv.c:282:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/testsolv.c:284:11: branch_true: ...to here
libsolv-0.7.35/tools/testsolv.c:284:11: throw: if ‘queue_init’ throws an exception...
libsolv-0.7.35/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): [#def351]
libsolv-0.7.35/tools/testsolv.c:287:46: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "r")’
libsolv-0.7.35/tools/testsolv.c:267:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/testsolv.c:267:6: branch_false: ...to here
libsolv-0.7.35/tools/testsolv.c:269:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/testsolv.c:271:14: branch_true: ...to here
libsolv-0.7.35/tools/testsolv.c:276:12: acquire_resource: opened here
libsolv-0.7.35/tools/testsolv.c:277:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/testsolv.c:277:10: branch_false: ...to here
libsolv-0.7.35/tools/testsolv.c:282:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/testsolv.c:284:11: branch_true: ...to here
libsolv-0.7.35/tools/testsolv.c:287:18: throw: if ‘testcase_read’ throws an exception...
libsolv-0.7.35/tools/testsolv.c:287:46: 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): [#def352]
libsolv-0.7.35/tools/testsolv.c:287:46: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "r")’
libsolv-0.7.35/tools/testsolv.c:267:6: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/testsolv.c:267:6: branch_false: ...to here
libsolv-0.7.35/tools/testsolv.c:269:10: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/testsolv.c:271:14: branch_true: ...to here
libsolv-0.7.35/tools/testsolv.c:276:12: acquire_memory: allocated here
libsolv-0.7.35/tools/testsolv.c:277:10: branch_false: following ‘false’ branch...
libsolv-0.7.35/tools/testsolv.c:277:10: branch_false: ...to here
libsolv-0.7.35/tools/testsolv.c:282:14: branch_true: following ‘true’ branch...
libsolv-0.7.35/tools/testsolv.c:284:11: branch_true: ...to here
libsolv-0.7.35/tools/testsolv.c:287:18: throw: if ‘testcase_read’ throws an exception...
libsolv-0.7.35/tools/testsolv.c:287:46: 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): [#def353]
libsolv-0.7.35/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): [#def354]
libsolv-0.7.35/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.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-38.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibsolv-0.7.35-3.fc44
store-results-to/tmp/tmptbwn0dht/libsolv-0.7.35-3.fc44.tar.xz
time-created2026-01-08 19:11:58
time-finished2026-01-08 19:14:32
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmptbwn0dht/libsolv-0.7.35-3.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmptbwn0dht/libsolv-0.7.35-3.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9