389-ds-base-3.1.3-10.fc44

List of Findings

Error: SHELLCHECK_WARNING (CWE-563): [#def1]
/usr/lib64/dirsrv/bin/jemalloc-config:27:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally).
#   25|   }
#   26|   
#   27|-> prefix="/usr"
#   28|   exec_prefix="/usr"
#   29|   

Error: SHELLCHECK_WARNING (CWE-563): [#def2]
/usr/lib64/dirsrv/bin/jemalloc-config:28:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally).
#   26|   
#   27|   prefix="/usr"
#   28|-> exec_prefix="/usr"
#   29|   
#   30|   case "$1" in

Error: SHELLCHECK_WARNING (CWE-563): [#def3]
/usr/lib64/dirsrv/bin/jemalloc.sh:3:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally).
#    1|   #!/usr/bin/sh
#    2|   
#    3|-> prefix=/usr
#    4|   exec_prefix=/usr
#    5|   libdir=/usr/lib64/dirsrv/lib

Error: SHELLCHECK_WARNING (CWE-563): [#def4]
/usr/lib64/dirsrv/bin/jemalloc.sh:4:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally).
#    2|   
#    3|   prefix=/usr
#    4|-> exec_prefix=/usr
#    5|   libdir=/usr/lib64/dirsrv/lib
#    6|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:123:5: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(fname, "r")'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:149:1: enter_function: entry to 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:157:10: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:158:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:24: call_function: calling 'fp_getline' from 'collation_read_config'
#  121|   
#  122|       lcur = 0;
#  123|->     CATLINE(buf);
#  124|       (*lineno)++;
#  125|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:123:5: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(fname, "r")'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:149:1: enter_function: entry to 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:157:10: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:158:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:24: call_function: calling 'fp_getline' from 'collation_read_config'
#  121|   
#  122|       lcur = 0;
#  123|->     CATLINE(buf);
#  124|       (*lineno)++;
#  125|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:140:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(fname, "r")'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:149:1: enter_function: entry to 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:157:10: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:158:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:24: call_function: calling 'fp_getline' from 'collation_read_config'
#  138|           }
#  139|   
#  140|->         CATLINE(buf);
#  141|           (*lineno)++;
#  142|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:140:9: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(fname, "r")'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:149:1: enter_function: entry to 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:157:10: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:158:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:24: call_function: calling 'fp_getline' from 'collation_read_config'
#  138|           }
#  139|   
#  140|->         CATLINE(buf);
#  141|           (*lineno)++;
#  142|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(fname, "r")'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:157:10: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:158:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: danger: 'fopen(fname, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  163|       }
#  164|   
#  165|->     slapi_log_err(SLAPI_LOG_CONFIG, "collation_read_config", "Reading config file %s\n", fname);
#  166|   
#  167|       fp_getline_init(&lineno);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(fname, "r")'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:157:10: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:158:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: danger: 'fopen(fname, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  163|       }
#  164|   
#  165|->     slapi_log_err(SLAPI_LOG_CONFIG, "collation_read_config", "Reading config file %s\n", fname);
#  166|   
#  167|       fp_getline_init(&lineno);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def11]
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:173:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(fname, "r")'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:149:1: enter_function: entry to 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:157:10: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:158:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:24: call_function: calling 'fp_getline' from 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:24: return_function: returning to 'collation_read_config' from 'fp_getline'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:170:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:173:9: danger: 'fopen(fname, "r")' leaks here; was opened at [(2)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/1)
#  171|               continue;
#  172|           }
#  173|->         slapi_log_err(SLAPI_LOG_CONFIG, COLLATE_PLUGIN_SUBSYSTEM,
#  174|                         "collation_read_config - line %d: %s\n", lineno, cfg_line);
#  175|           fp_parse_line(line, &cargc, cargv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:173:9: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(fname, "r")'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:149:1: enter_function: entry to 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:157:10: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:158:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:24: call_function: calling 'fp_getline' from 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:24: return_function: returning to 'collation_read_config' from 'fp_getline'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:170:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:173:9: danger: 'fopen(fname, "r")' leaks here; was allocated at [(2)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/1)
#  171|               continue;
#  172|           }
#  173|->         slapi_log_err(SLAPI_LOG_CONFIG, COLLATE_PLUGIN_SUBSYSTEM,
#  174|                         "collation_read_config - line %d: %s\n", lineno, cfg_line);
#  175|           fp_parse_line(line, &cargc, cargv);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:177:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(fname, "r")'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:149:1: enter_function: entry to 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:157:10: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:158:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:24: call_function: calling 'fp_getline' from 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:24: return_function: returning to 'collation_read_config' from 'fp_getline'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:170:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:175:9: call_function: calling 'fp_parse_line' from 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:175:9: return_function: returning to 'collation_read_config' from 'fp_parse_line'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:176:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:177:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:177:13: danger: 'fopen(fname, "r")' leaks here; was opened at [(2)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/1)
#  175|           fp_parse_line(line, &cargc, cargv);
#  176|           if (cargc < 1) {
#  177|->             slapi_log_err(SLAPI_LOG_ERR, COLLATE_PLUGIN_SUBSYSTEM,
#  178|                             "collation_read_config - %s: line %d: bad config line (ignored)\n",
#  179|                             fname, lineno);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:177:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(fname, "r")'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:149:1: enter_function: entry to 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:157:10: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:158:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:165:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:24: call_function: calling 'fp_getline' from 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:24: return_function: returning to 'collation_read_config' from 'fp_getline'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:168:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:170:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:175:9: call_function: calling 'fp_parse_line' from 'collation_read_config'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:175:9: return_function: returning to 'collation_read_config' from 'fp_parse_line'
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:176:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:177:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/collation/config.c:177:13: danger: 'fopen(fname, "r")' leaks here; was allocated at [(2)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/1)
#  175|           fp_parse_line(line, &cargc, cargv);
#  176|           if (cargc < 1) {
#  177|->             slapi_log_err(SLAPI_LOG_ERR, COLLATE_PLUGIN_SUBSYSTEM,
#  178|                             "collation_read_config - %s: line %d: bad config line (ignored)\n",
#  179|                             fname, lineno);

Error: CPPCHECK_WARNING (CWE-457): [#def15]
389-ds-base-3.1.3/ldap/servers/plugins/deref/deref.c:645: warning[uninitvar]: Uninitialized variable: sv
#  643|                               idx = slapi_valueset_first_value(results, &sv);
#  644|                           }
#  645|->                         for (; results && sv; idx = slapi_valueset_next_value(results, idx, &sv)) {
#  646|                               const struct berval *bv = slapi_value_get_berval(sv);
#  647|                               if (needattrvals) {

Error: CPPCHECK_WARNING (CWE-457): [#def16]
389-ds-base-3.1.3/ldap/servers/plugins/deref/deref.c:747: warning[uninitvar]: Uninitialized variable: sv
#  745|               idx = slapi_valueset_first_value(results, &sv);
#  746|           }
#  747|->         for (; results && sv; idx = slapi_valueset_next_value(results, idx, &sv)) {
#  748|               const char *derefdn = slapi_value_get_string(sv);
#  749|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def17]
389-ds-base-3.1.3/ldap/servers/plugins/replication/repl5_agmt.c:239:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'hash_in'
389-ds-base-3.1.3/ldap/servers/plugins/replication/repl5_agmt.c:740:1: enter_function: entry to 'agmt_new_from_pblock'
389-ds-base-3.1.3/ldap/servers/plugins/replication/repl5_agmt.c:745:12: call_function: calling 'agmt_new_from_entry' from 'agmt_new_from_pblock'
#  237|   
#  238|   done:
#  239|->     if (hash_in) {
#  240|           slapi_ch_free_string(&hash_in);
#  241|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def18]
389-ds-base-3.1.3/ldap/servers/plugins/replication/repl5_replica_config.c:205:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
389-ds-base-3.1.3/ldap/servers/plugins/replication/repl5_replica_config.c:166:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/plugins/replication/repl5_replica_config.c:167:30: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/replication/repl5_replica_config.c:168:14: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/plugins/replication/repl5_replica_config.c:177:18: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/replication/repl5_replica_config.c:177:17: branch_false: following 'false' branch (when the strings are equal)...
389-ds-base-3.1.3/ldap/servers/plugins/replication/repl5_replica_config.c:186:14: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/plugins/replication/repl5_replica_config.c:205:9: danger: dereference of NULL '_replica_config_get_mtnode_ext(e)'
#  203|       PR_ASSERT(mtnode_ext);
#  204|   
#  205|->     if (mtnode_ext->replica) {
#  206|           if ( errortext != NULL ) {
#  207|               PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE, MSG_ALREADYCONFIGURED, replica_root);

Error: CPPCHECK_WARNING (CWE-476): [#def19]
389-ds-base-3.1.3/ldap/servers/plugins/replication/repl5_ruv.c:1025: warning[nullPointer]: Possible null pointer dereference: bv
# 1023|                       ruvelem->csn == NULL ? "" : csn_as_string(ruvelem->csn, PR_FALSE, csnStr2));
# 1024|       } else {
# 1025|->         bv->bv_val = slapi_ch_smprintf(fmtstr,
# 1026|                                          prefix_ruvcsn, ruvelem->rid,
# 1027|                                          ruvelem->replica_purl == NULL ? "" : " ",

Error: CPPCHECK_WARNING (CWE-476): [#def20]
389-ds-base-3.1.3/ldap/servers/plugins/replication/repl5_ruv.c:1033: warning[nullPointer]: Possible null pointer dereference: bv
# 1031|                                          ruvelem->csn == NULL ? "" : " ",
# 1032|                                          ruvelem->csn == NULL ? "" : csn_as_string(ruvelem->csn, PR_FALSE, csnStr2));
# 1033|->         bv->bv_len = strlen(bv->bv_val);
# 1034|       }
# 1035|   }

Error: GCC_ANALYZER_WARNING (CWE-126): [#def21]
389-ds-base-3.1.3/ldap/servers/slapd/accesslog.c:27:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
389-ds-base-3.1.3/ldap/servers/slapd/accesslog.c:1175:1: enter_function: entry to 'slapd_log_access_sort'
389-ds-base-3.1.3/ldap/servers/slapd/accesslog.c:1181:21: call_function: calling 'build_base_obj' from 'slapd_log_access_sort'
#   25|       if (strlen(value) > MAX_ELEMENT_SIZE) {
#   26|           /* we use -4 to leave room for the NULL terminator */
#   27|->         memcpy(&val_buffer, value, MAX_ELEMENT_SIZE-4);
#   28|           memcpy(&val_buffer[MAX_ELEMENT_SIZE-4], "...", 3);
#   29|       } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:222:17: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:142:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:156:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:161:5: branch_true: following 'true' branch (when 'mode == 2')...
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:194:5: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:196:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:204:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:206:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:214:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:214:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:216:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:216:19: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:217:16: branch_false: following 'false' branch (when 'buf' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:222:17: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:222:17: danger: 'buf' leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  220|                   goto bail;
#  221|               }
#  222|->             if (write(fd, buf, sz) < 0) {
#  223|                   err = errno;
#  224|   #if (0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:222:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:142:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:156:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:161:5: branch_true: following ‘true’ branch (when ‘mode == 2’)...
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:194:5: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:196:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:204:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:206:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:214:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:214:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:216:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:216:19: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:217:16: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:222:17: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/agtmmap.c:222:17: danger: ‘buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  220|                   goto bail;
#  221|               }
#  222|->             if (write(fd, buf, sz) < 0) {
#  223|                   err = errno;
#  224|   #if (0)

Error: COMPILER_WARNING: [#def24]
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/cache.c:539:20: warning[-Wstringop-overflow=]: writing 1 byte into a region of size 0
#  539 |         *(char*)23 = 1;   /* abort() somehow corrupt gdb stack backtrace so lets generate a SIGSEGV */
#      |                    ^
lto1: note: destination object is likely at address zero
#  537|   #pragma GCC diagnostic ignored "-Warray-bounds="
#  538|   #pragma GCC diagnostic ignored "-Wstringop-overflow="
#  539|->         *(char*)23 = 1;   /* abort() somehow corrupt gdb stack backtrace so lets generate a SIGSEGV */
#  540|   #pragma GCC diagnostic pop
#  541|           abort();

Error: GCC_ANALYZER_WARNING (CWE-404): [#def25]
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:226:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:216:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:218:11: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:219:8: branch_false: following 'false' branch (when 'len <= 5115')...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:222:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:225:5: acquire_resource: 'va_start' called here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:226:5: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  224|   
#  225|       va_start(ap, format);
#  226|->     PR_vsnprintf(job->task_status + len, (10 * LOG_BUFFER) - len, format, ap);
#  227|       va_end(ap);
#  228|   }

Error: GCC_ANALYZER_WARNING (CWE-465): [#def26]
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1292:12: warning[-Wanalyzer-deref-before-check]: check of 'key.data' for NULL after already dereferencing it
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1192:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1197:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1198:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1214:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1218:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1218:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1229:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1229:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1237:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1238:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1245:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1245:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1292:21: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c:1292:12: danger: pointer 'key.data' is checked for NULL here but it was already dereferenced at [(13)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/12)
# 1290|               }
# 1291|           }
# 1292|->         if (NULL != key.data) {
# 1293|               slapi_ch_free(&(key.data));
# 1294|               key.data = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def27]
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_ldif2db.c:404: error[ctunullpointer]: Null pointer dereference: include
#  402|       slapi_sdn_init(&sdn);
#  403|       /* for each subtree spec... */
#  404|->     for (i = 0; include[i]; i++) {
#  405|           IDList *idl = NULL;
#  406|           const char *suffix = slapi_sdn_get_ndn(slapi_be_getsuffix(be, 0));

Error: CPPCHECK_WARNING (CWE-476): [#def28]
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_ldif2db.c:404: warning[nullPointer]: Possible null pointer dereference: include
#  402|       slapi_sdn_init(&sdn);
#  403|       /* for each subtree spec... */
#  404|->     for (i = 0; include[i]; i++) {
#  405|           IDList *idl = NULL;
#  406|           const char *suffix = slapi_sdn_get_ndn(slapi_be_getsuffix(be, 0));

Error: GCC_ANALYZER_WARNING (CWE-121): [#def29]
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:89:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:37:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:44:14: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:50:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:56:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:59:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:61:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:64:14: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:64:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:68:12: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:68:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:74:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:76:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:83:18: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:83:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:84:30: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:88:16: branch_true: following 'true' branch (when 'p' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:89:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:89:17: danger: out-of-bounds write on 'dbdir'
#   87|                                                           it must have it */
#   88|               if (p)
#   89|->                 *p = '\0';
#   90|               ainfo_get(inst->inst_be, filep + 1, &ai);
#   91|               if (p)

Error: GCC_ANALYZER_WARNING (CWE-121): [#def30]
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:92:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:37:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:44:14: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:50:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:56:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:59:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:61:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:64:14: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:64:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:68:12: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:68:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:74:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:76:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:83:18: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:83:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:84:30: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:88:16: branch_true: following 'true' branch (when 'p' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:89:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:91:16: branch_true: following 'true' branch (when 'p' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:92:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:92:17: danger: out-of-bounds write on 'dbdir'
#   90|               ainfo_get(inst->inst_be, filep + 1, &ai);
#   91|               if (p)
#   92|->                 *p = '.';
#   93|               if (ai->ai_key_cmp_fn) {
#   94|                   dbp->app_private = (void *)ai->ai_key_cmp_fn;

Error: GCC_ANALYZER_WARNING (CWE-121): [#def31]
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:150:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:158:1: enter_function: entry to 'bdb_verify'
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:178:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:184:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:185:8: branch_true: following 'true' branch...
 branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:188:36: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:189:20: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:190:16: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:191:21: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/db-bdb/bdb_verify.c:196:30: call_function: calling 'bdb_dbverify_ext' from 'bdb_verify'
#  148|           }
#  149|           rval_main |= rval;
#  150|->         *filep = '\0';
#  151|       }
#  152|       PR_CloseDir(dirhandle);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def32]
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/import.c:51:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/import.c:50:5: acquire_resource: 'va_start' called here
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/import.c:51:5: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   49|   
#   50|       va_start(ap, format);
#   51|->     PR_vsnprintf(buffer, LOG_BUFFER, format, ap);
#   52|       va_end(ap);
#   53|   

Error: GCC_ANALYZER_WARNING (CWE-835): [#def33]
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/index.c:835:12: warning[-Wanalyzer-infinite-loop]: infinite loop
389-ds-base-3.1.3/ldap/servers/slapd/back-ldbm/index.c:2033:1: enter_function: entry to 'index_addordel_values_ext_sv'
#  833|       unsigned char *endptin = ptin+data->bv_len;
#  834|   
#  835|->     while (ptin < endptin) {
#  836|           if (ptout >= endbuff) {
#  837|               /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
389-ds-base-3.1.3/ldap/servers/slapd/ch_malloc.c:50:30: warning[-Wanalyzer-malloc-leak]: leak of 'newmem'
389-ds-base-3.1.3/ldap/servers/slapd/ch_malloc.c:96:1: enter_function: entry to 'slapi_ch_malloc'
389-ds-base-3.1.3/ldap/servers/slapd/ch_malloc.c:101:8: branch_false: following 'false' branch (when 'size != 0')...
389-ds-base-3.1.3/ldap/servers/slapd/ch_malloc.c:106:27: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/ch_malloc.c:106:27: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/ch_malloc.c:106:8: branch_false: following 'false' branch (when 'newmem' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/ch_malloc.c:117:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/ch_malloc.c:117:5: call_function: calling 'create_oom_buffer' from 'slapi_ch_malloc'
#   48|       if (oom_emergency_area == NULL) {
#   49|           oom_emergency_area = malloc(OOM_PREALLOC_SIZE);
#   50|->         oom_emergency_lock = PR_NewLock();
#   51|       }
#   52|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def35]
389-ds-base-3.1.3/ldap/servers/slapd/ch_malloc.c:347:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
389-ds-base-3.1.3/ldap/servers/slapd/ch_malloc.c:342:8: branch_false: following 'false' branch (when 'fmt' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/ch_malloc.c:346:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/ch_malloc.c:346:5: acquire_resource: 'va_start' called here
389-ds-base-3.1.3/ldap/servers/slapd/ch_malloc.c:347:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  345|   
#  346|       va_start(ap, fmt);
#  347|->     p = PR_vsmprintf(fmt, ap);
#  348|       va_end(ap);
#  349|   

Error: COMPILER_WARNING (CWE-563): [#def36]
389-ds-base-3.1.3/ldap/servers/slapd/control.c:177:9: warning[-Wunused-but-set-variable]: variable 'tag' set but not used
#  177 |     int tag;
#      |         ^~~
#  175|       char *sid;
#  176|       int rc = 0;
#  177|->     int tag;
#  178|       LDAPControl *ctrl = NULL;
#  179|   

Error: COMPILER_WARNING (CWE-704): [#def37]
389-ds-base-3.1.3/ldap/servers/slapd/control.c: scope_hint: In function 'create_sessiontracking_ctrl'
389-ds-base-3.1.3/ldap/servers/slapd/control.c:181:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  181 |         sid = session_tracking_id;
#      |             ^
#  179|   
#  180|       if (session_tracking_id) {
#  181|->         sid = session_tracking_id;
#  182|       } else {
#  183|           sid = undefined_sid;

Error: COMPILER_WARNING (CWE-704): [#def38]
389-ds-base-3.1.3/ldap/servers/slapd/control.c:181:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  179|   
#  180|       if (session_tracking_id) {
#  181|->         sid = session_tracking_id;
#  182|       } else {
#  183|           sid = undefined_sid;

Error: CPPCHECK_WARNING (CWE-476): [#def39]
389-ds-base-3.1.3/ldap/servers/slapd/dn.c:310: warning[nullPointer]: Possible null pointer dereference: L
#  308|                           } /* if ( SEPARATOR( R[1] )) */
#  309|                       }     /* for */
#  310|->                     memmove(value, L, d - L + escape_skips);
#  311|                       *d++ = '"'; /* closing quote */
#  312|                   }               /* if (value_separator == dn) */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def40]
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:489:5: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:486:1: enter_function: entry to 'dse_new_with_filelist'
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:488:26: call_function: calling 'dse_new' from 'dse_new_with_filelist'
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:488:26: return_function: returning to 'dse_new_with_filelist' from 'dse_new'
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:489:5: danger: dereference of NULL 'dse_new(filename,  tmpfilename,  backfilename,  startokfilename,  configdir)'
#  487|   {
#  488|       struct dse *newdse = dse_new(filename, tmpfilename, backfilename, startokfilename, configdir);
#  489|->     newdse->dse_filelist = filelist;
#  490|       return newdse;
#  491|   }

Error: COMPILER_WARNING (CWE-563): [#def41]
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1064:11: warning[-Wunused-variable]: unused variable 'error'
# 1064 |     char *error = NULL;
#      |           ^~~~~
# 1062|       FILE *fdse = NULL;
# 1063|       char line[128];
# 1064|->     char *error = NULL;
# 1065|       const char *regexp = "";
# 1066|   

Error: COMPILER_WARNING (CWE-563): [#def42]
389-ds-base-3.1.3/ldap/servers/slapd/dse.c: scope_hint: In function 'is_readonly_set_in_dse'
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1065:17: warning[-Wunused-variable]: unused variable 'regexp'
# 1065 |     const char *regexp = "";
#      |                 ^~~~~~
# 1063|       char line[128];
# 1064|       char *error = NULL;
# 1065|->     const char *regexp = "";
# 1066|   
# 1067|       if (!dsename) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1085:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(dsename, "r")'
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1067:8: branch_false: following 'false' branch (when 'dsename' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1070:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1070:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1073:12: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1074:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1078:12: branch_true: following 'true' branch...
 branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1085:13: danger: 'fopen(dsename, "r")' leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 1083|               }
# 1084|           }
# 1085|->         if (slapi_re_exec_nt(re_config, line)) {
# 1086|               isconfigentry = true;
# 1087|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1085:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(dsename, "r")'
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1067:8: branch_false: following 'false' branch (when 'dsename' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1070:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1070:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1073:12: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1074:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1078:12: branch_true: following 'true' branch...
 branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1085:13: danger: 'fopen(dsename, "r")' leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 1083|               }
# 1084|           }
# 1085|->         if (slapi_re_exec_nt(re_config, line)) {
# 1086|               isconfigentry = true;
# 1087|           }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1088:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(dsename, "r")'
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1067:8: branch_false: following 'false' branch (when 'dsename' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1070:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1070:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1073:12: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1074:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1078:12: branch_true: following 'true' branch...
 branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1088:13: danger: 'fopen(dsename, "r")' leaks here; was opened at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 1086|               isconfigentry = true;
# 1087|           }
# 1088|->         if (slapi_re_exec_nt(re_eoe, line)) {
# 1089|               if (isconfigentry) {
# 1090|                   /* End of config entry ==> readonly flag is not set */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1088:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(dsename, "r")'
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1067:8: branch_false: following 'false' branch (when 'dsename' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1070:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1070:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1073:12: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1074:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1078:12: branch_true: following 'true' branch...
 branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1088:13: danger: 'fopen(dsename, "r")' leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
# 1086|               isconfigentry = true;
# 1087|           }
# 1088|->         if (slapi_re_exec_nt(re_eoe, line)) {
# 1089|               if (isconfigentry) {
# 1090|                   /* End of config entry ==> readonly flag is not set */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1094:30: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(dsename, "r")'
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1067:8: branch_false: following 'false' branch (when 'dsename' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1070:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1070:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1073:12: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1074:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1078:12: branch_true: following 'true' branch...
 branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1094:12: branch_true: following 'true' branch (when 'isconfigentry != 0')...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1094:30: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1094:30: danger: 'fopen(dsename, "r")' leaks here; was opened at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
# 1092|               }
# 1093|           }
# 1094|->         if (isconfigentry && slapi_re_exec_nt(re_isro, line)) {
# 1095|               /* Found readonly flag */
# 1096|               isro = true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1094:30: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(dsename, "r")'
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1067:8: branch_false: following 'false' branch (when 'dsename' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1070:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1070:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1073:12: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1074:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1078:12: branch_true: following 'true' branch...
 branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1094:12: branch_true: following 'true' branch (when 'isconfigentry != 0')...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1094:30: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1094:30: danger: 'fopen(dsename, "r")' leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
# 1092|               }
# 1093|           }
# 1094|->         if (isconfigentry && slapi_re_exec_nt(re_isro, line)) {
# 1095|               /* Found readonly flag */
# 1096|               isro = true;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1206:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(*pdse.dse_configdir, 2162688)'
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1159:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1160:37: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1160:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1166:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1167:16: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1175:23: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1200:21: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1205:20: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1206:21: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/dse.c:1206:21: danger: 'open(*pdse.dse_configdir, 2162688)' leaks here; was opened at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
# 1204|                       ;
# 1205|                   if (fp_configdir != -1) {
# 1206|->                     fsync(fp_configdir);
# 1207|                       close(fp_configdir);
# 1208|                   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:100:17: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen("/etc/resolv.conf", "r")'
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:47:1: enter_function: entry to 'find_localhost_DNS'
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:57:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:66:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:69:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:75:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:75:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:81:19: branch_true: following 'true' branch (when 'p' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:82:20: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:82:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:81:30: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:96:9: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:97:8: branch_true: following 'true' branch...
 branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:98:16: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:99:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:99:17: call_function: calling 'strncasecmp_fast' from 'find_localhost_DNS'
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:99:17: return_function: returning to 'find_localhost_DNS' from 'strncasecmp_fast'
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:100:17: danger: 'fopen("/etc/resolv.conf", "r")' leaks here; was opened at [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13)
#   98|           while (fgets(line, sizeof(line), f)) {
#   99|               if (strncasecmp(line, "domain", 6) == 0 && isspace(line[6])) {
#  100|->                 slapi_log_err(SLAPI_LOG_CONFIG, "find_localhost_DNS", "%s: %s\n", _PATH_RESCONF, line);
#  101|                   for (cp = &line[7]; *cp && isspace(*cp); ++cp)
#  102|                       ;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:100:17: warning[-Wanalyzer-malloc-leak]: leak of 'fopen("/etc/resolv.conf", "r")'
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:47:1: enter_function: entry to 'find_localhost_DNS'
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:57:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:66:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:69:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:75:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:75:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:81:19: branch_true: following 'true' branch (when 'p' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:82:20: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:82:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:81:30: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:96:9: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:97:8: branch_true: following 'true' branch...
 branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:98:16: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:99:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:99:17: call_function: calling 'strncasecmp_fast' from 'find_localhost_DNS'
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:99:17: return_function: returning to 'find_localhost_DNS' from 'strncasecmp_fast'
389-ds-base-3.1.3/ldap/servers/slapd/localhost.c:100:17: danger: 'fopen("/etc/resolv.conf", "r")' leaks here; was allocated at [(14)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/13)
#   98|           while (fgets(line, sizeof(line), f)) {
#   99|               if (strncasecmp(line, "domain", 6) == 0 && isspace(line[6])) {
#  100|->                 slapi_log_err(SLAPI_LOG_CONFIG, "find_localhost_DNS", "%s: %s\n", _PATH_RESCONF, line);
#  101|                   for (cp = &line[7]; *cp && isspace(*cp); ++cp)
#  102|                       ;

Error: CPPCHECK_WARNING (CWE-457): [#def52]
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3137: warning[uninitvar]: Uninitialized variable: output
# 3135|       }
# 3136|   
# 3137|->     return slapi_ch_strdup(output);
# 3138|   }
# 3139|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def53]
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3246:25: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3144:1: enter_function: entry to 'plugin_delete_check_dependency'
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3151:25: call_function: calling 'plugin_get_type_str' from 'plugin_delete_check_dependency'
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3151:25: return_function: returning to 'plugin_delete_check_dependency' from 'plugin_get_type_str'
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3176:12: branch_true: following 'true' branch (when 'ep' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3177:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3179:12: branch_false: following 'false' branch (when 'plugin' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3186:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3187:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3188:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3188:17: call_function: calling 'strcmpi_fast' from 'plugin_delete_check_dependency'
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3188:17: return_function: returning to 'plugin_delete_check_dependency' from 'strcmpi_fast'
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3188:16: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3194:14: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3194:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3198:15: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3200:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3207:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3176:12: branch_false: following 'false' branch (when 'ep' is NULL)...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3215:21: branch_true: following 'true' branch (when 'plugin_index > index')...
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3216:29: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3216:12: branch_true: following 'true' branch (when 'plugin' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3220:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3220:16: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3227:16: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3243:16: branch_true: following 'true' branch...
 branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3245:29: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3246:25: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/plugin.c:3246:25: danger: argument 2 ('plugin_get_type_str(*plugin_entry.plg_type)') NULL where non-null expected
# 3244|                   list = config[index].depends_type_list;
# 3245|                   for (i = 0; list && list[i]; i++) {
# 3246|->                     if (strcasecmp(list[i], plugin_type) == 0) {
# 3247|                           charray_add(&dep_plugins, slapi_ch_strdup(plugin->plg_name));
# 3248|                           dep_type_count++;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:103:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(&lockfile, 0)'
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:61:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:73:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:73:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:83:21: branch_true: following 'true' branch (when 'x != 20')...
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:84:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:84:16: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:94:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:83:21: branch_false: following 'false' branch (when 'x == 20')...
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:98:19: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:98:19: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:98:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:101:24: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:103:16: danger: 'open(&lockfile, 0)' leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  101|               nb_bytes = read(fd, (void *)&owning_pid, sizeof(pid_t));
#  102|               close(fd);
#  103|->             if ((nb_bytes != (size_t)(sizeof(pid_t))) || (owning_pid == 0) || (kill(owning_pid, 0) != 0 && errno == ESRCH)) {
#  104|                   /* The process that owns the lock is dead. Try to remove the old lockfile. */
#  105|                   if (unlink(lockfile) != 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:301:21: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(dir_name)'
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:297:16: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:297:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/protect_db.c:301:21: danger: 'opendir(dir_name)' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  299|       }
#  300|   
#  301|->     while ((entry = readdir(dir)) != NULL) {
#  302|   
#  303|           /* skip dot and dot-dot */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def56]
389-ds-base-3.1.3/ldap/servers/slapd/rdn.c:62:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'rdn'
389-ds-base-3.1.3/ldap/servers/slapd/rdn.c:338:1: enter_function: entry to 'slapi_rdn_set_rdn'
389-ds-base-3.1.3/ldap/servers/slapd/rdn.c:340:5: call_function: calling 'slapi_rdn_done' from 'slapi_rdn_set_rdn'
389-ds-base-3.1.3/ldap/servers/slapd/rdn.c:340:5: return_function: returning to 'slapi_rdn_set_rdn' from 'slapi_rdn_done'
389-ds-base-3.1.3/ldap/servers/slapd/rdn.c:341:5: call_function: calling 'slapi_rdn_init_rdn' from 'slapi_rdn_set_rdn'
#   60|       rdn->flag = 0;
#   61|       rdn->rdn = NULL;
#   62|->     rdn->nrdn = NULL;
#   63|       rdn->rdns = NULL;
#   64|       rdn->all_rdns = NULL;

Error: CPPCHECK_WARNING (CWE-457): [#def57]
389-ds-base-3.1.3/ldap/servers/slapd/slapd_plhash.c:43: error[uninitvar]: Uninitialized variable: *hep
#   41|       h >>= ht->shift;
#   42|       hep = &ht->buckets[h];
#   43|->     while ((he = *hep) != 0) {
#   44|           if (he->keyHash == keyHash && (*ht->keyCompare)(key, he->key)) {
#   45|               return hep;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:120:9: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(path)'
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:118:16: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:119:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:120:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:120:9: danger: 'opendir(path)' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  118|       DIR* dir = opendir(path);
#  119|       if (dir) {
#  120|->         closedir(dir);
#  121|           return 1;
#  122|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def59]
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:143:23: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen("/proc/self/cgroup", "r")'
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:132:9: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:133:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:139:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:139:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:140:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:140:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:142:18: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:142:16: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:143:23: danger: 'fopen("/proc/self/cgroup", "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  141|               /* we now have a path in s, and the last byte must be NULL */
#  142|               if ((strlen(s) >= CG2_HEADER_LEN) && strncmp(s, CG2_HEADER_FORMAT, CG2_HEADER_LEN) == 0) {
#  143|->                 res = slapi_ch_calloc(1, MAXPATHLEN + 17);
#  144|                   snprintf(res, MAXPATHLEN + 16, "/sys/fs/cgroup%s", s + CG2_HEADER_LEN);
#  145|                   /* This always has a new line, so replace it if possible. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:143:23: warning[-Wanalyzer-malloc-leak]: leak of 'fopen("/proc/self/cgroup", "r")'
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:132:9: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:133:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:139:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:139:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:140:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:140:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:142:18: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:142:16: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/slapi_pal.c:143:23: danger: 'fopen("/proc/self/cgroup", "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  141|               /* we now have a path in s, and the last byte must be NULL */
#  142|               if ((strlen(s) >= CG2_HEADER_LEN) && strncmp(s, CG2_HEADER_FORMAT, CG2_HEADER_LEN) == 0) {
#  143|->                 res = slapi_ch_calloc(1, MAXPATHLEN + 17);
#  144|                   snprintf(res, MAXPATHLEN + 16, "/sys/fs/cgroup%s", s + CG2_HEADER_LEN);
#  145|                   /* This always has a new line, so replace it if possible. */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def61]
389-ds-base-3.1.3/ldap/servers/slapd/ssl.c:193:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
389-ds-base-3.1.3/ldap/servers/slapd/ssl.c:198:1: enter_function: entry to 'slapd_SSL_error'
389-ds-base-3.1.3/ldap/servers/slapd/ssl.c:201:5: acquire_resource: 'va_start' called here
389-ds-base-3.1.3/ldap/servers/slapd/ssl.c:202:5: call_function: calling 'slapd_SSL_report' from 'slapd_SSL_error'
#  191|           msg = "info";
#  192|       }
#  193|->     PR_vsnprintf(buf, sizeof(buf), fmt, args);
#  194|       slapi_log_err(sev, "Security Initialization", "SSL %s: %s\n", msg, buf);
#  195|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def62]
389-ds-base-3.1.3/ldap/servers/slapd/task.c:211:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
389-ds-base-3.1.3/ldap/servers/slapd/task.c:200:8: branch_false: following 'false' branch (when 'task' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:205:10: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:205:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:207:10: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:207:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:210:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:210:5: acquire_resource: 'va_start' called here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:211:5: danger: missing call to 'va_end' to match 'va_start' at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  209|   
#  210|       va_start(ap, format);
#  211|->     PR_vsnprintf(task->task_status, (10 * LOG_BUFFER), format, ap);
#  212|       va_end(ap);
#  213|       slapi_task_status_changed(task);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def63]
389-ds-base-3.1.3/ldap/servers/slapd/task.c:286:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
389-ds-base-3.1.3/ldap/servers/slapd/task.c:281:8: branch_false: following 'false' branch (when 'task' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:285:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:285:5: acquire_resource: 'va_start' called here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:286:5: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  284|   
#  285|       va_start(ap, format);
#  286|->     PR_vsnprintf(buffer, LOG_BUFFER, format, ap);
#  287|       va_end(ap);
#  288|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2108:18: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")'
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2096:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2108:18: danger: 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 2106|   
# 2107|       /* see if we should log the changes made */
# 2108|->     logchanges = slapi_entry_attr_get_bool(e, TASK_SYSCONFIG_LOGCHANGES_ATTR);
# 2109|   
# 2110|       if (file != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2108:18: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")'
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2096:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2108:18: danger: 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 2106|   
# 2107|       /* see if we should log the changes made */
# 2108|->     logchanges = slapi_entry_attr_get_bool(e, TASK_SYSCONFIG_LOGCHANGES_ATTR);
# 2109|   
# 2110|       if (file != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def66]
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2117:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")'
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2096:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2110:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2116:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2116:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2117:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2117:13: danger: 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 2115|   
# 2116|           if (logchanges) {
# 2117|->             slapi_log_err(SLAPI_LOG_INFO, "task_sysconfig_reload_add", "Processing file (%s)\n",
# 2118|                             filename);
# 2119|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2117:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")'
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2096:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2110:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2116:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2116:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2117:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2117:13: danger: 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")' leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 2115|   
# 2116|           if (logchanges) {
# 2117|->             slapi_log_err(SLAPI_LOG_INFO, "task_sysconfig_reload_add", "Processing file (%s)\n",
# 2118|                             filename);
# 2119|           }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def68]
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2225:25: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")'
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2096:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2110:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2116:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2121:16: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2122:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2122:16: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2126:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2183:24: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2194:31: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2208:24: branch_false: following 'false' branch (when 'start_value == 0')...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2212:31: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2221:20: branch_true: following 'true' branch (when 'var_index != 0')...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2223:25: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2223:24: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2224:25: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2225:25: danger: 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 2223|                       if (setenv(env_var, env_value, 1) != 0) {
# 2224|                           *returncode = LDAP_OPERATIONS_ERROR;
# 2225|->                         PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Failed to set (%s)", env_var);
# 2226|                           slapi_log_err(SLAPI_LOG_ERR, "task_sysconfig_reload_add", "%s\n", returntext);
# 2227|                           rc = SLAPI_DSE_CALLBACK_ERROR;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2225:25: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")'
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2096:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2110:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2116:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2121:16: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2122:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2122:16: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2126:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2183:24: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2194:31: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2208:24: branch_false: following 'false' branch (when 'start_value == 0')...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2212:31: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2221:20: branch_true: following 'true' branch (when 'var_index != 0')...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2223:25: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2223:24: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2224:25: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2225:25: danger: 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")' leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 2223|                       if (setenv(env_var, env_value, 1) != 0) {
# 2224|                           *returncode = LDAP_OPERATIONS_ERROR;
# 2225|->                         PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Failed to set (%s)", env_var);
# 2226|                           slapi_log_err(SLAPI_LOG_ERR, "task_sysconfig_reload_add", "%s\n", returntext);
# 2227|                           rc = SLAPI_DSE_CALLBACK_ERROR;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def70]
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2226:25: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")'
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2096:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2110:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2116:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2121:16: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2122:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2122:16: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2126:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2183:24: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2194:31: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2208:24: branch_false: following 'false' branch (when 'start_value == 0')...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2212:31: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2221:20: branch_true: following 'true' branch (when 'var_index != 0')...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2223:25: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2223:24: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2224:25: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2226:25: danger: 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 2224|                           *returncode = LDAP_OPERATIONS_ERROR;
# 2225|                           PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Failed to set (%s)", env_var);
# 2226|->                         slapi_log_err(SLAPI_LOG_ERR, "task_sysconfig_reload_add", "%s\n", returntext);
# 2227|                           rc = SLAPI_DSE_CALLBACK_ERROR;
# 2228|                           break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2226:25: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")'
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2096:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2097:16: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2110:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2116:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2121:16: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2122:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2122:16: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2126:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2183:24: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2194:31: branch_false: following 'false' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2208:24: branch_false: following 'false' branch (when 'start_value == 0')...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2212:31: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2221:20: branch_true: following 'true' branch (when 'var_index != 0')...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2223:25: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2223:24: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2224:25: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/task.c:2226:25: danger: 'fopen(slapi_entry_attr_get_ref(e, "sysconfigfile"), "r")' leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
# 2224|                           *returncode = LDAP_OPERATIONS_ERROR;
# 2225|                           PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Failed to set (%s)", env_var);
# 2226|->                         slapi_log_err(SLAPI_LOG_ERR, "task_sysconfig_reload_add", "%s\n", returntext);
# 2227|                           rc = SLAPI_DSE_CALLBACK_ERROR;
# 2228|                           break;

Error: CPPCHECK_WARNING (CWE-401): [#def72]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:787: error[memleakOnRealloc]: Common realloc mistake: 'buf' nulled but not freed upon failure
#  785|       if (buflen < tmpbuflen) {
#  786|           buflen = tmpbuflen;
#  787|->         buf = (unsigned char *)realloc(buf, buflen);
#  788|       }
#  789|       if (!buf) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:845:5: warning[-Wanalyzer-malloc-leak]: leak of ‘indentp’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1487:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1487:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1496:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1496:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1510:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1510:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1515:17: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1528:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1536:11: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1537:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1544:11: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1545:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1550:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1550:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1556:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1556:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1561:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1561:8: branch_false: following ‘false’ branch (when ‘find_key’ is NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1593:16: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1593:15: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1606:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1606:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1607:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1609:13: call_function: calling ‘display_entryrdn_item’ from ‘main’
#  843|       memset(indentp, ' ', indent);
#  844|       indentp[indent] = 0;
#  845|->     entryrdn_decode_data(NULL, elem, &id, &nrdnlen, &nrdn, &rdnlen, &rdn);
#  846|   
#  847|       printf("%s\n", key);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def74]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1105:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dump_name, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1470:14: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1479:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: call_function: calling ‘importdb’ from ‘main’
# 1103|       enum { ST_POS0, ST_POS1, ST_POS2, ST_COMMENT, ST_VAL1, ST_VAL2 } state;
# 1104|       state = ST_POS0;
# 1105|->     while ((c = fgetc(file)) != EOF) {
# 1106|           switch (state) {
# 1107|               case ST_COMMENT:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1105:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dump_name, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1470:14: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1479:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: call_function: calling ‘importdb’ from ‘main’
# 1103|       enum { ST_POS0, ST_POS1, ST_POS2, ST_COMMENT, ST_VAL1, ST_VAL2 } state;
# 1104|       state = ST_POS0;
# 1105|->     while ((c = fgetc(file)) != EOF) {
# 1106|           switch (state) {
# 1107|               case ST_COMMENT:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def76]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1183:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dump_name, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1470:14: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1479:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: call_function: calling ‘importdb’ from ‘main’
# 1181|       dump = fopen(dump_name, "r");
# 1182|   
# 1183|->     dblayer_init_pvt_txn();
# 1184|   
# 1185|       if (!dump) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1183:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dump_name, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1470:14: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1479:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: call_function: calling ‘importdb’ from ‘main’
# 1181|       dump = fopen(dump_name, "r");
# 1182|   
# 1183|->     dblayer_init_pvt_txn();
# 1184|   
# 1185|       if (!dump) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def78]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1190:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dump_name, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1470:14: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1479:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: call_function: calling ‘importdb’ from ‘main’
# 1188|       }
# 1189|   
# 1190|->     if (dblayer_private_open(dbimpl_name, filename, 1, &be, &env, &db)) {
# 1191|           printf("Error: Can't initialize db plugin: %s\n", dbimpl_name);
# 1192|           fclose(dump);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1190:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dump_name, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1470:14: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1479:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: call_function: calling ‘importdb’ from ‘main’
# 1188|       }
# 1189|   
# 1190|->     if (dblayer_private_open(dbimpl_name, filename, 1, &be, &env, &db)) {
# 1191|           printf("Error: Can't initialize db plugin: %s\n", dbimpl_name);
# 1192|           fclose(dump);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def80]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1196:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dump_name, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1470:14: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1479:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: call_function: calling ‘importdb’ from ‘main’
# 1194|       }
# 1195|   
# 1196|->     ret = dblayer_txn_begin(be, NULL, &txn);
# 1197|       if (ret != 0) {
# 1198|           printf("Error: failed to start the database txn. Error %d: %s\n", ret, dblayer_strerror(ret));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1196:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dump_name, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1470:14: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1479:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: call_function: calling ‘importdb’ from ‘main’
# 1194|       }
# 1195|   
# 1196|->     ret = dblayer_txn_begin(be, NULL, &txn);
# 1197|       if (ret != 0) {
# 1198|           printf("Error: failed to start the database txn. Error %d: %s\n", ret, dblayer_strerror(ret));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def82]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1198:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dump_name, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1470:14: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1479:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: call_function: calling ‘importdb’ from ‘main’
# 1196|       ret = dblayer_txn_begin(be, NULL, &txn);
# 1197|       if (ret != 0) {
# 1198|->         printf("Error: failed to start the database txn. Error %d: %s\n", ret, dblayer_strerror(ret));
# 1199|       }
# 1200|       while (ret == 0 &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1198:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dump_name, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1469:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1470:14: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1479:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1484:16: call_function: calling ‘importdb’ from ‘main’
# 1196|       ret = dblayer_txn_begin(be, NULL, &txn);
# 1197|       if (ret != 0) {
# 1198|->         printf("Error: failed to start the database txn. Error %d: %s\n", ret, dblayer_strerror(ret));
# 1199|       }
# 1200|       while (ret == 0 &&

Error: GCC_ANALYZER_WARNING (CWE-775): [#def84]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1264:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dump_name, "w")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: call_function: calling ‘exportdb’ from ‘main’
# 1262|       }
# 1263|   
# 1264|->     if (dblayer_private_open(dbimpl_name, filename, 0, &be, &env, &db)) {
# 1265|           printf("Can't initialize db plugin: %s\n", dbimpl_name);
# 1266|           fclose(dump);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1264:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dump_name, "w")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: call_function: calling ‘exportdb’ from ‘main’
# 1262|       }
# 1263|   
# 1264|->     if (dblayer_private_open(dbimpl_name, filename, 0, &be, &env, &db)) {
# 1265|           printf("Can't initialize db plugin: %s\n", dbimpl_name);
# 1266|           fclose(dump);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1272:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dump_name, "w")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: call_function: calling ‘exportdb’ from ‘main’
# 1270|       /* cursor through the db */
# 1271|   
# 1272|->     ret = dblayer_new_cursor(be, db, NULL, &cursor);
# 1273|       if (ret != 0) {
# 1274|           printf("Can't create db cursor: %s\n", dblayer_strerror(ret));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1272:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dump_name, "w")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: call_function: calling ‘exportdb’ from ‘main’
# 1270|       /* cursor through the db */
# 1271|   
# 1272|->     ret = dblayer_new_cursor(be, db, NULL, &cursor);
# 1273|       if (ret != 0) {
# 1274|           printf("Can't create db cursor: %s\n", dblayer_strerror(ret));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def88]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1274:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dump_name, "w")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: call_function: calling ‘exportdb’ from ‘main’
# 1272|       ret = dblayer_new_cursor(be, db, NULL, &cursor);
# 1273|       if (ret != 0) {
# 1274|->         printf("Can't create db cursor: %s\n", dblayer_strerror(ret));
# 1275|           fclose(dump);
# 1276|           return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1274:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dump_name, "w")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: call_function: calling ‘exportdb’ from ‘main’
# 1272|       ret = dblayer_new_cursor(be, db, NULL, &cursor);
# 1273|       if (ret != 0) {
# 1274|->         printf("Can't create db cursor: %s\n", dblayer_strerror(ret));
# 1275|           fclose(dump);
# 1276|           return 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def90]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1282:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dump_name, "w")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: call_function: calling ‘exportdb’ from ‘main’
# 1280|   
# 1281|       /* Position cursor at the matching key */
# 1282|->     ret = dblayer_cursor_op(&cursor, DBI_OP_MOVE_TO_FIRST,  &key, &data);
# 1283|       while (ret == DBI_RC_SUCCESS) {
# 1284|           print_value(dump, "k: ", key.data, key.size);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1282:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dump_name, "w")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: call_function: calling ‘exportdb’ from ‘main’
# 1280|   
# 1281|       /* Position cursor at the matching key */
# 1282|->     ret = dblayer_cursor_op(&cursor, DBI_OP_MOVE_TO_FIRST,  &key, &data);
# 1283|       while (ret == DBI_RC_SUCCESS) {
# 1284|           print_value(dump, "k: ", key.data, key.size);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def92]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1291:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(dump_name, "w")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: call_function: calling ‘exportdb’ from ‘main’
# 1289|               break;
# 1290|           }
# 1291|->         ret = dblayer_cursor_op(&cursor, DBI_OP_NEXT,  &key, &data);
# 1292|       }
# 1293|       if (ret == DBI_RC_NOTFOUND) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1291:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(dump_name, "w")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1339:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:50: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:17: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1368:16: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1367:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1379:12: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1378:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1460:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1465:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/dbscan.c:1466:16: call_function: calling ‘exportdb’ from ‘main’
# 1289|               break;
# 1290|           }
# 1291|->         ret = dblayer_cursor_op(&cursor, DBI_OP_NEXT,  &key, &data);
# 1292|       }
# 1293|       if (ret == DBI_RC_NOTFOUND) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:120:23: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirpath)’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:95:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:106:12: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:106:12: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:107:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:120:23: danger: ‘opendir(dirpath)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  118|      * We will only accept the .jpg files, as stated by the RFC.
#  119|      */
#  120|->     while ((direntp = readdir(dirp)) != NULL) {
#  121|           fileName = direntp->d_name;
#  122|           if (!strcmp(getExtend(fileName), "jpg")) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def95]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:329:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*dlf.fname, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:315:13: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:316:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:327:10: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:329:25: danger: ‘fopen(*dlf.fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  327|       for (dlf->strNb = 0; fgets(line, MAX_FILTER, ifile) != NULL; dlf->strNb++)
#  328|           ;
#  329|->     dlf->str = (char **)safe_malloc(dlf->strNb * sizeof(char *));
#  330|       if (fseek(ifile, 0, SEEK_SET) != 0) {
#  331|           perror(dlf->fname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:329:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*dlf.fname, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:315:13: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:316:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:327:10: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:329:25: danger: ‘fopen(*dlf.fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  327|       for (dlf->strNb = 0; fgets(line, MAX_FILTER, ifile) != NULL; dlf->strNb++)
#  328|           ;
#  329|->     dlf->str = (char **)safe_malloc(dlf->strNb * sizeof(char *));
#  330|       if (fseek(ifile, 0, SEEK_SET) != 0) {
#  331|           perror(dlf->fname);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def97]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:330:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*dlf.fname, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:315:13: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:316:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:327:10: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:330:9: danger: ‘fopen(*dlf.fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  328|           ;
#  329|       dlf->str = (char **)safe_malloc(dlf->strNb * sizeof(char *));
#  330|->     if (fseek(ifile, 0, SEEK_SET) != 0) {
#  331|           perror(dlf->fname);
#  332|           fprintf(stderr, "Error: cannot rewind file \"%s\"\n", dlf->fname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:330:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*dlf.fname, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:315:13: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:316:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:327:10: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:330:9: danger: ‘fopen(*dlf.fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  328|           ;
#  329|       dlf->str = (char **)safe_malloc(dlf->strNb * sizeof(char *));
#  330|->     if (fseek(ifile, 0, SEEK_SET) != 0) {
#  331|           perror(dlf->fname);
#  332|           fprintf(stderr, "Error: cannot rewind file \"%s\"\n", dlf->fname);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def99]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:331:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*dlf.fname, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:315:13: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:316:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:327:10: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:330:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:331:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:331:9: danger: ‘fopen(*dlf.fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  329|       dlf->str = (char **)safe_malloc(dlf->strNb * sizeof(char *));
#  330|       if (fseek(ifile, 0, SEEK_SET) != 0) {
#  331|->         perror(dlf->fname);
#  332|           fprintf(stderr, "Error: cannot rewind file \"%s\"\n", dlf->fname);
#  333|           fclose(ifile);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:331:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*dlf.fname, "r")’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:315:13: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:316:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:327:10: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:330:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:331:16: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/data.c:331:9: danger: ‘fopen(*dlf.fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  329|       dlf->str = (char **)safe_malloc(dlf->strNb * sizeof(char *));
#  330|       if (fseek(ifile, 0, SEEK_SET) != 0) {
#  331|->         perror(dlf->fname);
#  332|           fprintf(stderr, "Error: cannot rewind file \"%s\"\n", dlf->fname);
#  333|           fclose(ifile);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:893:23: warning[-Wanalyzer-malloc-leak]: leak of ‘bv’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1290:1: enter_function: entry to ‘buildNewModAttribFile’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1297:25: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1312:9: call_function: calling ‘buildRandomRdnOrFilter’ from ‘buildNewModAttribFile’
#  891|           case HOW_INCR_FROM_FILE:
#  892|               if (mctx.mode & COMMON_COUNTER) {
#  893|->                 num = incrementCommonCounterObject(tttctx, field->commonField);
#  894|                   if (num < 0)
#  895|                       return (NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:908:23: warning[-Wanalyzer-malloc-leak]: leak of ‘bv’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1290:1: enter_function: entry to ‘buildNewModAttribFile’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1297:25: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1312:9: call_function: calling ‘buildRandomRdnOrFilter’ from ‘buildNewModAttribFile’
#  906|           case HOW_INCR_FROM_FILE_NL:
#  907|               if (mctx.mode & COMMON_COUNTER) {
#  908|->                 num = incrementCommonCounterObject(tttctx, field->commonField);
#  909|                   if (num < 0)
#  910|                       return (NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:926:23: warning[-Wanalyzer-malloc-leak]: leak of ‘bv’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1290:1: enter_function: entry to ‘buildNewModAttribFile’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1297:25: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1312:9: call_function: calling ‘buildRandomRdnOrFilter’ from ‘buildNewModAttribFile’
#  924|           case HOW_INCR_NB:
#  925|               if (mctx.mode & COMMON_COUNTER) {
#  926|->                 num = incrementCommonCounterObject(tttctx, field->commonField);
#  927|                   if (num < 0)
#  928|                       return (NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:942:23: warning[-Wanalyzer-malloc-leak]: leak of ‘bv’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1290:1: enter_function: entry to ‘buildNewModAttribFile’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1297:25: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1312:9: call_function: calling ‘buildRandomRdnOrFilter’ from ‘buildNewModAttribFile’
#  940|           case HOW_INCR_NB_NOLOOP:
#  941|               if (mctx.mode & COMMON_COUNTER) {
#  942|->                 num = incrementCommonCounterObject(tttctx, field->commonField);
#  943|                   if (num < 0)
#  944|                       return (NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1023:19: warning[-Wanalyzer-malloc-leak]: leak of ‘attr.mod_vals.modv_strvals’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1290:1: enter_function: entry to ‘buildNewModAttribFile’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1298:42: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:8: branch_false: following ‘false’ branch (when ‘bv’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:9: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1312:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1312:9: call_function: calling ‘buildRandomRdnOrFilter’ from ‘buildNewModAttribFile’
# 1021|       if (mctx.mode & RANDOM_BASE) {
# 1022|           if (mctx.mode & STRING)
# 1023|->             (void)randomString(tttctx, mctx.baseDNNbDigit);
# 1024|           else
# 1025|               rnd(tttctx->buf2, mctx.baseDNLow, mctx.baseDNHigh,        /*JLS 14-11-00*/

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1023:19: warning[-Wanalyzer-malloc-leak]: leak of ‘bv’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1290:1: enter_function: entry to ‘buildNewModAttribFile’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1297:25: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1312:9: call_function: calling ‘buildRandomRdnOrFilter’ from ‘buildNewModAttribFile’
# 1021|       if (mctx.mode & RANDOM_BASE) {
# 1022|           if (mctx.mode & STRING)
# 1023|->             (void)randomString(tttctx, mctx.baseDNNbDigit);
# 1024|           else
# 1025|               rnd(tttctx->buf2, mctx.baseDNLow, mctx.baseDNHigh,        /*JLS 14-11-00*/

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1025:13: warning[-Wanalyzer-malloc-leak]: leak of ‘attr.mod_vals.modv_strvals’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1290:1: enter_function: entry to ‘buildNewModAttribFile’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1298:42: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:8: branch_false: following ‘false’ branch (when ‘bv’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:9: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1312:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1312:9: call_function: calling ‘buildRandomRdnOrFilter’ from ‘buildNewModAttribFile’
# 1023|               (void)randomString(tttctx, mctx.baseDNNbDigit);
# 1024|           else
# 1025|->             rnd(tttctx->buf2, mctx.baseDNLow, mctx.baseDNHigh,        /*JLS 14-11-00*/
# 1026|                   (mctx.mod2 & M2_NOZEROPAD) ? 0 : mctx.baseDNNbDigit); /*JLS 14-11-00*/
# 1027|           strncpy(&(tttctx->bufBaseDN[tttctx->startBaseDN]),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1025:13: warning[-Wanalyzer-malloc-leak]: leak of ‘bv’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1290:1: enter_function: entry to ‘buildNewModAttribFile’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1297:25: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1312:9: call_function: calling ‘buildRandomRdnOrFilter’ from ‘buildNewModAttribFile’
# 1023|               (void)randomString(tttctx, mctx.baseDNNbDigit);
# 1024|           else
# 1025|->             rnd(tttctx->buf2, mctx.baseDNLow, mctx.baseDNHigh,        /*JLS 14-11-00*/
# 1026|                   (mctx.mod2 & M2_NOZEROPAD) ? 0 : mctx.baseDNNbDigit); /*JLS 14-11-00*/
# 1027|           strncpy(&(tttctx->bufBaseDN[tttctx->startBaseDN]),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1040:15: warning[-Wanalyzer-malloc-leak]: leak of ‘attr.mod_vals.modv_strvals’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1290:1: enter_function: entry to ‘buildNewModAttribFile’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1298:42: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:8: branch_false: following ‘false’ branch (when ‘bv’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:9: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1312:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1312:9: call_function: calling ‘buildRandomRdnOrFilter’ from ‘buildNewModAttribFile’
# 1038|       if (mctx.mode & ATTR_REPLACE)                          /*JLS 21-11-00*/
# 1039|       {                                                      /*JLS 21-11-00*/
# 1040|->         (void)randomString(tttctx, mctx.attrplNbDigit);    /*JLS 21-11-00*/
# 1041|           strncpy(&(tttctx->bufAttrpl[tttctx->startAttrpl]), /*JLS 21-11-00*/
# 1042|                   tttctx->buf2, mctx.attrplNbDigit);         /*JLS 21-11-00*/

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1040:15: warning[-Wanalyzer-malloc-leak]: leak of ‘bv’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1290:1: enter_function: entry to ‘buildNewModAttribFile’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1297:25: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1301:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1312:9: call_function: calling ‘buildRandomRdnOrFilter’ from ‘buildNewModAttribFile’
# 1038|       if (mctx.mode & ATTR_REPLACE)                          /*JLS 21-11-00*/
# 1039|       {                                                      /*JLS 21-11-00*/
# 1040|->         (void)randomString(tttctx, mctx.attrplNbDigit);    /*JLS 21-11-00*/
# 1041|           strncpy(&(tttctx->bufAttrpl[tttctx->startAttrpl]), /*JLS 21-11-00*/
# 1042|                   tttctx->buf2, mctx.attrplNbDigit);         /*JLS 21-11-00*/

Error: CPPCHECK_WARNING (CWE-476): [#def111]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1204: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
# 1202|           ldcltExit(EXIT_RESSOURCE); /*JLS 18-12-00*/
# 1203|       }                              /*JLS 06-03-00*/
# 1204|->     p[0] = str1;
# 1205|       p[1] = NULL;
# 1206|       return (p);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def112]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1204:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1413:1: enter_function: entry to ‘buildVersatileObject’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1440:23: call_function: calling ‘strList1’ from ‘buildVersatileObject’
# 1202|           ldcltExit(EXIT_RESSOURCE); /*JLS 18-12-00*/
# 1203|       }                              /*JLS 06-03-00*/
# 1204|->     p[0] = str1;
# 1205|       p[1] = NULL;
# 1206|       return (p);

Error: CPPCHECK_WARNING (CWE-476): [#def113]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1205: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
# 1203|       }                              /*JLS 06-03-00*/
# 1204|       p[0] = str1;
# 1205|->     p[1] = NULL;
# 1206|       return (p);
# 1207|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1442:16: warning[-Wanalyzer-malloc-leak]: leak of ‘attr.mod_vals.modv_strvals’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1413:1: enter_function: entry to ‘buildVersatileObject’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1440:23: call_function: calling ‘strList1’ from ‘buildVersatileObject’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1440:23: return_function: returning to ‘buildVersatileObject’ from ‘strList1’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1441:9: call_function: calling ‘addAttrib’ from ‘buildVersatileObject’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1441:9: return_function: returning to ‘buildVersatileObject’ from ‘addAttrib’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1441:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldapfct.c:1442:16: danger: ‘attr.mod_vals.modv_strvals’ leaks here; was allocated at [(4)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/3)
# 1440|       attr.mod_values = strList1(&(tttctx->bufFilter[i + 1]));
# 1441|       if (addAttrib(attrs, nbAttribs++, &attr) < 0)
# 1442|->         return (-1);
# 1443|   
# 1444|       /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1238:42: warning[-Wanalyzer-malloc-leak]: leak of ‘attrF’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:952:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:961:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1072:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1084:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1084:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1103:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1103:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1114:9: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1114:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1147:10: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1178:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1185:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1189:34: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1196:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1201:61: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1212:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1216:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1219:12: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1224:35: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1229:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1229:12: branch_false: following ‘false’ branch (when ‘attrF’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1234:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/ldclt.c:1238:42: danger: ‘attrF’ leaks here; was allocated at [(22)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/21)
# 1236|   
# 1237|           /* start to read file content */
# 1238|->         mctx.attrplFileContent = (char *)safe_malloc(mctx.attrplFileSize + 1);
# 1239|           i = 0;
# 1240|           while ((ret = fread(buffer, BUFFERSIZE, 1, attrF))) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/scalab01.c:363:16: warning[-Wanalyzer-malloc-leak]: leak of ‘new’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/scalab01.c:345:23: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/scalab01.c:346:8: branch_false: following ‘false’ branch (when ‘new’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/scalab01.c:353:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/scalab01.c:363:16: danger: ‘new’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  361|      *        section but I am not 100% certain this won't mess up all things.
#  362|      */
#  363|->     if ((ret = ldclt_mutex_lock(&(s1ctx.list_mutex))) != 0) {
#  364|           fprintf(stderr, "ldclt[%d]: %s: cannot mutex_lock(), error=%d (%s)\n",
#  365|                   mctx.pid, tttctx->thrdId, ret, strerror(ret));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/scalab01.c:366:9: warning[-Wanalyzer-malloc-leak]: leak of ‘new’
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/scalab01.c:345:23: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/scalab01.c:346:8: branch_false: following ‘false’ branch (when ‘new’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/scalab01.c:353:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/scalab01.c:363:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/scalab01.c:364:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/tools/ldclt/scalab01.c:366:9: danger: ‘new’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  364|           fprintf(stderr, "ldclt[%d]: %s: cannot mutex_lock(), error=%d (%s)\n",
#  365|                   mctx.pid, tttctx->thrdId, ret, strerror(ret));
#  366|->         fflush(stderr);
#  367|           rc = -1;
#  368|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:34:26: warning[-Wanalyzer-malloc-leak]: leak of 'dupentry'
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:32:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:34:26: danger: 'dupentry' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   32|       char *dupentry = strdup(entry);
#   33|   
#   34|->     Slapi_DN *base_sdn = slapi_sdn_new_from_char_dn(dn);
#   35|       /* If not, create it. */
#   36|       int result = slapi_exists_or_add_internal(base_sdn, filter, dupentry, modifier_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:36:18: warning[-Wanalyzer-malloc-leak]: leak of 'dupentry'
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:32:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:36:18: danger: 'dupentry' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   34|       Slapi_DN *base_sdn = slapi_sdn_new_from_char_dn(dn);
#   35|       /* If not, create it. */
#   36|->     int result = slapi_exists_or_add_internal(base_sdn, filter, dupentry, modifier_name);
#   37|   
#   38|       if (result != 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:39:9: warning[-Wanalyzer-malloc-leak]: leak of 'dupentry'
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:32:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:38:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:39:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:39:9: danger: 'dupentry' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   37|   
#   38|       if (result != 0) {
#   39|->         slapi_log_error(SLAPI_LOG_FATAL, upgrade_id, "Failed to create entry: %"PRId32"\n", result);
#   40|           uresult = UPGRADE_FAILURE;
#   41|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:42:5: warning[-Wanalyzer-malloc-leak]: leak of 'dupentry'
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:32:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/slapd/upgrade.c:42:5: danger: 'dupentry' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   40|           uresult = UPGRADE_FAILURE;
#   41|       }
#   42|->     slapi_ch_free_string(&dupentry);
#   43|       slapi_sdn_free(&base_sdn);
#   44|       return uresult;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def122]
389-ds-base-3.1.3/ldap/servers/slapd/util.c:421:10: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
389-ds-base-3.1.3/ldap/servers/slapd/util.c:420:5: acquire_resource: 'va_start' called here
389-ds-base-3.1.3/ldap/servers/slapd/util.c:421:10: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  419|   
#  420|       va_start(args, fmt);
#  421|->     rc = PR_vsxprintf(filter_stuff_func, &ctx, fmt, args);
#  422|       va_end(args);
#  423|       if (rc == -1) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def123]
389-ds-base-3.1.3/ldap/servers/slapd/util.c:430:14: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
389-ds-base-3.1.3/ldap/servers/slapd/util.c:423:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/ldap/servers/slapd/util.c:425:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/util.c:429:9: acquire_resource: 'va_start' called here
389-ds-base-3.1.3/ldap/servers/slapd/util.c:430:14: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  428|           ctx.buf_size = 0;
#  429|           va_start(args, fmt);
#  430|->         rc = PR_vsxprintf(filter_stuff_func, &ctx, fmt, args);
#  431|           va_end(args);
#  432|           if (rc == -1) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def124]
389-ds-base-3.1.3/ldap/servers/slapd/util.c:1630:15: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
389-ds-base-3.1.3/ldap/servers/slapd/util.c:1627:8: branch_true: following 'true' branch (when 'errorbuf' is non-NULL)...
389-ds-base-3.1.3/ldap/servers/slapd/util.c:1629:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/slapd/util.c:1629:9: acquire_resource: 'va_start' called here
389-ds-base-3.1.3/ldap/servers/slapd/util.c:1630:15: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 1628|           va_list ap;
# 1629|           va_start(ap, fmt);
# 1630|->         (void)PR_vsnprintf(errorbuf, len ? len - 1 : sizeof(errorbuf) - 1, fmt, ap);
# 1631|           va_end(ap);
# 1632|       }

Error: CPPCHECK_WARNING (CWE-119): [#def125]
389-ds-base-3.1.3/ldap/servers/slapd/uuid.c:814: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: hash
#  812|       * plus a few constants. */
#  813|   
#  814|->     memcpy(uuid, hash, sizeof(guid_t));
#  815|   
#  816|       /* when migrating, we skip the ntohl in order to read in old,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:118:19: warning[-Wanalyzer-malloc-leak]: leak of ‘entity_table_info’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:115:25: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:118:19: danger: ‘entity_table_info’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  116|   
#  117|       /* create handlers */
#  118|->     ops_handler = netsnmp_create_handler_registration("dsOpsTable",
#  119|                                                         netsnmp_table_array_helper_handler,
#  120|                                                         dsOpsTable_oid,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:118:19: warning[-Wanalyzer-malloc-leak]: leak of ‘entries_table_info’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:114:26: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:118:19: danger: ‘entries_table_info’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  116|   
#  117|       /* create handlers */
#  118|->     ops_handler = netsnmp_create_handler_registration("dsOpsTable",
#  119|                                                         netsnmp_table_array_helper_handler,
#  120|                                                         dsOpsTable_oid,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:118:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ops_table_info’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:113:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:118:19: danger: ‘ops_table_info’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  116|   
#  117|       /* create handlers */
#  118|->     ops_handler = netsnmp_create_handler_registration("dsOpsTable",
#  119|                                                         netsnmp_table_array_helper_handler,
#  120|                                                         dsOpsTable_oid,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:123:23: warning[-Wanalyzer-malloc-leak]: leak of ‘entity_table_info’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:115:25: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:123:23: danger: ‘entity_table_info’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  121|                                                         dsOpsTable_oid_len,
#  122|                                                         HANDLER_CAN_RONLY);
#  123|->     entries_handler = netsnmp_create_handler_registration("dsEntriesTable",
#  124|                                                             netsnmp_table_array_helper_handler,
#  125|                                                             dsEntriesTable_oid,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:123:23: warning[-Wanalyzer-malloc-leak]: leak of ‘entries_table_info’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:114:26: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:123:23: danger: ‘entries_table_info’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  121|                                                         dsOpsTable_oid_len,
#  122|                                                         HANDLER_CAN_RONLY);
#  123|->     entries_handler = netsnmp_create_handler_registration("dsEntriesTable",
#  124|                                                             netsnmp_table_array_helper_handler,
#  125|                                                             dsEntriesTable_oid,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:123:23: warning[-Wanalyzer-malloc-leak]: leak of ‘ops_table_info’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:113:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:123:23: danger: ‘ops_table_info’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  121|                                                         dsOpsTable_oid_len,
#  122|                                                         HANDLER_CAN_RONLY);
#  123|->     entries_handler = netsnmp_create_handler_registration("dsEntriesTable",
#  124|                                                             netsnmp_table_array_helper_handler,
#  125|                                                             dsEntriesTable_oid,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:128:22: warning[-Wanalyzer-malloc-leak]: leak of ‘entity_table_info’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:115:25: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:128:22: danger: ‘entity_table_info’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  126|                                                             dsEntriesTable_oid_len,
#  127|                                                             HANDLER_CAN_RONLY);
#  128|->     entity_handler = netsnmp_create_handler_registration("dsEntityTable",
#  129|                                                            netsnmp_table_array_helper_handler,
#  130|                                                            dsEntityTable_oid,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:128:22: warning[-Wanalyzer-malloc-leak]: leak of ‘entries_table_info’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:114:26: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:128:22: danger: ‘entries_table_info’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  126|                                                             dsEntriesTable_oid_len,
#  127|                                                             HANDLER_CAN_RONLY);
#  128|->     entity_handler = netsnmp_create_handler_registration("dsEntityTable",
#  129|                                                            netsnmp_table_array_helper_handler,
#  130|                                                            dsEntityTable_oid,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:128:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ops_table_info’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:113:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:128:22: danger: ‘ops_table_info’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  126|                                                             dsEntriesTable_oid_len,
#  127|                                                             HANDLER_CAN_RONLY);
#  128|->     entity_handler = netsnmp_create_handler_registration("dsEntityTable",
#  129|                                                            netsnmp_table_array_helper_handler,
#  130|                                                            dsEntityTable_oid,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:137:9: warning[-Wanalyzer-malloc-leak]: leak of ‘entity_table_info’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:115:25: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:137:9: danger: ‘entity_table_info’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  135|           !ops_table_info || !entries_table_info || !entity_table_info) {
#  136|           /* malloc failed */
#  137|->         snmp_log(LOG_ERR, "malloc failed in initialize_stats_table\n");
#  138|           SNMP_FREE(ops_table_info);
#  139|           SNMP_FREE(entries_table_info);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:137:9: warning[-Wanalyzer-malloc-leak]: leak of ‘entries_table_info’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:114:26: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:137:9: danger: ‘entries_table_info’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  135|           !ops_table_info || !entries_table_info || !entity_table_info) {
#  136|           /* malloc failed */
#  137|->         snmp_log(LOG_ERR, "malloc failed in initialize_stats_table\n");
#  138|           SNMP_FREE(ops_table_info);
#  139|           SNMP_FREE(entries_table_info);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:137:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ops_table_info’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:113:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:137:9: danger: ‘ops_table_info’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  135|           !ops_table_info || !entries_table_info || !entity_table_info) {
#  136|           /* malloc failed */
#  137|->         snmp_log(LOG_ERR, "malloc failed in initialize_stats_table\n");
#  138|           SNMP_FREE(ops_table_info);
#  139|           SNMP_FREE(entries_table_info);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:208:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:203:32: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:206:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:208:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:208:9: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  206|       if (!ctx || !index_oid) {
#  207|           /* Error during malloc */
#  208|->         snmp_log(LOG_ERR, "malloc failed in stats_table_create_row\n");
#  209|           goto error;
#  210|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:208:9: warning[-Wanalyzer-malloc-leak]: leak of ‘index_oid’
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:204:29: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:206:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:208:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/ldap-agent.c:208:9: danger: ‘index_oid’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  206|       if (!ctx || !index_oid) {
#  207|           /* Error during malloc */
#  208|->         snmp_log(LOG_ERR, "malloc failed in stats_table_create_row\n");
#  209|           goto error;
#  210|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def140]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:406:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(conf_path, "r")’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:406:22: danger: ‘fopen(conf_path, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  404|   
#  405|               /* Open dse.ldif */
#  406|->             dse_fp = ldif_open(serv_p->dse_ldif, "r");
#  407|               buflen = 0;
#  408|               if (dse_fp == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:406:22: warning[-Wanalyzer-malloc-leak]: leak of ‘config_file’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:47:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:94:8: branch_false: following ‘false’ branch (when ‘argc == 1’)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:99:24: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:99:24: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:99:8: branch_false: following ‘false’ branch (when ‘config_file’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:104:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:104:5: call_function: calling ‘load_config’ from ‘main’
#  404|   
#  405|               /* Open dse.ldif */
#  406|->             dse_fp = ldif_open(serv_p->dse_ldif, "r");
#  407|               buflen = 0;
#  408|               if (dse_fp == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:406:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(conf_path, "r")’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:406:22: danger: ‘fopen(conf_path, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  404|   
#  405|               /* Open dse.ldif */
#  406|->             dse_fp = ldif_open(serv_p->dse_ldif, "r");
#  407|               buflen = 0;
#  408|               if (dse_fp == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:406:22: warning[-Wanalyzer-malloc-leak]: leak of ‘instancename’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:406:22: danger: ‘instancename’ leaks here; was allocated at [(23)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/22)
#  404|   
#  405|               /* Open dse.ldif */
#  406|->             dse_fp = ldif_open(serv_p->dse_ldif, "r");
#  407|               buflen = 0;
#  408|               if (dse_fp == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:406:22: warning[-Wanalyzer-malloc-leak]: leak of ‘serv_p’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:27: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:406:22: danger: ‘serv_p’ leaks here; was allocated at [(18)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/17)
#  404|   
#  405|               /* Open dse.ldif */
#  406|->             dse_fp = ldif_open(serv_p->dse_ldif, "r");
#  407|               buflen = 0;
#  408|               if (dse_fp == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def145]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(conf_path, "r")’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: danger: ‘fopen(conf_path, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  421|                * pointer to the beginning of the entry so we can free it
#  422|                * later. */
#  423|->             while (ldif_read_record(dse_fp, &lineno, &entry, &buflen))
#  424|               {
#  425|                   char *entryp = entry;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: warning[-Wanalyzer-malloc-leak]: leak of ‘config_file’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:47:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:94:8: branch_false: following ‘false’ branch (when ‘argc == 1’)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:99:24: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:99:24: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:99:8: branch_false: following ‘false’ branch (when ‘config_file’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:104:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:104:5: call_function: calling ‘load_config’ from ‘main’
#  421|                * pointer to the beginning of the entry so we can free it
#  422|                * later. */
#  423|->             while (ldif_read_record(dse_fp, &lineno, &entry, &buflen))
#  424|               {
#  425|                   char *entryp = entry;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(conf_path, "r")’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: danger: ‘fopen(conf_path, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  421|                * pointer to the beginning of the entry so we can free it
#  422|                * later. */
#  423|->             while (ldif_read_record(dse_fp, &lineno, &entry, &buflen))
#  424|               {
#  425|                   char *entryp = entry;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: warning[-Wanalyzer-malloc-leak]: leak of ‘instancename’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: danger: ‘instancename’ leaks here; was allocated at [(23)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/22)
#  421|                * pointer to the beginning of the entry so we can free it
#  422|                * later. */
#  423|->             while (ldif_read_record(dse_fp, &lineno, &entry, &buflen))
#  424|               {
#  425|                   char *entryp = entry;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: warning[-Wanalyzer-malloc-leak]: leak of ‘serv_p’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:27: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: danger: ‘serv_p’ leaks here; was allocated at [(18)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/17)
#  421|                * pointer to the beginning of the entry so we can free it
#  422|                * later. */
#  423|->             while (ldif_read_record(dse_fp, &lineno, &entry, &buflen))
#  424|               {
#  425|                   char *entryp = entry;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def150]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(conf_path, "r")’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:21: danger: ‘fopen(conf_path, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  428|                   ber_len_t vlen;
#  429|                   /* Check if this is the cn=config entry */
#  430|->                 if (ldif_parse_line(ldif_getline(&entryp), &attr, &val, &vlen)) {
#  431|                       printf("ldap-agent: error parsing ldif line from [%s]\n", serv_p->dse_ldif);
#  432|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:21: warning[-Wanalyzer-malloc-leak]: leak of ‘config_file’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:47:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:94:8: branch_false: following ‘false’ branch (when ‘argc == 1’)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:99:24: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:99:24: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:99:8: branch_false: following ‘false’ branch (when ‘config_file’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:104:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:104:5: call_function: calling ‘load_config’ from ‘main’
#  428|                   ber_len_t vlen;
#  429|                   /* Check if this is the cn=config entry */
#  430|->                 if (ldif_parse_line(ldif_getline(&entryp), &attr, &val, &vlen)) {
#  431|                       printf("ldap-agent: error parsing ldif line from [%s]\n", serv_p->dse_ldif);
#  432|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(conf_path, "r")’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:21: danger: ‘fopen(conf_path, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  428|                   ber_len_t vlen;
#  429|                   /* Check if this is the cn=config entry */
#  430|->                 if (ldif_parse_line(ldif_getline(&entryp), &attr, &val, &vlen)) {
#  431|                       printf("ldap-agent: error parsing ldif line from [%s]\n", serv_p->dse_ldif);
#  432|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:21: warning[-Wanalyzer-malloc-leak]: leak of ‘instancename’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:21: danger: ‘instancename’ leaks here; was allocated at [(23)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/22)
#  428|                   ber_len_t vlen;
#  429|                   /* Check if this is the cn=config entry */
#  430|->                 if (ldif_parse_line(ldif_getline(&entryp), &attr, &val, &vlen)) {
#  431|                       printf("ldap-agent: error parsing ldif line from [%s]\n", serv_p->dse_ldif);
#  432|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:21: warning[-Wanalyzer-malloc-leak]: leak of ‘serv_p’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:27: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:21: danger: ‘serv_p’ leaks here; was allocated at [(18)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/17)
#  428|                   ber_len_t vlen;
#  429|                   /* Check if this is the cn=config entry */
#  430|->                 if (ldif_parse_line(ldif_getline(&entryp), &attr, &val, &vlen)) {
#  431|                       printf("ldap-agent: error parsing ldif line from [%s]\n", serv_p->dse_ldif);
#  432|                   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def155]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:37: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(conf_path, "r")’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:37: danger: ‘fopen(conf_path, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#  428|                   ber_len_t vlen;
#  429|                   /* Check if this is the cn=config entry */
#  430|->                 if (ldif_parse_line(ldif_getline(&entryp), &attr, &val, &vlen)) {
#  431|                       printf("ldap-agent: error parsing ldif line from [%s]\n", serv_p->dse_ldif);
#  432|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:37: warning[-Wanalyzer-malloc-leak]: leak of ‘config_file’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:47:1: enter_function: entry to ‘main’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:94:8: branch_false: following ‘false’ branch (when ‘argc == 1’)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:99:24: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:99:24: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:99:8: branch_false: following ‘false’ branch (when ‘config_file’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:104:5: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:104:5: call_function: calling ‘load_config’ from ‘main’
#  428|                   ber_len_t vlen;
#  429|                   /* Check if this is the cn=config entry */
#  430|->                 if (ldif_parse_line(ldif_getline(&entryp), &attr, &val, &vlen)) {
#  431|                       printf("ldap-agent: error parsing ldif line from [%s]\n", serv_p->dse_ldif);
#  432|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:37: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(conf_path, "r")’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:37: danger: ‘fopen(conf_path, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#  428|                   ber_len_t vlen;
#  429|                   /* Check if this is the cn=config entry */
#  430|->                 if (ldif_parse_line(ldif_getline(&entryp), &attr, &val, &vlen)) {
#  431|                       printf("ldap-agent: error parsing ldif line from [%s]\n", serv_p->dse_ldif);
#  432|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def158]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:37: warning[-Wanalyzer-malloc-leak]: leak of ‘instancename’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:37: danger: ‘instancename’ leaks here; was allocated at [(23)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/22)
#  428|                   ber_len_t vlen;
#  429|                   /* Check if this is the cn=config entry */
#  430|->                 if (ldif_parse_line(ldif_getline(&entryp), &attr, &val, &vlen)) {
#  431|                       printf("ldap-agent: error parsing ldif line from [%s]\n", serv_p->dse_ldif);
#  432|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:37: warning[-Wanalyzer-malloc-leak]: leak of ‘serv_p’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:27: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:430:37: danger: ‘serv_p’ leaks here; was allocated at [(18)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/17)
#  428|                   ber_len_t vlen;
#  429|                   /* Check if this is the cn=config entry */
#  430|->                 if (ldif_parse_line(ldif_getline(&entryp), &attr, &val, &vlen)) {
#  431|                       printf("ldap-agent: error parsing ldif line from [%s]\n", serv_p->dse_ldif);
#  432|                   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def160]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:443:40: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(conf_path, "r")’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:443:40: danger: ‘fopen(conf_path, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
#  441|   
#  442|                       /* Look for port and rundir attributes */
#  443|->                     while ((dse_line = ldif_getline(&entryp)) != NULL) {
#  444|                           if (ldif_parse_line(dse_line, &attr, &val, &vlen) != 0) {
#  445|                               /* can't parse these, try next line instead */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:443:40: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(conf_path, "r")’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:443:40: danger: ‘fopen(conf_path, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
#  441|   
#  442|                       /* Look for port and rundir attributes */
#  443|->                     while ((dse_line = ldif_getline(&entryp)) != NULL) {
#  444|                           if (ldif_parse_line(dse_line, &attr, &val, &vlen) != 0) {
#  445|                               /* can't parse these, try next line instead */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:443:40: warning[-Wanalyzer-malloc-leak]: leak of ‘instancename’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:443:40: danger: ‘instancename’ leaks here; was allocated at [(23)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/22)
#  441|   
#  442|                       /* Look for port and rundir attributes */
#  443|->                     while ((dse_line = ldif_getline(&entryp)) != NULL) {
#  444|                           if (ldif_parse_line(dse_line, &attr, &val, &vlen) != 0) {
#  445|                               /* can't parse these, try next line instead */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def163]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:443:40: warning[-Wanalyzer-malloc-leak]: leak of ‘serv_p’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:27: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:443:40: danger: ‘serv_p’ leaks here; was allocated at [(18)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/17)
#  441|   
#  442|                       /* Look for port and rundir attributes */
#  443|->                     while ((dse_line = ldif_getline(&entryp)) != NULL) {
#  444|                           if (ldif_parse_line(dse_line, &attr, &val, &vlen) != 0) {
#  445|                               /* can't parse these, try next line instead */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def164]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:444:29: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(conf_path, "r")’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: acquire_resource: opened here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:443:28: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:444:29: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:444:29: danger: ‘fopen(conf_path, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
#  442|                       /* Look for port and rundir attributes */
#  443|                       while ((dse_line = ldif_getline(&entryp)) != NULL) {
#  444|->                         if (ldif_parse_line(dse_line, &attr, &val, &vlen) != 0) {
#  445|                               /* can't parse these, try next line instead */
#  446|                               continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:444:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(conf_path, "r")’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:443:28: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:444:29: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:444:29: danger: ‘fopen(conf_path, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
#  442|                       /* Look for port and rundir attributes */
#  443|                       while ((dse_line = ldif_getline(&entryp)) != NULL) {
#  444|->                         if (ldif_parse_line(dse_line, &attr, &val, &vlen) != 0) {
#  445|                               /* can't parse these, try next line instead */
#  446|                               continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:444:29: warning[-Wanalyzer-malloc-leak]: leak of ‘instancename’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:443:28: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:444:29: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:444:29: danger: ‘instancename’ leaks here; was allocated at [(23)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/22)
#  442|                       /* Look for port and rundir attributes */
#  443|                       while ((dse_line = ldif_getline(&entryp)) != NULL) {
#  444|->                         if (ldif_parse_line(dse_line, &attr, &val, &vlen) != 0) {
#  445|                               /* can't parse these, try next line instead */
#  446|                               continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
389-ds-base-3.1.3/ldap/servers/snmp/main.c:444:29: warning[-Wanalyzer-malloc-leak]: leak of ‘serv_p’
389-ds-base-3.1.3/ldap/servers/snmp/main.c:276:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:22: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:284:8: branch_false: following ‘false’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:20: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:291:8: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:293:9: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:321:12: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:323:13: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:326:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:336:19: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:25: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:349:19: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:354:19: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:27: acquire_memory: allocated here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:359:16: branch_false: following ‘false’ branch (when ‘serv_p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:366:13: branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:367:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:369:32: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:372:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:373:48: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:390:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:391:54: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:408:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:423:20: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:425:23: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:443:28: branch_true: following ‘true’ branch...
389-ds-base-3.1.3/ldap/servers/snmp/main.c:444:29: branch_true: ...to here
389-ds-base-3.1.3/ldap/servers/snmp/main.c:444:29: danger: ‘serv_p’ leaks here; was allocated at [(18)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/17)
#  442|                       /* Look for port and rundir attributes */
#  443|                       while ((dse_line = ldif_getline(&entryp)) != NULL) {
#  444|->                         if (ldif_parse_line(dse_line, &attr, &val, &vlen) != 0) {
#  445|                               /* can't parse these, try next line instead */
#  446|                               continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
389-ds-base-3.1.3/lib/ldaputil/certmap.c:412:26: warning[-Wanalyzer-malloc-leak]: leak of 'certinfo'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:1609:1: enter_function: entry to 'ldapu_certmap_init'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:1621:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:1624:10: branch_false: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:1624:10: call_function: calling 'certmap_read_certconfig_file' from 'ldapu_certmap_init'
#  410|   
#  411|       /* Parse the Issuer DN. */
#  412|->     certinfo->issuerDN = CERT_AsciiToName(db_info->url);
#  413|       if (NULL == certinfo->issuerDN                            /* invalid DN */
#  414|               && ldapu_strcasecmp(db_info->url, "default") != 0 /* not "default" */) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
389-ds-base-3.1.3/lib/ldaputil/certmap.c:414:16: warning[-Wanalyzer-malloc-leak]: leak of 'certinfo'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:1609:1: enter_function: entry to 'ldapu_certmap_init'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:1621:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:1624:10: branch_false: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:1624:10: call_function: calling 'certmap_read_certconfig_file' from 'ldapu_certmap_init'
#  412|       certinfo->issuerDN = CERT_AsciiToName(db_info->url);
#  413|       if (NULL == certinfo->issuerDN                            /* invalid DN */
#  414|->             && ldapu_strcasecmp(db_info->url, "default") != 0 /* not "default" */) {
#  415|           rv = LDAPU_ERR_MALFORMED_SUBJECT_DN;
#  416|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
389-ds-base-3.1.3/lib/ldaputil/certmap.c:573:10: warning[-Wanalyzer-malloc-leak]: leak of 'certinfo'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:1609:1: enter_function: entry to 'ldapu_certmap_init'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:1621:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:1624:10: branch_false: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:1624:10: call_function: calling 'certmap_read_certconfig_file' from 'ldapu_certmap_init'
#  571|       char *searchAttr = 0;
#  572|   
#  573|->     if (!ldapu_strcasecmp(certinfo->issuerName, "default")) {
#  574|           default_certmap_info = certinfo;
#  575|       } else if (!certinfo->issuerDN) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def171]
389-ds-base-3.1.3/lib/ldaputil/certmap.c:836:13: warning[-Wanalyzer-malloc-leak]: leak of 'ldapu_malloc((int)len)'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:801:1: enter_function: entry to 'ldapu_cert_searchfn_default'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:810:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:814:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:821:36: call_function: calling 'ldapu_malloc' from 'ldapu_cert_searchfn_default'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:821:36: return_function: returning to 'ldapu_cert_searchfn_default' from 'ldapu_malloc'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:822:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:826:28: branch_false: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:828:14: call_function: calling 'value2filter' from 'ldapu_cert_searchfn_default'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:828:14: return_function: returning to 'ldapu_cert_searchfn_default' from 'value2filter'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:831:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:836:13: branch_false: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:836:13: danger: 'ldapu_malloc((int)len)' leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
#  834|           }
#  835|   
#  836|->         if (ldapu_strcasecmp(basedn, "")) {
#  837|               rv = ldapu_find(ld, basedn, LDAP_SCOPE_SUBTREE, certFilter, attrs, 0, &single_res);
#  838|               ldapu_free((void *)certFilter);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def172]
389-ds-base-3.1.3/lib/ldaputil/certmap.c:837:18: warning[-Wanalyzer-malloc-leak]: leak of 'ldapu_malloc((int)len)'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:801:1: enter_function: entry to 'ldapu_cert_searchfn_default'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:810:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:814:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:821:36: call_function: calling 'ldapu_malloc' from 'ldapu_cert_searchfn_default'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:821:36: return_function: returning to 'ldapu_cert_searchfn_default' from 'ldapu_malloc'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:822:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:826:28: branch_false: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:828:14: call_function: calling 'value2filter' from 'ldapu_cert_searchfn_default'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:828:14: return_function: returning to 'ldapu_cert_searchfn_default' from 'value2filter'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:831:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:836:13: branch_false: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:836:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:837:18: branch_true: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:837:18: danger: 'ldapu_malloc((int)len)' leaks here; was allocated at [(8)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/7)
#  835|   
#  836|           if (ldapu_strcasecmp(basedn, "")) {
#  837|->             rv = ldapu_find(ld, basedn, LDAP_SCOPE_SUBTREE, certFilter, attrs, 0, &single_res);
#  838|               ldapu_free((void *)certFilter);
#  839|               if (rv == LDAPU_SUCCESS || rv == LDAPU_ERR_MULTIPLE_MATCHES) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def173]
389-ds-base-3.1.3/lib/ldaputil/certmap.c:841:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '*res'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:801:1: enter_function: entry to 'ldapu_cert_searchfn_default'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:810:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:814:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:821:36: call_function: calling 'ldapu_malloc' from 'ldapu_cert_searchfn_default'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:821:36: return_function: returning to 'ldapu_cert_searchfn_default' from 'ldapu_malloc'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:822:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:826:28: branch_false: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:831:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:836:13: branch_false: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:836:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:837:18: branch_true: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:838:13: call_function: calling 'ldapu_free' from 'ldapu_cert_searchfn_default'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:838:13: return_function: returning to 'ldapu_cert_searchfn_default' from 'ldapu_free'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:839:16: branch_true: following 'true' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:840:40: branch_true: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:840:40: call_function: calling 'ldapu_malloc' from 'ldapu_cert_searchfn_default'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:840:40: return_function: returning to 'ldapu_cert_searchfn_default' from 'ldapu_malloc'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:841:17: danger: 'ldapu_malloc(16)' could be NULL: unchecked value from [(27)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/26)
#  839|               if (rv == LDAPU_SUCCESS || rv == LDAPU_ERR_MULTIPLE_MATCHES) {
#  840|                   *res = (LDAPMessage **)ldapu_malloc(2 * sizeof(LDAPMessage *));
#  841|->                 (*res)[0] = single_res;
#  842|                   (*res)[1] = NULL;
#  843|                   return rv;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def174]
389-ds-base-3.1.3/lib/ldaputil/certmap.c:849:18: warning[-Wanalyzer-malloc-leak]: leak of 'ldapu_malloc((int)len)'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:801:1: enter_function: entry to 'ldapu_cert_searchfn_default'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:810:8: branch_true: following 'true' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:814:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:821:36: call_function: calling 'ldapu_malloc' from 'ldapu_cert_searchfn_default'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:821:36: return_function: returning to 'ldapu_cert_searchfn_default' from 'ldapu_malloc'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:822:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:826:28: branch_false: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:828:14: call_function: calling 'value2filter' from 'ldapu_cert_searchfn_default'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:828:14: return_function: returning to 'ldapu_cert_searchfn_default' from 'value2filter'
389-ds-base-3.1.3/lib/ldaputil/certmap.c:831:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:836:13: branch_false: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:836:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/lib/ldaputil/certmap.c:849:18: branch_false: ...to here
389-ds-base-3.1.3/lib/ldaputil/certmap.c:849:18: danger: 'ldapu_malloc((int)len)' leaks here; was allocated at [(8)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/7)
#  847|               }
#  848|           } else {
#  849|->             rv = ldapu_find_entire_tree(ld, LDAP_SCOPE_SUBTREE, certFilter, attrs, 0, &multiple_res);
#  850|               ldapu_free((void *)certFilter);
#  851|               if (rv == LDAPU_SUCCESS || rv == LDAPU_ERR_MULTIPLE_MATCHES) {

Error: CPPCHECK_WARNING (CWE-682): [#def175]
389-ds-base-3.1.3/lib/ldaputil/dbconf.c:655: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  653|   
#  654|       dbnames = (char **)malloc(32 * 1024);
#  655|->     heap = (char *)dbnames + 2 * 1024;
#  656|   
#  657|       if (!dbnames) {

Error: CPPCHECK_WARNING (CWE-457): [#def176]
389-ds-base-3.1.3/lib/libaccess/access_plhash.cpp:49: error[uninitvar]: Uninitialized variable: *hep
#   47|       h >>= ht->shift;
#   48|       hep = &ht->buckets[h];
#   49|->     while ((he = *hep) != 0) {
#   50|           if (he->keyHash == keyHash && (*ht->keyCompare)(key, he->key)) {
#   51|               return hep;

Error: CPPCHECK_WARNING (CWE-457): [#def177]
389-ds-base-3.1.3/lib/libaccess/acleval.cpp:95: warning[uninitvar]: Uninitialized variable: rv
#   93|   
#   94|       /* One more possibility if nothing found yet... */
#   95|->     if (rv) {
#   96|   	rv = symTableFindSym(table, "*", 0, (void **)&sym);
#   97|       }

Error: CPPCHECK_WARNING (CWE-476): [#def178]
389-ds-base-3.1.3/lib/libsi18n/reshash.c:51: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pvalue
#   49|       }
#   50|       pvalue = (ValueNode *)malloc(sizeof(ValueNode));
#   51|->     memset(pvalue, 0, sizeof(ValueNode));
#   52|   
#   53|       prev->next = pvalue;

Error: CPPCHECK_WARNING (CWE-476): [#def179]
389-ds-base-3.1.3/lib/libsi18n/reshash.c:55: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pvalue
#   53|       prev->next = pvalue;
#   54|   
#   55|->     pvalue->language = strdup(language);
#   56|       pvalue->value = strdup(value);
#   57|       return 0;

Error: CPPCHECK_WARNING (CWE-476): [#def180]
389-ds-base-3.1.3/lib/libsi18n/reshash.c:56: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pvalue
#   54|   
#   55|       pvalue->language = strdup(language);
#   56|->     pvalue->value = strdup(value);
#   57|       return 0;
#   58|   }

Error: CPPCHECK_WARNING (CWE-476): [#def181]
389-ds-base-3.1.3/lib/libsi18n/reshash.c:152: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: node
#  150|                */
#  151|               node = (TreeNode *)malloc(sizeof(TreeNode));
#  152|->             memset(node, 0, sizeof(TreeNode));
#  153|               vnode = (ValueNode *)malloc(sizeof(ValueNode));
#  154|               memset(vnode, 0, sizeof(ValueNode));

Error: CPPCHECK_WARNING (CWE-476): [#def182]
389-ds-base-3.1.3/lib/libsi18n/reshash.c:154: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vnode
#  152|               memset(node, 0, sizeof(TreeNode));
#  153|               vnode = (ValueNode *)malloc(sizeof(ValueNode));
#  154|->             memset(vnode, 0, sizeof(ValueNode));
#  155|               node->vlist = vnode;
#  156|   

Error: CPPCHECK_WARNING (CWE-476): [#def183]
389-ds-base-3.1.3/lib/libsi18n/reshash.c:155: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: node
#  153|               vnode = (ValueNode *)malloc(sizeof(ValueNode));
#  154|               memset(vnode, 0, sizeof(ValueNode));
#  155|->             node->vlist = vnode;
#  156|   
#  157|               res->right = node;

Error: CPPCHECK_WARNING (CWE-476): [#def184]
389-ds-base-3.1.3/lib/libsi18n/reshash.c:160: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: node
#  158|   
#  159|               /* assign value to node */
#  160|->             node->key = strdup(key);
#  161|               if (language == NULL)
#  162|                   node->value = strdup(value);

Error: CPPCHECK_WARNING (CWE-476): [#def185]
389-ds-base-3.1.3/lib/libsi18n/reshash.c:162: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: node
#  160|               node->key = strdup(key);
#  161|               if (language == NULL)
#  162|->                 node->value = strdup(value);
#  163|               else
#  164|                   ValueAddLanguageItem(node->vlist, value, language);

Error: CPPCHECK_WARNING (CWE-476): [#def186]
389-ds-base-3.1.3/lib/libsi18n/reshash.c:164: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: node
#  162|                   node->value = strdup(value);
#  163|               else
#  164|->                 ValueAddLanguageItem(node->vlist, value, language);
#  165|           } else {
#  166|               return TreeAddItem(res->right, key, value, language);

Error: CPPCHECK_WARNING (CWE-476): [#def187]
389-ds-base-3.1.3/lib/libsi18n/reshash.c:171: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: node
#  169|           if (res->left == NULL) {
#  170|               node = (TreeNode *)malloc(sizeof(TreeNode));
#  171|->             memset(node, 0, sizeof(TreeNode));
#  172|               vnode = (ValueNode *)malloc(sizeof(ValueNode));
#  173|               memset(vnode, 0, sizeof(ValueNode));

Error: CPPCHECK_WARNING (CWE-476): [#def188]
389-ds-base-3.1.3/lib/libsi18n/reshash.c:173: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vnode
#  171|               memset(node, 0, sizeof(TreeNode));
#  172|               vnode = (ValueNode *)malloc(sizeof(ValueNode));
#  173|->             memset(vnode, 0, sizeof(ValueNode));
#  174|               node->vlist = vnode;
#  175|   

Error: CPPCHECK_WARNING (CWE-476): [#def189]
389-ds-base-3.1.3/lib/libsi18n/reshash.c:174: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: node
#  172|               vnode = (ValueNode *)malloc(sizeof(ValueNode));
#  173|               memset(vnode, 0, sizeof(ValueNode));
#  174|->             node->vlist = vnode;
#  175|   
#  176|               res->left = node;

Error: CPPCHECK_WARNING (CWE-476): [#def190]
389-ds-base-3.1.3/lib/libsi18n/reshash.c:179: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: node
#  177|   
#  178|               /* assign value to node */
#  179|->             node->key = strdup(key);
#  180|               if (language == NULL)
#  181|                   node->value = strdup(value);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
389-ds-base-3.1.3/src/svrcore/src/cache.c:149:15: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
389-ds-base-3.1.3/src/svrcore/src/cache.c:124:9: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/cache.c:129:11: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/cache.c:131:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/cache.c:139:21: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/cache.c:140:10: branch_false: following 'false' branch (when 'node' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/cache.c:143:7: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/cache.c:146:27: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/cache.c:147:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/cache.c:149:15: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/cache.c:149:15: danger: '<unknown>' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  147|           if (!node->tokenName) { err = SVRCORE_NoMemory_Error; break; }
#  148|   
#  149|->         err = SVRCORE_CreatePk11PinStore(&node->store, tokenName, pin);
#  150|         } while(0);
#  151|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
389-ds-base-3.1.3/src/svrcore/src/cache.c:149:15: warning[-Wanalyzer-malloc-leak]: leak of 'node'
389-ds-base-3.1.3/src/svrcore/src/cache.c:124:9: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/cache.c:129:11: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/cache.c:131:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/cache.c:139:21: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/cache.c:139:21: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/cache.c:140:10: branch_false: following 'false' branch (when 'node' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/cache.c:143:7: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/cache.c:147:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/cache.c:149:15: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/cache.c:149:15: danger: 'node' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  147|           if (!node->tokenName) { err = SVRCORE_NoMemory_Error; break; }
#  148|   
#  149|->         err = SVRCORE_CreatePk11PinStore(&node->store, tokenName, pin);
#  150|         } while(0);
#  151|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:98:19: warning[-Wanalyzer-malloc-leak]: leak of 'store'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:88:35: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:98:19: danger: 'store' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   96|   
#   97|       /* Use the tokenName to find a PKCS11 slot */
#   98|->     store->slot = PK11_FindSlotByName((char *)tokenName);
#   99|       if (store->slot == 0) { err = SVRCORE_NoSuchToken_Error; break; }
#  100|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: warning[-Wanalyzer-malloc-leak]: leak of 'store'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:88:35: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: danger: 'store' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  101|       /* Check the password/PIN.  This allows access to the token */
#  102|       {
#  103|->       SECStatus rv = PK11_CheckUserPassword(store->slot, (char *)pin);
#  104|   
#  105|         if (rv == SECSuccess)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:126:13: warning[-Wanalyzer-malloc-leak]: leak of 'store'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:88:35: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:124:22: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:126:45: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:126:13: danger: 'store' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  124|         for(tp = table;tp < &table[MECH_TABLE_SIZE];tp++)
#  125|         {
#  126|->         if (PK11_DoesMechanism(store->slot, tp->type))
#  127|           {
#  128|             store->mech = tp;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:138:18: warning[-Wanalyzer-malloc-leak]: leak of 'store'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:88:35: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:138:18: danger: 'store' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  136|   
#  137|       /* Generate a key and parameters to do the encryption */
#  138|->     store->key = PK11_TokenKeyGenWithFlags(store->slot, store->mech->type,
#  139|                    0, 0, 0, CKF_ENCRYPT|CKF_DECRYPT,
#  140|                    0, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:21: warning[-Wanalyzer-malloc-leak]: leak of 'store'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:88:35: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:21: danger: 'store' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  146|       }
#  147|   
#  148|->     store->params = PK11_GenerateNewParam(store->mech->type, store->key);
#  149|       if (store->params == 0)
#  150|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def198]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:23: warning[-Wanalyzer-malloc-leak]: leak of 'store'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:88:35: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:149:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:41: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:23: danger: 'store' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  155|       /* Compute the size of the encrypted data including necessary padding */
#  156|       {
#  157|->       int blocksize = PK11_GetBlockSize(store->mech->type, 0);
#  158|   
#  159|         store->length = strlen(pin)+1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:185:13: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:149:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:41: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:162:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:167:46: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:167:39: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:168:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:179:10: branch_false: following 'false' branch (when 'plain' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:182:7: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:185:13: danger: '<unknown>' leaks here; was allocated at [(15)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/14)
#  183|         strcpy((char *)plain, pin);
#  184|   
#  185|->       ctx = PK11_CreateContextBySymKey(store->mech->type, CKA_ENCRYPT,
#  186|                 store->key, store->params);
#  187|         if (!ctx) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:185:13: warning[-Wanalyzer-malloc-leak]: leak of 'plain'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:149:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:41: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:162:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:167:46: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:168:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:179:10: branch_false: following 'false' branch (when 'plain' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:182:7: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:185:13: danger: 'plain' leaks here; was allocated at [(17)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/16)
#  183|         strcpy((char *)plain, pin);
#  184|   
#  185|->       ctx = PK11_CreateContextBySymKey(store->mech->type, CKA_ENCRYPT,
#  186|                 store->key, store->params);
#  187|         if (!ctx) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def201]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:185:13: warning[-Wanalyzer-malloc-leak]: leak of 'store'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:88:35: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:149:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:41: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:162:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:167:46: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:168:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:179:10: branch_false: following 'false' branch (when 'plain' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:182:7: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:185:13: danger: 'store' leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  183|         strcpy((char *)plain, pin);
#  184|   
#  185|->       ctx = PK11_CreateContextBySymKey(store->mech->type, CKA_ENCRYPT,
#  186|                 store->key, store->params);
#  187|         if (!ctx) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:149:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:41: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:162:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:167:46: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:167:39: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:168:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:179:10: branch_false: following 'false' branch (when 'plain' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:182:7: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:187:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: danger: '<unknown>' leaks here; was allocated at [(15)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/14)
#  192|   
#  193|         do {
#  194|->         rv = PK11_CipherOp(ctx, store->crypt, &outLen, store->length,
#  195|                  plain, store->length);
#  196|           if (rv) break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def203]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: warning[-Wanalyzer-malloc-leak]: leak of 'plain'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:149:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:41: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:162:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:167:46: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:168:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:179:10: branch_false: following 'false' branch (when 'plain' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:182:7: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:187:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: danger: 'plain' leaks here; was allocated at [(17)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/16)
#  192|   
#  193|         do {
#  194|->         rv = PK11_CipherOp(ctx, store->crypt, &outLen, store->length,
#  195|                  plain, store->length);
#  196|           if (rv) break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def204]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: warning[-Wanalyzer-malloc-leak]: leak of 'store'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:88:35: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:149:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:41: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:162:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:167:46: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:168:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:179:10: branch_false: following 'false' branch (when 'plain' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:182:7: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:187:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: danger: 'store' leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  192|   
#  193|         do {
#  194|->         rv = PK11_CipherOp(ctx, store->crypt, &outLen, store->length,
#  195|                  plain, store->length);
#  196|           if (rv) break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def205]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:198:14: warning[-Wanalyzer-malloc-leak]: leak of 'plain'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:149:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:41: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:162:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:167:46: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:168:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:179:10: branch_false: following 'false' branch (when 'plain' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:182:7: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:187:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:196:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:198:14: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:198:14: danger: 'plain' leaks here; was allocated at [(17)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/16)
#  196|           if (rv) break;
#  197|   
#  198|->         rv = PK11_Finalize(ctx);
#  199|         } while(0);
#  200|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def206]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:198:14: warning[-Wanalyzer-malloc-leak]: leak of 'store'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:88:35: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:149:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:41: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:162:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:167:46: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:168:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:179:10: branch_false: following 'false' branch (when 'plain' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:182:7: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:187:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:196:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:198:14: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:198:14: danger: 'store' leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  196|           if (rv) break;
#  197|   
#  198|->         rv = PK11_Finalize(ctx);
#  199|         } while(0);
#  200|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def207]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:201:7: warning[-Wanalyzer-malloc-leak]: leak of 'plain'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:149:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:41: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:162:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:167:46: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:168:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:179:10: branch_false: following 'false' branch (when 'plain' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:182:7: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:187:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:196:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:201:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:201:7: danger: 'plain' leaks here; was allocated at [(17)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/16)
#  199|         } while(0);
#  200|   
#  201|->       PK11_DestroyContext(ctx, PR_TRUE);
#  202|         memset(plain, 0, store->length);
#  203|         free(plain);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:201:7: warning[-Wanalyzer-malloc-leak]: leak of 'store'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:88:35: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:149:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:41: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:162:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:167:46: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:168:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:179:10: branch_false: following 'false' branch (when 'plain' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:182:7: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:187:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:196:12: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:201:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:201:7: danger: 'store' leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  199|         } while(0);
#  200|   
#  201|->       PK11_DestroyContext(ctx, PR_TRUE);
#  202|         memset(plain, 0, store->length);
#  203|         free(plain);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:229:5: warning[-Wanalyzer-malloc-leak]: leak of 'store'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:78:1: enter_function: entry to 'SVRCORE_CreatePk11PinStore'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:88:35: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:107:15: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:211:5: call_function: calling 'SVRCORE_DestroyPk11PinStore' from 'SVRCORE_CreatePk11PinStore'
#  227|     if (store->slot)
#  228|     {
#  229|->     PK11_FreeSlot(store->slot);
#  230|     }
#  231|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:234:5: warning[-Wanalyzer-malloc-leak]: leak of 'store'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:78:1: enter_function: entry to 'SVRCORE_CreatePk11PinStore'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:88:35: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:149:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:157:41: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:162:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:167:46: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:168:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:178:32: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:179:10: branch_false: following 'false' branch (when 'plain' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:182:7: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:187:10: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:194:14: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:205:10: branch_true: following 'true' branch (when 'rv != 0')...
 branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:211:5: call_function: calling 'SVRCORE_DestroyPk11PinStore' from 'SVRCORE_CreatePk11PinStore'
#  232|     if (store->params)
#  233|     {
#  234|->     SECITEM_ZfreeItem(store->params, PR_TRUE);
#  235|     }
#  236|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:239:5: warning[-Wanalyzer-malloc-leak]: leak of 'store'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:78:1: enter_function: entry to 'SVRCORE_CreatePk11PinStore'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:88:35: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:89:8: branch_false: following 'false' branch (when 'store' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:92:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:99:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:103:22: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:105:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:123:7: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:133:10: branch_true: following 'true' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:134:9: branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:141:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:148:43: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:149:8: branch_true: following 'true' branch...
 branch_true: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:211:5: call_function: calling 'SVRCORE_DestroyPk11PinStore' from 'SVRCORE_CreatePk11PinStore'
#  237|     if (store->key)
#  238|     {
#  239|->     PK11_FreeSymKey(store->key);
#  240|     }
#  241|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:264:11: warning[-Wanalyzer-malloc-leak]: leak of 'plain'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:261:30: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:262:8: branch_false: following 'false' branch (when 'plain' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:265:27: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:264:11: danger: 'plain' leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  262|       if (!plain) { err = SVRCORE_NoMemory_Error; break; }
#  263|   
#  264|->     ctx = PK11_CreateContextBySymKey(store->mech->type, CKA_DECRYPT,
#  265|                 store->key, store->params);
#  266|       if (!ctx) { err = SVRCORE_System_Error; break; }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def213]
389-ds-base-3.1.3/src/svrcore/src/pk11.c:268:10: warning[-Wanalyzer-malloc-leak]: leak of 'plain'
389-ds-base-3.1.3/src/svrcore/src/pk11.c:261:30: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:262:8: branch_false: following 'false' branch (when 'plain' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:265:27: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:266:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/pk11.c:268:10: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/pk11.c:268:10: danger: 'plain' leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  266|       if (!ctx) { err = SVRCORE_System_Error; break; }
#  267|   
#  268|->     rv = PK11_CipherOp(ctx, plain, &outLen, store->length,
#  269|              store->crypt, store->length);
#  270|       if (rv) break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
389-ds-base-3.1.3/src/svrcore/src/std-systemd.c:78:15: warning[-Wanalyzer-malloc-leak]: leak of 'obj'
389-ds-base-3.1.3/src/svrcore/src/std-systemd.c:66:42: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/std-systemd.c:67:12: branch_false: following 'false' branch (when 'obj' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/std-systemd.c:69:9: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/std-systemd.c:78:15: danger: 'obj' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   76|           obj->systemd = 0;
#   77|   
#   78|->         err = SVRCORE_CreateUserPinObj(&obj->user);
#   79|           if (err) {
#   80|               break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
389-ds-base-3.1.3/src/svrcore/src/std.c:62:11: warning[-Wanalyzer-malloc-leak]: leak of 'obj'
389-ds-base-3.1.3/src/svrcore/src/std.c:52:31: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/std.c:53:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
389-ds-base-3.1.3/src/svrcore/src/std.c:55:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/std.c:62:11: danger: 'obj' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   60|       obj->user = 0;
#   61|   
#   62|->     err = SVRCORE_CreateUserPinObj(&obj->user);
#   63|       if (err) break;
#   64|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:357:21: warning[-Wanalyzer-malloc-leak]: leak of 'tbuf'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:169:1: enter_function: entry to 'getPin'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:173:18: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:185:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:190:17: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:196:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:219:7: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:235:9: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:254:11: call_function: calling '_create_socket' from 'getPin'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:254:11: return_function: returning to 'getPin' from '_create_socket'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:255:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:267:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:270:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:281:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:308:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:330:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:336:13: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:336:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:344:9: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:357:21: danger: 'tbuf' leaks here; was allocated at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
#  355|           msghdr.msg_controllen = sizeof(control);
#  356|   
#  357|->         data_size = recvmsg(socket_fd, &msghdr, 0);
#  358|           // Check if data_size is 0, then check errno
#  359|           if (data_size < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def217]
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:357:21: warning[-Wanalyzer-malloc-leak]: leak of 'token'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:169:1: enter_function: entry to 'getPin'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:174:19: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:185:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:190:17: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:196:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:219:7: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:235:9: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:254:11: call_function: calling '_create_socket' from 'getPin'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:254:11: return_function: returning to 'getPin' from '_create_socket'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:255:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:267:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:270:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:281:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:308:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:330:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:336:13: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:336:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:344:9: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:357:21: danger: 'token' leaks here; was allocated at [(2)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/1)
#  355|           msghdr.msg_controllen = sizeof(control);
#  356|   
#  357|->         data_size = recvmsg(socket_fd, &msghdr, 0);
#  358|           // Check if data_size is 0, then check errno
#  359|           if (data_size < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:381:13: warning[-Wanalyzer-malloc-leak]: leak of 'token'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:169:1: enter_function: entry to 'getPin'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:174:19: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:185:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:190:17: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:196:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:219:7: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:235:9: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:254:11: call_function: calling '_create_socket' from 'getPin'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:254:11: return_function: returning to 'getPin' from '_create_socket'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:255:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:267:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:270:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:281:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:308:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:330:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:336:13: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:336:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:344:9: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:381:13: danger: 'token' leaks here; was allocated at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
#  379|               printf("systemd:getPin() -> Unauthenticated message \n");
#  380|   #endif
#  381|->             sleep(2);
#  382|               continue;
#  383|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:390:13: warning[-Wanalyzer-malloc-leak]: leak of 'token'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:169:1: enter_function: entry to 'getPin'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:174:19: acquire_memory: allocated here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:185:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:190:17: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:196:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:219:7: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:235:9: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:254:11: call_function: calling '_create_socket' from 'getPin'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:254:11: return_function: returning to 'getPin' from '_create_socket'
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:255:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:267:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:270:8: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:281:5: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:308:8: branch_false: following 'false' branch...
 branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:330:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:336:13: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:336:12: branch_false: following 'false' branch...
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:344:9: branch_false: ...to here
389-ds-base-3.1.3/src/svrcore/src/systemd-ask-pass.c:390:13: danger: 'token' leaks here; was allocated at [(2)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/1)
#  388|               printf("systemd:getPin() -> Response not by root \n");
#  389|   #endif
#  390|->             sleep(2);
#  391|               continue;
#  392|           }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def220]
jemalloc-5.3.0/include/jemalloc/internal/emitter.h:93:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
jemalloc-5.3.0/include/jemalloc/internal/emitter.h:305:1: enter_function: entry to ‘emitter_json_array_end’
jemalloc-5.3.0/include/jemalloc/internal/emitter.h:313:17: call_function: calling ‘emitter_printf’ from ‘emitter_json_array_end’
#   91|   
#   92|   	va_start(ap, format);
#   93|-> 	malloc_vcprintf(emitter->write_cb, emitter->cbopaque, format, ap);
#   94|   	va_end(ap);
#   95|   }

Error: CPPCHECK_WARNING (CWE-786): [#def221]
jemalloc-5.3.0/include/jemalloc/internal/rtree.h:404: error[negativeIndex]: Array 'rtree_ctx->l2_cache[8]' accessed at index -1, which is out of bounds.
#  402|   } while (0)
#  403|   	/* Check the first cache entry. */
#  404|-> 	RTREE_CACHE_CHECK_L2(0);
#  405|   	/* Search the remaining cache elements. */
#  406|   	for (unsigned i = 1; i < RTREE_CTX_NCACHE_L2; i++) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def222]
jemalloc-5.3.0/src/extent.c:869:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘coalesced’
jemalloc-5.3.0/src/extent.c:1028:1: enter_function: entry to ‘extent_dalloc_wrapper’
jemalloc-5.3.0/src/extent.c:1035:12: branch_true: following ‘true’ branch...
jemalloc-5.3.0/src/extent.c:1055:14: call_function: inlined call to ‘edata_committed_get’ from ‘extent_dalloc_wrapper’
jemalloc-5.3.0/src/extent.c:1076:9: call_function: calling ‘extent_record’ from ‘extent_dalloc_wrapper’
#  867|   
#  868|   	if (ecache->delay_coalesce) {
#  869|-> 		*coalesced = false;
#  870|   	}
#  871|   	return edata;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def223]
jemalloc-5.3.0/src/hook.c:15:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘buf[i]’
jemalloc-5.3.0/src/hook.c:73:1: enter_function: entry to ‘hook_remove’
jemalloc-5.3.0/src/hook.c:82:9: call_function: calling ‘hook_remove_locked’ from ‘hook_remove’
#   13|   };
#   14|   
#   15|-> seq_define(hooks_internal_t, hooks)
#   16|   
#   17|   static atomic_u_t nhooks = ATOMIC_INIT(0);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def224]
jemalloc-5.3.0/src/hook.c:34:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘hooks_internal.in_use’
jemalloc-5.3.0/src/hook.c:48:1: enter_function: entry to ‘hook_install’
jemalloc-5.3.0/src/hook.c:49:9: call_function: calling ‘malloc_mutex_lock’ from ‘hook_install’
jemalloc-5.3.0/src/hook.c:49:9: return_function: returning to ‘hook_install’ from ‘malloc_mutex_lock’
jemalloc-5.3.0/src/hook.c:50:21: call_function: calling ‘hook_install_locked’ from ‘hook_install’
#   32|   		/* We hold mu; no concurrent access. */
#   33|   		assert(success);
#   34|-> 		if (!hooks_internal.in_use) {
#   35|   			hooks_internal.hooks = *to_install;
#   36|   			hooks_internal.in_use = true;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def225]
jemalloc-5.3.0/src/log.c:16:35: warning[-Wanalyzer-out-of-bounds]: buffer over-read
jemalloc-5.3.0/src/log.c:44:1: enter_function: entry to ‘log_var_update_state’
jemalloc-5.3.0/src/log.c:55:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
jemalloc-5.3.0/src/log.c:60:43: call_function: inlined call to ‘log_var_extract_segment’ from ‘log_var_update_state’
jemalloc-5.3.0/src/log.c:63:21: branch_false: ...to here
jemalloc-5.3.0/src/log.c:63:21: call_function: calling ‘log_var_matches_segment’ from ‘log_var_update_state’
jemalloc-5.3.0/src/log.c:63:21: return_function: returning to ‘log_var_update_state’ from ‘log_var_matches_segment’
jemalloc-5.3.0/src/log.c:63:20: branch_false: following ‘false’ branch...
jemalloc-5.3.0/src/log.c:69:20: branch_false: ...to here
jemalloc-5.3.0/src/log.c:69:20: branch_false: following ‘false’ branch...
jemalloc-5.3.0/src/log.c:76:17: branch_false: ...to here
jemalloc-5.3.0/src/log.c:60:43: call_function: inlined call to ‘log_var_extract_segment’ from ‘log_var_update_state’
#   14|   log_var_extract_segment(const char* segment_begin) {
#   15|   	const char *end;
#   16|-> 	for (end = segment_begin; *end != '\0' && *end != '|'; end++) {
#   17|   	}
#   18|   	return end;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def226]
jemalloc-5.3.0/src/log.c:30:33: warning[-Wanalyzer-out-of-bounds]: buffer over-read
jemalloc-5.3.0/src/log.c:44:1: enter_function: entry to ‘log_var_update_state’
jemalloc-5.3.0/src/log.c:55:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
jemalloc-5.3.0/src/log.c:60:43: call_function: inlined call to ‘log_var_extract_segment’ from ‘log_var_update_state’
jemalloc-5.3.0/src/log.c:63:21: branch_false: ...to here
jemalloc-5.3.0/src/log.c:63:21: call_function: calling ‘log_var_matches_segment’ from ‘log_var_update_state’
jemalloc-5.3.0/src/log.c:63:21: return_function: returning to ‘log_var_update_state’ from ‘log_var_matches_segment’
jemalloc-5.3.0/src/log.c:63:20: branch_false: following ‘false’ branch...
jemalloc-5.3.0/src/log.c:69:20: branch_false: ...to here
jemalloc-5.3.0/src/log.c:69:20: branch_false: following ‘false’ branch...
jemalloc-5.3.0/src/log.c:76:17: branch_false: ...to here
jemalloc-5.3.0/src/log.c:60:43: call_function: inlined call to ‘log_var_extract_segment’ from ‘log_var_update_state’
jemalloc-5.3.0/src/log.c:63:21: branch_false: ...to here
jemalloc-5.3.0/src/log.c:63:21: call_function: calling ‘log_var_matches_segment’ from ‘log_var_update_state’
#   28|   	ptrdiff_t log_var_len = log_var_end - log_var_begin;
#   29|   	/* The special '.' segment matches everything. */
#   30|-> 	if (segment_len == 1 && *segment_begin == '.') {
#   31|   		return true;
#   32|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def227]
jemalloc-5.3.0/src/malloc_io.c:661:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
jemalloc-5.3.0/src/malloc_io.c:681:1: enter_function: entry to ‘malloc_printf’
jemalloc-5.3.0/src/malloc_io.c:684:9: acquire_resource: ‘va_start’ called here
jemalloc-5.3.0/src/malloc_io.c:685:9: call_function: calling ‘malloc_vcprintf’ from ‘malloc_printf’
#  659|   
#  660|   	malloc_vsnprintf(buf, sizeof(buf), format, ap);
#  661|-> 	write_cb(cbopaque, buf);
#  662|   }
#  663|   

Error: CPPCHECK_WARNING (CWE-476): [#def228]
jemalloc-5.3.0/src/prof_data.c:70: error[ctunullpointer]: Null pointer dereference: a
#   68|   static int
#   69|   prof_tctx_comp(const prof_tctx_t *a, const prof_tctx_t *b) {
#   70|-> 	uint64_t a_thr_uid = a->thr_uid;
#   71|   	uint64_t b_thr_uid = b->thr_uid;
#   72|   	int ret = (a_thr_uid > b_thr_uid) - (a_thr_uid < b_thr_uid);

Error: CPPCHECK_WARNING (CWE-476): [#def229]
jemalloc-5.3.0/src/prof_data.c:88: error[ctunullpointer]: Null pointer dereference: node
#   86|   }
#   87|   
#   88|-> rb_gen(static UNUSED, tctx_tree_, prof_tctx_tree_t, prof_tctx_t,
#   89|       tctx_link, prof_tctx_comp)
#   90|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def230]
jemalloc-5.3.0/src/prof_data.c:88:1: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘nodep’
jemalloc-5.3.0/src/prof_data.c:1346:1: enter_function: entry to ‘prof_tctx_destroy’
jemalloc-5.3.0/src/prof_data.c:1376:38: call_function: inlined call to ‘prof_tdata_should_destroy’ from ‘prof_tctx_destroy’
jemalloc-5.3.0/src/prof_data.c:1376:38: call_function: inlined call to ‘prof_tdata_should_destroy’ from ‘prof_tctx_destroy’
jemalloc-5.3.0/src/prof_data.c:1379:20: branch_false: following ‘false’ branch...
jemalloc-5.3.0/src/prof_data.c:1386:9: branch_false: ...to here
jemalloc-5.3.0/src/prof_data.c:1389:17: call_function: calling ‘tctx_tree_remove’ from ‘prof_tctx_destroy’
#   86|   }
#   87|   
#   88|-> rb_gen(static UNUSED, tctx_tree_, prof_tctx_tree_t, prof_tctx_t,
#   89|       tctx_link, prof_tctx_comp)
#   90|   

Error: GCC_ANALYZER_WARNING (CWE-127): [#def231]
jemalloc-5.3.0/src/prof_data.c:88:1: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
jemalloc-5.3.0/src/prof_data.c:1346:1: enter_function: entry to ‘prof_tctx_destroy’
jemalloc-5.3.0/src/prof_data.c:1376:38: call_function: inlined call to ‘prof_tdata_should_destroy’ from ‘prof_tctx_destroy’
jemalloc-5.3.0/src/prof_data.c:1376:38: call_function: inlined call to ‘prof_tdata_should_destroy’ from ‘prof_tctx_destroy’
jemalloc-5.3.0/src/prof_data.c:1379:20: branch_false: following ‘false’ branch...
jemalloc-5.3.0/src/prof_data.c:1386:9: branch_false: ...to here
jemalloc-5.3.0/src/prof_data.c:1389:17: call_function: calling ‘tctx_tree_remove’ from ‘prof_tctx_destroy’
#   86|   }
#   87|   
#   88|-> rb_gen(static UNUSED, tctx_tree_, prof_tctx_tree_t, prof_tctx_t,
#   89|       tctx_link, prof_tctx_comp)
#   90|   

Error: GCC_ANALYZER_WARNING (CWE-124): [#def232]
jemalloc-5.3.0/src/prof_data.c:88:1: warning[-Wanalyzer-out-of-bounds]: stack-based buffer underwrite
jemalloc-5.3.0/src/prof_data.c:1346:1: enter_function: entry to ‘prof_tctx_destroy’
jemalloc-5.3.0/src/prof_data.c:1376:38: call_function: inlined call to ‘prof_tdata_should_destroy’ from ‘prof_tctx_destroy’
jemalloc-5.3.0/src/prof_data.c:1376:38: call_function: inlined call to ‘prof_tdata_should_destroy’ from ‘prof_tctx_destroy’
jemalloc-5.3.0/src/prof_data.c:1379:20: branch_false: following ‘false’ branch...
jemalloc-5.3.0/src/prof_data.c:1386:9: branch_false: ...to here
jemalloc-5.3.0/src/prof_data.c:1389:17: call_function: calling ‘tctx_tree_remove’ from ‘prof_tctx_destroy’
#   86|   }
#   87|   
#   88|-> rb_gen(static UNUSED, tctx_tree_, prof_tctx_tree_t, prof_tctx_t,
#   89|       tctx_link, prof_tctx_comp)
#   90|   

Error: CPPCHECK_WARNING (CWE-476): [#def233]
jemalloc-5.3.0/src/prof_data.c:93: error[ctunullpointer]: Null pointer dereference: a
#   91|   static int
#   92|   prof_gctx_comp(const prof_gctx_t *a, const prof_gctx_t *b) {
#   93|-> 	unsigned a_len = a->bt.len;
#   94|   	unsigned b_len = b->bt.len;
#   95|   	unsigned comp_len = (a_len < b_len) ? a_len : b_len;

Error: CPPCHECK_WARNING (CWE-476): [#def234]
jemalloc-5.3.0/src/prof_data.c:103: error[ctunullpointer]: Null pointer dereference: node
#  101|   }
#  102|   
#  103|-> rb_gen(static UNUSED, gctx_tree_, prof_gctx_tree_t, prof_gctx_t, dump_link,
#  104|       prof_gctx_comp)
#  105|   

Error: CPPCHECK_WARNING (CWE-476): [#def235]
jemalloc-5.3.0/src/prof_data.c:109: error[ctunullpointer]: Null pointer dereference: a
#  107|   prof_tdata_comp(const prof_tdata_t *a, const prof_tdata_t *b) {
#  108|   	int ret;
#  109|-> 	uint64_t a_uid = a->thr_uid;
#  110|   	uint64_t b_uid = b->thr_uid;
#  111|   

Error: CPPCHECK_WARNING (CWE-476): [#def236]
jemalloc-5.3.0/src/prof_data.c:122: error[ctunullpointer]: Null pointer dereference: node
#  120|   }
#  121|   
#  122|-> rb_gen(static UNUSED, tdata_tree_, prof_tdata_tree_t, prof_tdata_t, tdata_link,
#  123|       prof_tdata_comp)
#  124|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def237]
jemalloc-5.3.0/src/prof_data.c:122:1: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘nodep’
jemalloc-5.3.0/src/prof_data.c:1243:1: enter_function: entry to ‘prof_tdata_destroy’
jemalloc-5.3.0/src/prof_data.c:1244:9: call_function: calling ‘malloc_mutex_lock’ from ‘prof_tdata_destroy’
jemalloc-5.3.0/src/prof_data.c:1244:9: return_function: returning to ‘prof_tdata_destroy’ from ‘malloc_mutex_lock’
jemalloc-5.3.0/src/prof_data.c:1245:9: call_function: calling ‘prof_tdata_destroy_locked’ from ‘prof_tdata_destroy’
#  120|   }
#  121|   
#  122|-> rb_gen(static UNUSED, tdata_tree_, prof_tdata_tree_t, prof_tdata_t, tdata_link,
#  123|       prof_tdata_comp)
#  124|   

Error: GCC_ANALYZER_WARNING (CWE-127): [#def238]
jemalloc-5.3.0/src/prof_data.c:122:1: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
jemalloc-5.3.0/src/prof_data.c:1243:1: enter_function: entry to ‘prof_tdata_destroy’
jemalloc-5.3.0/src/prof_data.c:1244:9: call_function: calling ‘malloc_mutex_lock’ from ‘prof_tdata_destroy’
jemalloc-5.3.0/src/prof_data.c:1244:9: return_function: returning to ‘prof_tdata_destroy’ from ‘malloc_mutex_lock’
jemalloc-5.3.0/src/prof_data.c:1245:9: call_function: calling ‘prof_tdata_destroy_locked’ from ‘prof_tdata_destroy’
#  120|   }
#  121|   
#  122|-> rb_gen(static UNUSED, tdata_tree_, prof_tdata_tree_t, prof_tdata_t, tdata_link,
#  123|       prof_tdata_comp)
#  124|   

Error: GCC_ANALYZER_WARNING (CWE-124): [#def239]
jemalloc-5.3.0/src/prof_data.c:122:1: warning[-Wanalyzer-out-of-bounds]: stack-based buffer underwrite
jemalloc-5.3.0/src/prof_data.c:1243:1: enter_function: entry to ‘prof_tdata_destroy’
jemalloc-5.3.0/src/prof_data.c:1244:9: call_function: calling ‘malloc_mutex_lock’ from ‘prof_tdata_destroy’
jemalloc-5.3.0/src/prof_data.c:1244:9: return_function: returning to ‘prof_tdata_destroy’ from ‘malloc_mutex_lock’
jemalloc-5.3.0/src/prof_data.c:1245:9: call_function: calling ‘prof_tdata_destroy_locked’ from ‘prof_tdata_destroy’
#  120|   }
#  121|   
#  122|-> rb_gen(static UNUSED, tdata_tree_, prof_tdata_tree_t, prof_tdata_t, tdata_link,
#  123|       prof_tdata_comp)
#  124|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def240]
jemalloc-5.3.0/src/prof_data.c:515:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
jemalloc-5.3.0/src/prof_data.c:942:1: enter_function: entry to ‘prof_tdata_dump_iter’
jemalloc-5.3.0/src/prof_data.c:949:9: call_function: calling ‘prof_dump_printf’ from ‘prof_tdata_dump_iter’
#  513|   
#  514|   	va_start(ap, format);
#  515|-> 	malloc_vsnprintf(buf, sizeof(buf), format, ap);
#  516|   	va_end(ap);
#  517|   	prof_dump_write(cbopaque, buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def241]
jemalloc-5.3.0/src/prof_log.c:661:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
jemalloc-5.3.0/src/prof_log.c:614:1: enter_function: entry to ‘prof_log_stop’
jemalloc-5.3.0/src/prof_log.c:616:12: branch_true: following ‘true’ branch...
jemalloc-5.3.0/src/prof_log.c:623:12: branch_false: following ‘false’ branch...
jemalloc-5.3.0/src/prof_log.c:633:9: branch_false: ...to here
jemalloc-5.3.0/src/prof_log.c:642:12: branch_false: following ‘false’ branch...
jemalloc-5.3.0/src/prof_log.c:645:22: branch_false: ...to here
jemalloc-5.3.0/src/prof_log.c:645:22: acquire_resource: opened here
jemalloc-5.3.0/src/prof_log.c:648:12: branch_false: following ‘false’ branch...
jemalloc-5.3.0/src/prof_log.c:658:9: branch_false: ...to here
jemalloc-5.3.0/src/prof_log.c:661:9: danger: ‘fd’ leaks here; was opened at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  659|   
#  660|   	buf_writer_t buf_writer;
#  661|-> 	buf_writer_init(tsdn, &buf_writer, prof_emitter_write_cb, &arg, NULL,
#  662|   	    PROF_LOG_STOP_BUFSIZE);
#  663|   	emitter_init(&emitter, emitter_output_json_compact, buf_writer_cb,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def242]
jemalloc-5.3.0/src/prof_sys.c:380:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
jemalloc-5.3.0/src/prof_sys.c:406:1: enter_function: entry to ‘prof_dump_flush’
jemalloc-5.3.0/src/prof_sys.c:412:17: call_function: calling ‘prof_dump_check_possible_error’ from ‘prof_dump_flush’
#  378|   	char buf[PROF_PRINTF_BUFSIZE];
#  379|   	va_start(ap, format);
#  380|-> 	malloc_vsnprintf(buf, sizeof(buf), format, ap);
#  381|   	va_end(ap);
#  382|   	malloc_write(buf);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def243]
jemalloc-5.3.0/src/prof_sys.c:433:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
jemalloc-5.3.0/src/prof_sys.c:639:1: enter_function: entry to ‘prof_mdump_impl’
jemalloc-5.3.0/src/prof_sys.c:653:16: call_function: calling ‘prof_dump’ from ‘prof_mdump_impl’
#  431|   
#  432|   	va_start(ap, format);
#  433|-> 	malloc_vsnprintf(filename, sizeof(filename), format, ap);
#  434|   	va_end(ap);
#  435|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def244]
jemalloc-5.3.0/src/prof_sys.c:485:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘mfd’
jemalloc-5.3.0/src/prof_sys.c:639:1: enter_function: entry to ‘prof_mdump_impl’
jemalloc-5.3.0/src/prof_sys.c:653:16: call_function: calling ‘prof_dump’ from ‘prof_mdump_impl’
#  483|   	}
#  484|   
#  485|-> 	buf_writer_cb(buf_writer, "\nMAPPED_LIBRARIES:\n");
#  486|   	buf_writer_pipe(buf_writer, prof_dump_read_maps_cb, &mfd);
#  487|   	close(mfd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def245]
jemalloc-5.3.0/src/prof_sys.c:486:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘mfd’
jemalloc-5.3.0/src/prof_sys.c:639:1: enter_function: entry to ‘prof_mdump_impl’
jemalloc-5.3.0/src/prof_sys.c:653:16: call_function: calling ‘prof_dump’ from ‘prof_mdump_impl’
#  484|   
#  485|   	buf_writer_cb(buf_writer, "\nMAPPED_LIBRARIES:\n");
#  486|-> 	buf_writer_pipe(buf_writer, prof_dump_read_maps_cb, &mfd);
#  487|   	close(mfd);
#  488|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def246]
jemalloc-5.3.0/src/prof_sys.c:509:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘arg.prof_dump_fd’
jemalloc-5.3.0/src/prof_sys.c:639:1: enter_function: entry to ‘prof_mdump_impl’
jemalloc-5.3.0/src/prof_sys.c:653:16: call_function: calling ‘prof_dump’ from ‘prof_mdump_impl’
#  507|   	prof_dump_open(&arg, filename);
#  508|   	buf_writer_t buf_writer;
#  509|-> 	bool err = buf_writer_init(tsd_tsdn(tsd), &buf_writer, prof_dump_flush,
#  510|   	    &arg, prof_dump_buf, PROF_DUMP_BUFSIZE);
#  511|   	assert(!err);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def247]
jemalloc-5.3.0/src/safety_check.c:27:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
jemalloc-5.3.0/src/safety_check.c:26:9: acquire_resource: ‘va_start’ called here
jemalloc-5.3.0/src/safety_check.c:27:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   25|   	va_list ap;
#   26|   	va_start(ap, format);
#   27|-> 	malloc_vsnprintf(buf, MALLOC_PRINTF_BUFSIZE, format, ap);
#   28|   	va_end(ap);
#   29|   

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-247.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-gcc-latest-x86_64
project-name389-ds-base-3.1.3-10.fc44
store-results-to/tmp/tmpzp5ixy6_/389-ds-base-3.1.3-10.fc44.tar.xz
time-created2025-10-28 17:35:37
time-finished2025-10-28 17:51:22
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpzp5ixy6_/389-ds-base-3.1.3-10.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpzp5ixy6_/389-ds-base-3.1.3-10.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9