opencryptoki-3.26.0-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
opencryptoki-3.26.0/testcases/crypto/abfunc.c:212:10: warning[-Wanalyzer-malloc-leak]: leak of ‘blob’
opencryptoki-3.26.0/testcases/crypto/abfunc.c:206:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/abfunc.c:208:36: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/abfunc.c:208:29: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/abfunc.c:209:8: branch_false: following ‘false’ branch (when ‘blob’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/abfunc.c:211:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/abfunc.c:212:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/abfunc.c:212:10: danger: ‘blob’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  210|           return;
#  211|       blobattr.pValue = blob;
#  212|->     rc = funcs->C_GetAttributeValue(session, key, &blobattr, 1);
#  213|       if (rc != CKR_OK)
#  214|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
opencryptoki-3.26.0/testcases/crypto/abfunc.c:245:10: warning[-Wanalyzer-malloc-leak]: leak of ‘blob’
opencryptoki-3.26.0/testcases/crypto/abfunc.c:239:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/abfunc.c:241:36: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/abfunc.c:241:29: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/abfunc.c:242:8: branch_false: following ‘false’ branch (when ‘blob’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/abfunc.c:244:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/abfunc.c:245:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/abfunc.c:245:10: danger: ‘blob’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  243|           return;
#  244|       blobattr.pValue = blob;
#  245|->     rc = funcs->C_GetAttributeValue(session, key, &blobattr, 1);
#  246|       if (rc != CKR_OK)
#  247|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
opencryptoki-3.26.0/testcases/crypto/abfunc.c:308:10: warning[-Wanalyzer-malloc-leak]: leak of ‘signature’
opencryptoki-3.26.0/testcases/crypto/abfunc.c:300:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/abfunc.c:302:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/abfunc.c:303:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/abfunc.c:305:17: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/abfunc.c:305:17: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/abfunc.c:306:8: branch_false: following ‘false’ branch (when ‘signature’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/abfunc.c:308:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/abfunc.c:308:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/abfunc.c:308:10: danger: ‘signature’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  306|       if (!signature)
#  307|           return CKR_HOST_MEMORY;
#  308|->     rc = funcs->C_Sign(session, data, sizeof(data), signature, &signaturelen);
#  309|       if (rc != CKR_OK)
#  310|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:112:10: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:91:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:99:12: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:99:12: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:100:8: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:100:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:107:17: branch_false: following ‘false’ branch (when ‘i >= inputlen’)...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:112:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:112:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:112:10: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  110|   
#  111|       /* Sign */
#  112|->     rc = funcs->C_SignInit(session, &mech, priv_key);
#  113|       if (rc != CKR_OK) {
#  114|           testcase_error("C_SignInit rc=%s", p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:118:10: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:91:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:99:12: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:99:12: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:100:8: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:100:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:107:17: branch_false: following ‘false’ branch (when ‘i >= inputlen’)...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:112:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:113:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:118:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:118:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:118:10: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  116|       }
#  117|   
#  118|->     rc = funcs->C_Sign(session, data, inputlen, NULL, &signaturelen);
#  119|       if (rc != CKR_OK) {
#  120|           testcase_error("C_Sign rc=%s", p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:131:10: warning[-Wanalyzer-malloc-leak]: leak of ‘signature’
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:91:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:99:12: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:100:8: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:100:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:113:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:118:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:119:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:123:17: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:123:17: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:124:8: branch_false: following ‘false’ branch (when ‘signature’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:131:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:131:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:131:10: danger: ‘signature’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  129|       }
#  130|   
#  131|->     rc = funcs->C_Sign(session, data, inputlen, signature, &signaturelen);
#  132|       if (rc != CKR_OK) {
#  133|           testcase_error("C_Sign rc=%s", p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:217:10: warning[-Wanalyzer-malloc-leak]: leak of ‘signature’
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:194:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:200:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:202:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:208:17: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:208:17: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:209:8: branch_false: following ‘false’ branch (when ‘signature’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:217:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:217:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:217:10: danger: ‘signature’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  215|   
#  216|       /* Create signature */
#  217|->     rc = funcs->C_Sign(session, dilithium_tv[index].msg, dilithium_tv[index].msg_len,
#  218|                          signature, &siglen);
#  219|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:548:10: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp_key’
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:537:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:541:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:541:15: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:542:8: branch_false: following ‘false’ branch (when ‘tmp_key’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:548:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:548:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/dilithium_func.c:548:10: danger: ‘tmp_key’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  546|   
#  547|       /* Now wrap the key */
#  548|->     rc = funcs->C_WrapKey(session, wrap_mech, secret_key, key_to_wrap,
#  549|                             tmp_key, &tmp_len);
#  550|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:107:10: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:86:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:94:12: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:94:12: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:95:8: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:95:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:102:17: branch_false: following ‘false’ branch (when ‘i >= inputlen’)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:107:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:107:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:107:10: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  105|   
#  106|       /* Sign */
#  107|->     rc = funcs->C_SignInit(session, mech, priv_key);
#  108|       if (rc != CKR_OK) {
#  109|           if (rc == CKR_MECHANISM_PARAM_INVALID &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:129:10: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:86:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:94:12: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:94:12: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:95:8: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:95:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:102:17: branch_false: following ‘false’ branch (when ‘i >= inputlen’)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:107:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:108:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:129:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:129:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:129:10: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  127|       }
#  128|   
#  129|->     rc = funcs->C_Sign(session, data, inputlen, NULL, &signaturelen);
#  130|       if (rc != CKR_OK) {
#  131|           if (rc == CKR_MECHANISM_PARAM_INVALID &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:158:10: warning[-Wanalyzer-malloc-leak]: leak of ‘signature’
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:86:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:94:12: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:95:8: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:95:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:108:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:129:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:130:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:150:17: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:150:17: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:151:8: branch_false: following ‘false’ branch (when ‘signature’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:158:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:158:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:158:10: danger: ‘signature’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  156|       }
#  157|   
#  158|->     rc = funcs->C_Sign(session, data, inputlen, signature, &signaturelen);
#  159|       if (rc != CKR_OK) {
#  160|           testcase_error("C_Sign rc=%s", p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:469:10: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp_key’
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:458:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:462:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:462:15: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:463:8: branch_false: following ‘false’ branch (when ‘tmp_key’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:469:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:469:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_dsa_func.c:469:10: danger: ‘tmp_key’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  467|   
#  468|       /* Now wrap the key */
#  469|->     rc = funcs->C_WrapKey(session, wrap_mech, secret_key, key_to_wrap,
#  470|                             tmp_key, &tmp_len);
#  471|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:403:10: warning[-Wanalyzer-malloc-leak]: leak of ‘cipher’
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:349:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:357:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:357:8: branch_false: following ‘false’ branch (when ‘hybrid == 0’)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:365:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:365:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:372:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:384:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:390:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:391:14: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:392:8: branch_false: following ‘false’ branch (when ‘cipher’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:400:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:403:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:403:10: danger: ‘cipher’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  401|   
#  402|       /* Encapsulation */
#  403|->     rc = funcs->C_DeriveKey(session, &mech, publ_key, derive_tmpl,
#  404|                               secret_tmpl_len, &secret_key1);
#  405|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:615:10: warning[-Wanalyzer-malloc-leak]: leak of ‘cipher’
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:492:7: enter_function: entry to ‘run_EnDecapsulateMLKEMwithECDH’
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:534:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:541:10: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:541:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:548:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:548:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:570:10: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:570:10: call_function: calling ‘generate_EC_KeyPair’ from ‘run_EnDecapsulateMLKEMwithECDH’
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:570:10: return_function: returning to ‘run_EnDecapsulateMLKEMwithECDH’ from ‘generate_EC_KeyPair’
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:572:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:577:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:578:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:584:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:596:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:602:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:603:14: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:604:8: branch_false: following ‘false’ branch (when ‘cipher’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:612:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:615:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:615:10: danger: ‘cipher’ leaks here; was allocated at [(19)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/18)
#  613|   
#  614|       /* Encapsulation */
#  615|->     rc = funcs->C_DeriveKey(session, &mech, publ_key, derive_tmpl,
#  616|                               secret_tmpl_len, &secret_key1);
#  617|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:1003:10: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp_key’
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:992:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:996:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:996:15: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:997:8: branch_false: following ‘false’ branch (when ‘tmp_key’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:1003:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:1003:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/ibm_ml_kem_func.c:1003:10: danger: ‘tmp_key’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 1001|   
# 1002|       /* Now wrap the key */
# 1003|->     rc = funcs->C_WrapKey(session, wrap_mech, secret_key, key_to_wrap,
# 1004|                             tmp_key, &tmp_len);
# 1005|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:345:10: warning[-Wanalyzer-malloc-leak]: leak of ‘cipher’
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:291:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:299:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:299:8: branch_false: following ‘false’ branch (when ‘hybrid == 0’)...
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:307:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:307:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:314:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:326:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:332:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:333:14: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:334:8: branch_false: following ‘false’ branch (when ‘cipher’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:342:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:345:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:345:10: danger: ‘cipher’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  343|   
#  344|       /* Encapsulation */
#  345|->     rc = funcs->C_DeriveKey(session, &mech, publ_key, derive_tmpl,
#  346|                               secret_tmpl_len, &secret_key1);
#  347|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:824:10: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp_key’
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:813:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:817:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:817:15: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:818:8: branch_false: following ‘false’ branch (when ‘tmp_key’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:824:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:824:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/kyber_func.c:824:10: danger: ‘tmp_key’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  822|   
#  823|       /* Now wrap the key */
#  824|->     rc = funcs->C_WrapKey(session, wrap_mech, secret_key, key_to_wrap,
#  825|                             tmp_key, &tmp_len);
#  826|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def18]
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:267:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘oaep_params.hashAlg’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:50:7: enter_function: entry to ‘do_EncryptDecryptRSA’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:73:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:74:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:77:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:86:34: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:86:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:86:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:95:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:99:27: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:98:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:105:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:119:14: call_function: calling ‘keysize_supported’ from ‘do_EncryptDecryptRSA’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:119:14: return_function: returning to ‘do_EncryptDecryptRSA’ from ‘keysize_supported’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:119:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:127:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:127:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:139:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:139:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:170:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:182:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:192:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:231:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:231:12: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:246:21: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:251:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:256:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:262:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:263:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:264:16: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:264:16: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:265:17: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:264:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:266:17: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:266:17: call_function: calling ‘is_ep11_token’ from ‘do_EncryptDecryptRSA’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:266:17: return_function: returning to ‘do_EncryptDecryptRSA’ from ‘is_ep11_token’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:264:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:267:18: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:267:18: danger: use of uninitialized value ‘oaep_params.hashAlg’ here
#  265|                   mech.mechanism == CKM_RSA_PKCS_OAEP &&
#  266|                   is_ep11_token(slot_id) &&
#  267|->                 (oaep_params.hashAlg != CKM_SHA_1 ||
#  268|                    oaep_params.mgf != CKG_MGF1_SHA1)) {
#  269|                   testcase_skip("EP11 Token does not support RSA OAEP with hash "

Error: GCC_ANALYZER_WARNING (CWE-457): [#def19]
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:277:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘oaep_params.hashAlg’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:50:7: enter_function: entry to ‘do_EncryptDecryptRSA’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:73:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:74:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:77:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:86:34: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:86:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:86:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:95:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:99:27: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:98:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:105:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:119:14: call_function: calling ‘keysize_supported’ from ‘do_EncryptDecryptRSA’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:119:14: return_function: returning to ‘do_EncryptDecryptRSA’ from ‘keysize_supported’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:119:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:127:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:127:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:139:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:139:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:170:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:182:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:192:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:231:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:231:12: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:246:21: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:251:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:256:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:262:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:263:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:264:16: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:264:16: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:265:17: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:264:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:266:17: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:264:17: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:275:17: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:274:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:276:17: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:276:17: call_function: calling ‘is_cca_token’ from ‘do_EncryptDecryptRSA’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:276:17: return_function: returning to ‘do_EncryptDecryptRSA’ from ‘is_cca_token’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:274:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:277:19: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:277:19: danger: use of uninitialized value ‘oaep_params.hashAlg’ here
#  275|                   mech.mechanism == CKM_RSA_PKCS_OAEP &&
#  276|                   is_cca_token(slot_id) &&
#  277|->                 ((oaep_params.hashAlg != CKM_SHA_1 &&
#  278|                     oaep_params.hashAlg != CKM_SHA256) ||
#  279|                    (oaep_params.mgf != CKG_MGF1_SHA1 &&

Error: GCC_ANALYZER_WARNING (CWE-457): [#def20]
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:297:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘oaep_params.hashAlg’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:50:7: enter_function: entry to ‘do_EncryptDecryptRSA’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:73:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:74:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:77:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:86:34: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:86:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:86:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:95:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:99:27: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:98:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:105:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:119:14: call_function: calling ‘keysize_supported’ from ‘do_EncryptDecryptRSA’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:119:14: return_function: returning to ‘do_EncryptDecryptRSA’ from ‘keysize_supported’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:119:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:127:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:127:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:139:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:139:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:170:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:182:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:192:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:231:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:231:12: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:256:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:262:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:263:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:291:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:293:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:294:16: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:294:16: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:295:17: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:294:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:296:17: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:296:17: call_function: calling ‘is_cca_token’ from ‘do_EncryptDecryptRSA’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:296:17: return_function: returning to ‘do_EncryptDecryptRSA’ from ‘is_cca_token’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:294:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:297:19: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:297:19: danger: use of uninitialized value ‘oaep_params.hashAlg’ here
#  295|                   mech.mechanism == CKM_RSA_PKCS_OAEP &&
#  296|                   is_cca_token(slot_id) &&
#  297|->                 ((oaep_params.hashAlg != CKM_SHA_1 &&
#  298|                     oaep_params.hashAlg != CKM_SHA256) ||
#  299|                    (oaep_params.mgf != CKG_MGF1_SHA1 &&

Error: GCC_ANALYZER_WARNING (CWE-457): [#def21]
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1247:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘h_len’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1076:7: enter_function: entry to ‘do_SignVerify_RSAPSS’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1100:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1101:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1101:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1104:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1112:34: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1112:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1112:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1121:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1125:27: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1124:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1131:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1142:14: call_function: calling ‘keysize_supported’ from ‘do_SignVerify_RSAPSS’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1142:14: return_function: returning to ‘do_SignVerify_RSAPSS’ from ‘keysize_supported’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1142:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1149:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1149:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1157:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1184:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1184:12: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1199:21: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1203:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1203:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1231:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1238:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1243:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1246:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1247:23: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1247:18: danger: use of uninitialized value ‘h_len’ here
# 1245|           // do Sign
# 1246|           if (mech.mechanism == CKM_RSA_PKCS_PSS)
# 1247|->             rc = funcs->C_Sign(session, hash, h_len, signature, &signature_len);
# 1248|           else
# 1249|               rc = funcs->C_Sign(session, message, message_len,

Error: GCC_ANALYZER_WARNING (CWE-457): [#def22]
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1263:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘h_len’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1076:7: enter_function: entry to ‘do_SignVerify_RSAPSS’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1100:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1101:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1101:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1104:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1112:34: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1112:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1112:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1121:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1125:27: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1124:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1131:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1142:14: call_function: calling ‘keysize_supported’ from ‘do_SignVerify_RSAPSS’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1142:14: return_function: returning to ‘do_SignVerify_RSAPSS’ from ‘keysize_supported’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1142:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1149:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1149:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1157:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1184:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1184:12: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1203:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1231:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1238:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1243:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1246:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1249:23: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1251:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1257:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1258:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1262:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1262:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1263:23: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1263:18: danger: use of uninitialized value ‘h_len’ here
# 1261|           // do Verify
# 1262|           if (mech.mechanism == CKM_RSA_PKCS_PSS)
# 1263|->             rc = funcs->C_Verify(session, hash, h_len, signature,
# 1264|                                    signature_len);
# 1265|           else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1685:14: warning[-Wanalyzer-malloc-leak]: leak of ‘wrapped_key’
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1326:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1327:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1327:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1330:17: branch_true: following ‘true’ branch (when ‘j != 32’)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1331:9: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1334:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1341:17: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1341:15: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1348:34: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1348:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1348:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1357:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1359:38: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1379:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1386:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1386:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1394:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1403:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1412:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1412:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1458:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1493:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1500:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1508:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1509:27: branch_true: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1519:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1528:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1541:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1555:42: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1557:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1581:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1584:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1637:13: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1643:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1674:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1677:23: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1678:12: branch_false: following ‘false’ branch (when ‘wrapped_key’ is non-NULL)...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1685:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1685:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/crypto/rsa_func.c:1685:14: danger: ‘wrapped_key’ leaks here; was allocated at [(37)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/36)
# 1683|           }
# 1684|           // wrap key
# 1685|->         rc = funcs->C_WrapKey(session, &wrap_mech, publ_key, secret_key,
# 1686|                                 wrapped_key, &wrapped_keylen);
# 1687|           if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
opencryptoki-3.26.0/testcases/login/init_tok.c:78:27: warning[-Wanalyzer-malloc-leak]: leak of ‘pass’
opencryptoki-3.26.0/testcases/login/init_tok.c:78:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
opencryptoki-3.26.0/testcases/login/init_tok.c:79:24: branch_true: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:79:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
opencryptoki-3.26.0/testcases/login/init_tok.c:86:20: branch_false: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:86:19: branch_true: following ‘true’ branch (when the strings are equal)...
opencryptoki-3.26.0/testcases/login/init_tok.c:87:17: branch_true: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:87:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/login/init_tok.c:91:46: branch_false: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:91:34: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/login/init_tok.c:78:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
opencryptoki-3.26.0/testcases/login/init_tok.c:79:24: branch_true: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:79:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
opencryptoki-3.26.0/testcases/login/init_tok.c:86:20: branch_false: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:86:19: branch_true: following ‘true’ branch (when the strings are equal)...
opencryptoki-3.26.0/testcases/login/init_tok.c:87:17: branch_true: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:87:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/login/init_tok.c:91:46: branch_false: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:78:27: danger: ‘pass’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#   76|       SLOT_ID = 0;
#   77|   
#   78|->     for (i = 1; i < argc; i++) {
#   79|           if (strcmp(argv[i], "-slot") == 0) {
#   80|               if (i + 1 >= argc) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:122:10: warning[-Wanalyzer-malloc-leak]: leak of ‘a_opaque.pValue’
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:108:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:112:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:113:8: branch_false: following ‘false’ branch (when ‘len != 0’)...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:117:23: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:117:23: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:118:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:122:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:122:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:122:10: danger: ‘a_opaque.pValue’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  120|           return CKR_HOST_MEMORY;
#  121|       }
#  122|->     rc = funcs->C_GetAttributeValue(session, handle, &a_opaque, 1);
#  123|       if (rc != CKR_OK) {
#  124|           testcase_error("C_GetAttributeValue() rc=%s", p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-457): [#def26]
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1739:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘publ_opaquekeylen’
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1622:14: enter_function: entry to ‘ecc_export_import_tests’
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1643:18: call_function: calling ‘is_cca_token’ from ‘ecc_export_import_tests’
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1643:18: return_function: returning to ‘ecc_export_import_tests’ from ‘is_cca_token’
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1649:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1654:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1654:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1655:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1655:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1657:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1659:9: branch_true: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1662:12: branch_true: following ‘true’ branch (when the strings are equal)...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1663:13: branch_true: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1669:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1675:14: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1678:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1683:12: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1683:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1693:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1698:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1703:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1705:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1712:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1713:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1717:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1718:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1730:14: branch_true: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1731:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1738:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:1739:14: danger: use of uninitialized value ‘publ_opaquekeylen’ here
# 1737|   
# 1738|           snprintf(label, sizeof(label), "re-imported_ecc_%s_public_key", ec_curves[i].name);
# 1739|->         rc = import_ecc_publ_key(session, label, publ_opaquekey, publ_opaquekeylen, &imp_publ_key);
# 1740|           if (rc != CKR_OK) {
# 1741|               if (rc == CKR_PUBLIC_KEY_INVALID && is_ep11_token(SLOT_ID)) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def27]
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2312:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘publ_opaquekeylen’
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2182:14: enter_function: entry to ‘ibm_ml_dsa_export_import_tests’
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2204:10: call_function: calling ‘is_cca_token’ from ‘ibm_ml_dsa_export_import_tests’
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2204:10: return_function: returning to ‘ibm_ml_dsa_export_import_tests’ from ‘is_cca_token’
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2208:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2212:10: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2212:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2217:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2217:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2218:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2218:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2220:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2221:22: branch_true: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2246:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2262:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2267:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2272:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2274:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2281:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2282:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2286:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2287:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2300:14: branch_true: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2300:14: call_function: calling ‘export_ibm_opaque’ from ‘ibm_ml_dsa_export_import_tests’
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2300:14: return_function: returning to ‘ibm_ml_dsa_export_import_tests’ from ‘export_ibm_opaque’
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2302:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2310:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/misc_tests/cca_ep11_export_import_test.c:2312:14: danger: use of uninitialized value ‘publ_opaquekeylen’ here
# 2310|           snprintf(label, sizeof(label), "re-imported_ml_dsa_%s_public_key",
# 2311|                    ml_dsa_variants[i].name);
# 2312|->         rc = import_ibm_ml_dsa_publ_key(session, CKK_IBM_ML_DSA,
# 2313|                                           label, publ_opaquekey,
# 2314|                                           publ_opaquekeylen, &imp_publ_key);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:99:10: warning[-Wanalyzer-malloc-leak]: leak of ‘pSlotList’
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:68:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:69:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:69:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:79:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:84:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:89:32: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:90:8: branch_false: following ‘false’ branch (when ‘pSlotList’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:96:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:99:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:99:10: danger: ‘pSlotList’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   97|   
#   98|       /* Get the slots */
#   99|->     rc = funcs->C_GetSlotList(tokenPresent, pSlotList, &ulCount);
#  100|       if (rc != CKR_OK) {
#  101|           testcase_fail("C_GetSlotList rc=%s", p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:255:10: warning[-Wanalyzer-malloc-leak]: leak of ‘mech_list’
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:224:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:225:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:225:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:237:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:242:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:247:39: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:248:8: branch_false: following ‘false’ branch (when ‘mech_list’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:254:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:255:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:255:10: danger: ‘mech_list’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  253|   
#  254|       testcase_new_assertion();
#  255|->     rc = funcs->C_GetMechanismList(slot_id, mech_list, &count);
#  256|       if (rc != CKR_OK) {
#  257|           testcase_fail("C_GetMechanismList 2 rc=%s", p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:322:10: warning[-Wanalyzer-malloc-leak]: leak of ‘mech_list’
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:305:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:306:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:306:5: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:311:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:316:39: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:316:39: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:317:8: branch_false: following ‘false’ branch (when ‘mech_list’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:322:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:322:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/pkcs11/gen_purpose.c:322:10: danger: ‘mech_list’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  320|       }
#  321|   
#  322|->     rc = funcs->C_GetMechanismList(slot_id, mech_list, &count);
#  323|       if (rc != CKR_OK) {
#  324|           testcase_error("C_GetMechanismList #2 rc=%s", p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
opencryptoki-3.26.0/testcases/pkcs11/get_interface.c:398:10: warning[-Wanalyzer-malloc-leak]: leak of ‘il’
opencryptoki-3.26.0/testcases/pkcs11/get_interface.c:375:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/get_interface.c:380:16: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/get_interface.c:381:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/get_interface.c:385:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/get_interface.c:385:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/get_interface.c:391:10: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/get_interface.c:391:10: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/pkcs11/get_interface.c:392:8: branch_false: following ‘false’ branch (when ‘il’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/get_interface.c:397:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/get_interface.c:398:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/pkcs11/get_interface.c:398:10: danger: ‘il’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  396|   
#  397|       nmemb--;
#  398|->     rv = funcs3->C_GetInterfaceList(il, &nmemb);
#  399|       if (rv != CKR_BUFFER_TOO_SMALL) {
#  400|           testcase_fail("C_GetInterfaceList returned %s.\n", p11_get_ckr(rv));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:603:10: warning[-Wanalyzer-malloc-leak]: leak of ‘op_state’
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:503:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:508:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:509:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:514:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:514:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:517:31: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:520:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:520:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:526:17: branch_true: following ‘true’ branch (when ‘i != 1024’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:527:23: branch_true: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:537:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:545:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:546:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:556:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:561:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:563:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:569:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:570:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:575:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:578:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:584:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:585:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:597:28: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:597:28: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:598:8: branch_false: following ‘false’ branch (when ‘op_state’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:603:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:603:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:603:10: danger: ‘op_state’ leaks here; was allocated at [(25)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/24)
#  601|       }
#  602|   
#  603|->     rc = funcs->C_GetOperationState(session1, op_state, &op_state_len);
#  604|       if (rc != CKR_OK) {
#  605|           testcase_fail("C_GetOperationState #1, rc=%lx, %s", rc, p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:828:10: warning[-Wanalyzer-malloc-leak]: leak of ‘op_state1’
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:724:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:729:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:730:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:735:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:736:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:741:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:741:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:744:31: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:747:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:747:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:753:17: branch_true: following ‘true’ branch (when ‘i != 1024’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:754:23: branch_true: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:760:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:769:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:770:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:775:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:776:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:781:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:782:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:787:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:788:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:793:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:794:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:800:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:802:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:808:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:809:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:822:29: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:822:29: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:823:8: branch_false: following ‘false’ branch (when ‘op_state1’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:828:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:828:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:828:10: danger: ‘op_state1’ leaks here; was allocated at [(29)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/28)
#  826|       }
#  827|   
#  828|->     rc = funcs->C_GetOperationState(session1, op_state1, &op_state1_len);
#  829|       if (rc != CKR_OK) {
#  830|           testcase_fail("C_GetOperationState #2, rc=%lx, %s", rc, p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:854:10: warning[-Wanalyzer-malloc-leak]: leak of ‘op_state2’
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:724:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:729:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:730:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:735:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:736:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:741:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:741:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:744:31: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:747:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:747:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:753:17: branch_true: following ‘true’ branch (when ‘i != 1024’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:754:23: branch_true: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:760:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:769:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:770:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:775:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:776:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:781:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:782:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:787:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:788:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:793:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:794:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:800:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:802:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:808:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:809:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:822:29: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:823:8: branch_false: following ‘false’ branch (when ‘op_state1’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:828:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:829:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:834:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:835:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:848:29: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:848:29: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:849:8: branch_false: following ‘false’ branch (when ‘op_state2’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:854:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:854:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:854:10: danger: ‘op_state2’ leaks here; was allocated at [(35)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/34)
#  852|       }
#  853|   
#  854|->     rc = funcs->C_GetOperationState(session2, op_state2, &op_state2_len);
#  855|       if (rc != CKR_OK) {
#  856|           testcase_fail("C_GetOperationState #4, rc=%lx, %s", rc, p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1121:10: warning[-Wanalyzer-malloc-leak]: leak of ‘op_state2’
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:992:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:997:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:998:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1003:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1004:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1009:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1009:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1012:31: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1015:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1015:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1021:17: branch_true: following ‘true’ branch (when ‘i != 1024’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1022:23: branch_true: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1028:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1037:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1038:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1043:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1047:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1056:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1057:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1062:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1066:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1075:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1076:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1081:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1082:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1087:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1088:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1094:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1096:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1101:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1102:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1115:29: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1115:29: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1116:8: branch_false: following ‘false’ branch (when ‘op_state2’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1121:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1121:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/pkcs11/sess_mgmt.c:1121:10: danger: ‘op_state2’ leaks here; was allocated at [(33)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/32)
# 1119|       }
# 1120|   
# 1121|->     rc = funcs->C_GetOperationState(session2, op_state2, &op_state2_len);
# 1122|       if (rc != CKR_OK) {
# 1123|           testcase_fail("C_GetOperationState #2, rc=%lx, %s", rc, p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:36:10: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:30:23: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:31:8: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:36:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:36:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:36:10: danger: ‘ptr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   34|       }
#   35|   
#   36|->     rc = funcs->C_GenerateRandom(sess, ptr, nbytes);
#   37|       if (rc != CKR_OK) {
#   38|           testcase_error("C_GenerateRandom() rc=%s", p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:149:14: warning[-Wanalyzer-malloc-leak]: leak of ‘opstate’
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:46:5: enter_function: entry to ‘sess_opstate_funcs’
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:67:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:72:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:73:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:78:34: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:78:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:85:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:86:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:91:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:92:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:92:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:98:23: branch_true: following ‘true’ branch (when ‘counter < loops’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:100:22: branch_true: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:101:17: call_function: calling ‘alloc_random_buf’ from ‘sess_opstate_funcs’
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:101:17: return_function: returning to ‘sess_opstate_funcs’ from ‘alloc_random_buf’
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:102:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:106:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:113:12: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:113:12: branch_false: following ‘false’ branch (when ‘opstate’ is NULL)...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:124:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:125:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:131:9: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:133:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:143:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:143:19: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:144:12: branch_false: following ‘false’ branch (when ‘opstate’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:149:19: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:149:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:149:14: danger: ‘opstate’ leaks here; was allocated at [(31)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/30)
#  147|           }
#  148|   
#  149|->         rc = funcs->C_GetOperationState(s2, opstate, &opstatelen);
#  150|           if (rc != CKR_OK) {
#  151|               if (rc == CKR_STATE_UNSAVEABLE) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def38]
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:210:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘opstatelen’
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:67:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:72:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:73:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:78:34: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:78:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:85:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:86:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:91:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:92:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:92:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:98:23: branch_false: following ‘false’ branch (when ‘counter >= loops’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:210:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:210:10: danger: use of uninitialized value ‘opstatelen’ here
#  208|   
#  209|       // restore op state on session 2
#  210|->     rc = funcs->C_SetOperationState(s2, opstate, opstatelen, 0, 0);
#  211|       if (rc != CKR_OK) {
#  212|           testcase_error("C_SetOperationState rc=%s", p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:73:10: warning[-Wanalyzer-malloc-leak]: leak of ‘t’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:163:5: enter_function: entry to ‘do_SessionPerformance’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:175:29: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:176:8: branch_false: following ‘false’ branch (when ‘t’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:176:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:182:17: branch_true: following ‘true’ branch (when ‘count > i’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:183:59: branch_true: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:183:14: call_function: calling ‘create_aes_encrypt_context’ from ‘do_SessionPerformance’
#   71|       flags = CKF_SERIAL_SESSION; // read-only session
#   72|   
#   73|->     rc = funcs->C_OpenSession(slot_id, flags, NULL, NULL, hsess);
#   74|       if (rc != CKR_OK) {
#   75|           testcase_error("C_OpenSession #1, rc=%lx, %s", rc, p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:115:14: warning[-Wanalyzer-malloc-leak]: leak of ‘t’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:163:5: enter_function: entry to ‘do_SessionPerformance’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:175:29: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:176:8: branch_false: following ‘false’ branch (when ‘t’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:176:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:182:17: branch_false: following ‘false’ branch (when ‘count <= i’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:191:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:192:10: call_function: calling ‘encrypt_DATA’ from ‘do_SessionPerformance’
#  113|   
#  114|       for (i = 0; i < DATALEN; i += outlen) {
#  115|->         rc = funcs->C_EncryptUpdate(hsess, (CK_BYTE_PTR) (DATA + i), blocklen,
#  116|                                       (CK_BYTE_PTR) (DUMP + i), &outlen);
#  117|           if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-122): [#def41]
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:198:10: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:163:5: enter_function: entry to ‘do_SessionPerformance’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:176:8: branch_false: following ‘false’ branch (when ‘t’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:176:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:182:17: branch_false: following ‘false’ branch (when ‘count <= i’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:191:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:192:10: call_function: calling ‘encrypt_DATA’ from ‘do_SessionPerformance’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:192:10: return_function: returning to ‘do_SessionPerformance’ from ‘encrypt_DATA’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:193:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:198:45: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:198:10: danger: read of 8 bytes at offset ‘(long unsigned int)(count + 4294967295) * 16 + 8’ exceeds the buffer
#  196|       }
#  197|   
#  198|->     rc = encrypt_DATA(t[count - 1].hsess, t[count - 1].hkey, 16);
#  199|       if (rc == FALSE) {
#  200|           testcase_error("encrypt_DATA #2");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:204:5: warning[-Wanalyzer-malloc-leak]: leak of ‘t’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:163:5: enter_function: entry to ‘do_SessionPerformance’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:175:29: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:176:8: branch_false: following ‘false’ branch (when ‘t’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:176:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:182:17: branch_false: following ‘false’ branch (when ‘count <= i’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:191:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:192:10: call_function: calling ‘encrypt_DATA’ from ‘do_SessionPerformance’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:192:10: return_function: returning to ‘do_SessionPerformance’ from ‘encrypt_DATA’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:193:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:198:45: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:198:10: call_function: calling ‘encrypt_DATA’ from ‘do_SessionPerformance’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:198:10: return_function: returning to ‘do_SessionPerformance’ from ‘encrypt_DATA’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:199:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:203:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:204:5: throw: if ‘process_time’ throws an exception...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:204:5: danger: ‘t’ leaks here; was allocated at [(2)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/1)
#  202|       }
#  203|       GetSystemTime(&t2);
#  204|->     process_time(t1, t2);
#  205|   
#  206|       for (i = 0; i < count; i++) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
opencryptoki-3.26.0/testcases/policy/policytest.c:455:10: warning[-Wanalyzer-malloc-leak]: leak of ‘res’
opencryptoki-3.26.0/testcases/policy/policytest.c:450:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/policy/policytest.c:452:11: branch_false: ...to here
opencryptoki-3.26.0/testcases/policy/policytest.c:452:11: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/policy/policytest.c:453:8: branch_false: following ‘false’ branch (when ‘res’ is non-NULL)...
opencryptoki-3.26.0/testcases/policy/policytest.c:455:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/policy/policytest.c:455:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/testcases/policy/policytest.c:455:10: danger: ‘res’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  453|       if (!res)
#  454|           return CKR_HOST_MEMORY;
#  455|->     rc = funcs->C_WrapKey(session, &mech, key, key, res, len);
#  456|       if (rc != CKR_OK) {
#  457|           free(res);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE 'hsm_mk_change_op_open(id,  slot_id, "r")'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:844:7: enter_function: entry to 'hsm_mk_change_token_mkvps_load'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: call_function: calling 'hsm_mk_change_op_open' from 'hsm_mk_change_token_mkvps_load'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: return_function: returning to 'hsm_mk_change_token_mkvps_load' from 'hsm_mk_change_op_open'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:859:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:859:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: 'hsm_mk_change_op_open(id,  slot_id, "r")' leaks here; was opened at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE 'hsm_mk_change_op_open(id,  slot_id, "w")'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:800:7: enter_function: entry to 'hsm_mk_change_token_mkvps_save'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: call_function: calling 'hsm_mk_change_mkvps_flatten' from 'hsm_mk_change_token_mkvps_save'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: return_function: returning to 'hsm_mk_change_token_mkvps_save' from 'hsm_mk_change_mkvps_flatten'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:810:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:814:8: branch_false: following 'false' branch (when 'buff' is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: call_function: calling 'hsm_mk_change_mkvps_flatten' from 'hsm_mk_change_token_mkvps_save'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: return_function: returning to 'hsm_mk_change_token_mkvps_save' from 'hsm_mk_change_mkvps_flatten'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:820:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: call_function: calling 'hsm_mk_change_op_open' from 'hsm_mk_change_token_mkvps_save'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: return_function: returning to 'hsm_mk_change_token_mkvps_save' from 'hsm_mk_change_op_open'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:824:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:829:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:829:5: call_function: calling 'hsm_mk_change_op_set_perm' from 'hsm_mk_change_token_mkvps_save'
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE 'hsm_mk_change_op_open(id, 18446744073709551615, "r")'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:698:7: enter_function: entry to 'hsm_mk_change_op_load'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: call_function: calling 'hsm_mk_change_op_open' from 'hsm_mk_change_op_load'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: return_function: returning to 'hsm_mk_change_op_load' from 'hsm_mk_change_op_open'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:710:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:714:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:714:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: 'hsm_mk_change_op_open(id, 18446744073709551615, "r")' leaks here; was opened at [(8)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/7)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘hsm_mk_change_op_open(id,  slot_id, "r")’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:844:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: return_function: returning to ‘hsm_mk_change_token_mkvps_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:855:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:859:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:859:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘hsm_mk_change_op_open(id,  slot_id, "r")’ leaks here; was opened at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘hsm_mk_change_op_open(id,  slot_id, "w")’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:800:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:810:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:814:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:820:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:824:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:829:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:829:5: call_function: calling ‘hsm_mk_change_op_set_perm’ from ‘hsm_mk_change_token_mkvps_save’
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘hsm_mk_change_op_open(id, 18446744073709551615, "r")’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:698:7: enter_function: entry to ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: return_function: returning to ‘hsm_mk_change_op_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:710:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:714:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:714:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘hsm_mk_change_op_open(id, 18446744073709551615, "r")’ leaks here; was opened at [(8)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/7)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘open_datastore_file(&fname, 4096,  data_store,  nvtok_name, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1045:14: enter_function: entry to ‘load_NVTOK_DAT’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1062:10: call_function: calling ‘open_datastore_file’ from ‘load_NVTOK_DAT’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1062:10: return_function: returning to ‘load_NVTOK_DAT’ from ‘open_datastore_file’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1063:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1066:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1067:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1073:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1076:15: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1076:15: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1080:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1080:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_datastore_file(&fname, 4096,  data_store,  nvtok_name, "r")’ leaks here; was opened at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def51]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘open_datastore_file(&fname, 4096,  data_store, "MK_SO_312", "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1538:14: enter_function: entry to ‘create_MK_SO_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1552:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1559:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1560:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1566:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1566:10: call_function: calling ‘open_datastore_file’ from ‘create_MK_SO_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1566:10: return_function: returning to ‘create_MK_SO_312’ from ‘open_datastore_file’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1567:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1572:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1572:11: throw: if ‘set_perm’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_datastore_file(&fname, 4096,  data_store, "MK_SO_312", "w")’ leaks here; was opened at [(10)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/9)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘open_datastore_file(&fname, 4096,  data_store, "MK_USER_312", "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1483:14: enter_function: entry to ‘create_MK_USER_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1497:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1504:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1505:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1509:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1509:10: call_function: calling ‘open_datastore_file’ from ‘create_MK_USER_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1509:10: return_function: returning to ‘create_MK_USER_312’ from ‘open_datastore_file’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1510:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1514:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1514:11: throw: if ‘set_perm’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_datastore_file(&fname, 4096,  data_store, "MK_USER_312", "w")’ leaks here; was opened at [(10)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/9)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘open_datastore_file(&fname, 4096,  data_store, "NVTOK.DAT", "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1596:14: enter_function: entry to ‘read_NVTOK_DAT_00’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1606:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1611:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1611:10: call_function: calling ‘open_datastore_file’ from ‘read_NVTOK_DAT_00’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1611:10: return_function: returning to ‘read_NVTOK_DAT_00’ from ‘open_datastore_file’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1612:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1615:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1616:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1622:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1623:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1623:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_datastore_file(&fname, 4096,  data_store, "NVTOK.DAT", "r")’ leaks here; was opened at [(8)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/7)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘open_datastore_file(&fname, 4096,  data_store, "NVTOK.DAT_312", "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1719:14: enter_function: entry to ‘create_NVTOK_DAT_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1731:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1738:10: call_function: calling ‘open_datastore_file’ from ‘create_NVTOK_DAT_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1738:10: return_function: returning to ‘create_NVTOK_DAT_312’ from ‘open_datastore_file’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1739:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1743:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1743:11: throw: if ‘set_perm’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_datastore_file(&fname, 4096,  data_store, "NVTOK.DAT_312", "w")’ leaks here; was opened at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘open_tokenobject(&fname, 4096,  data_store, "TOK_OBJ",  name, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:580:14: enter_function: entry to ‘read_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:594:10: call_function: calling ‘open_tokenobject’ from ‘read_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:594:10: return_function: returning to ‘read_object’ from ‘open_tokenobject’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:595:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:601:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:602:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:611:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:611:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:619:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:620:11: call_function: calling ‘read_object_00’ from ‘read_object’
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘open_tokenobject(&fname, 4096,  data_store, "TOK_OBJ",  name, "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:186:14: enter_function: entry to ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:198:11: call_function: calling ‘make_OBJECT_PUB_312’ from ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:198:11: return_function: returning to ‘migrate_public_token_object’ from ‘make_OBJECT_PUB_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:199:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: call_function: calling ‘open_tokenobject’ from ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: return_function: returning to ‘migrate_public_token_object’ from ‘open_tokenobject’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:206:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:210:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:210:11: throw: if ‘set_perm’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_tokenobject(&fname, 4096,  data_store, "TOK_OBJ",  name, "w")’ leaks here; was opened at [(15)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/14)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘open_tokenobject(__builtin_alloca_with_align(4113, 8), 4113, data_store, "TOK_OBJ", "OBJ.IDX", "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:642:14: enter_function: entry to ‘migrate_token_objects’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:661:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:661:9: branch_false: following ‘false’ branch (when ‘user_wrap_key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:669:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:669:10: call_function: calling ‘open_tokenobject’ from ‘migrate_token_objects’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:669:10: return_function: returning to ‘migrate_token_objects’ from ‘open_tokenobject’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:671:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:671:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:677:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:708:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:708:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:709:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:709:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_tokenobject(__builtin_alloca_with_align(4113, 8), 4113, data_store, "TOK_OBJ", "OBJ.IDX", "r")’ leaks here; was opened at [(10)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/9)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-malloc-leak]: leak of ‘hsm_mk_change_op_open(id,  slot_id, "r")’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:844:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: return_function: returning to ‘hsm_mk_change_token_mkvps_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:855:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:859:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:859:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘hsm_mk_change_op_open(id,  slot_id, "r")’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-malloc-leak]: leak of ‘hsm_mk_change_op_open(id,  slot_id, "w")’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:800:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:810:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:814:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:820:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:824:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:829:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:829:5: call_function: calling ‘hsm_mk_change_op_set_perm’ from ‘hsm_mk_change_token_mkvps_save’
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-malloc-leak]: leak of ‘hsm_mk_change_op_open(id, 18446744073709551615, "r")’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:698:7: enter_function: entry to ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: return_function: returning to ‘hsm_mk_change_op_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:710:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:714:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:714:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘hsm_mk_change_op_open(id, 18446744073709551615, "r")’ leaks here; was allocated at [(8)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/7)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-malloc-leak]: leak of ‘open_datastore_file(&fname, 4096,  data_store,  nvtok_name, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1045:14: enter_function: entry to ‘load_NVTOK_DAT’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1062:10: call_function: calling ‘open_datastore_file’ from ‘load_NVTOK_DAT’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1062:10: return_function: returning to ‘load_NVTOK_DAT’ from ‘open_datastore_file’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1063:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1066:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1067:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1073:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1076:15: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1076:15: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1080:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1080:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_datastore_file(&fname, 4096,  data_store,  nvtok_name, "r")’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-malloc-leak]: leak of ‘open_datastore_file(&fname, 4096,  data_store, "MK_SO_312", "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1538:14: enter_function: entry to ‘create_MK_SO_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1552:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1559:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1560:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1566:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1566:10: call_function: calling ‘open_datastore_file’ from ‘create_MK_SO_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1566:10: return_function: returning to ‘create_MK_SO_312’ from ‘open_datastore_file’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1567:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1572:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1572:11: throw: if ‘set_perm’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_datastore_file(&fname, 4096,  data_store, "MK_SO_312", "w")’ leaks here; was allocated at [(10)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/9)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-malloc-leak]: leak of ‘open_datastore_file(&fname, 4096,  data_store, "MK_USER_312", "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1483:14: enter_function: entry to ‘create_MK_USER_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1497:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1504:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1505:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1509:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1509:10: call_function: calling ‘open_datastore_file’ from ‘create_MK_USER_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1509:10: return_function: returning to ‘create_MK_USER_312’ from ‘open_datastore_file’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1510:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1514:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1514:11: throw: if ‘set_perm’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_datastore_file(&fname, 4096,  data_store, "MK_USER_312", "w")’ leaks here; was allocated at [(10)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/9)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-malloc-leak]: leak of ‘open_datastore_file(&fname, 4096,  data_store, "NVTOK.DAT", "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1596:14: enter_function: entry to ‘read_NVTOK_DAT_00’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1606:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1611:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1611:10: call_function: calling ‘open_datastore_file’ from ‘read_NVTOK_DAT_00’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1611:10: return_function: returning to ‘read_NVTOK_DAT_00’ from ‘open_datastore_file’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1612:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1615:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1616:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1622:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1623:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1623:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_datastore_file(&fname, 4096,  data_store, "NVTOK.DAT", "r")’ leaks here; was allocated at [(8)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/7)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-malloc-leak]: leak of ‘open_datastore_file(&fname, 4096,  data_store, "NVTOK.DAT_312", "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1719:14: enter_function: entry to ‘create_NVTOK_DAT_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1731:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1738:10: call_function: calling ‘open_datastore_file’ from ‘create_NVTOK_DAT_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1738:10: return_function: returning to ‘create_NVTOK_DAT_312’ from ‘open_datastore_file’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1739:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1743:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1743:11: throw: if ‘set_perm’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_datastore_file(&fname, 4096,  data_store, "NVTOK.DAT_312", "w")’ leaks here; was allocated at [(8)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/7)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-malloc-leak]: leak of ‘open_tokenobject(&fname, 4096,  data_store, "TOK_OBJ",  name, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:580:14: enter_function: entry to ‘read_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:594:10: call_function: calling ‘open_tokenobject’ from ‘read_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:594:10: return_function: returning to ‘read_object’ from ‘open_tokenobject’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:595:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:601:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:602:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:611:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:611:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:619:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:620:11: call_function: calling ‘read_object_00’ from ‘read_object’
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-malloc-leak]: leak of ‘open_tokenobject(&fname, 4096,  data_store, "TOK_OBJ",  name, "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:186:14: enter_function: entry to ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:198:11: call_function: calling ‘make_OBJECT_PUB_312’ from ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:198:11: return_function: returning to ‘migrate_public_token_object’ from ‘make_OBJECT_PUB_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:199:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: call_function: calling ‘open_tokenobject’ from ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: return_function: returning to ‘migrate_public_token_object’ from ‘open_tokenobject’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:206:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:210:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:210:11: throw: if ‘set_perm’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_tokenobject(&fname, 4096,  data_store, "TOK_OBJ",  name, "w")’ leaks here; was allocated at [(15)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/14)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: warning[-Wanalyzer-malloc-leak]: leak of ‘open_tokenobject(__builtin_alloca_with_align(4113, 8), 4113, data_store, "TOK_OBJ", "OBJ.IDX", "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:642:14: enter_function: entry to ‘migrate_token_objects’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:661:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:661:9: branch_false: following ‘false’ branch (when ‘user_wrap_key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:669:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:669:10: call_function: calling ‘open_tokenobject’ from ‘migrate_token_objects’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:669:10: return_function: returning to ‘migrate_token_objects’ from ‘open_tokenobject’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:671:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:671:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:677:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:708:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:708:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:709:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:709:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/include/slotmgr.h:321:18: danger: ‘open_tokenobject(__builtin_alloca_with_align(4113, 8), 4113, data_store, "TOK_OBJ", "OBJ.IDX", "r")’ leaks here; was allocated at [(10)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/9)
#  319|       va_end(ap);
#  320|   
#  321|->     if (n < 0 || (size_t)n >= buflen)
#  322|           return -1;
#  323|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def69]
opencryptoki-3.26.0/usr/lib/api/policy.c:1646:11: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen("/etc/opencryptoki/strength.conf", "r")'
opencryptoki-3.26.0/usr/lib/api/policy.c:2152:7: enter_function: entry to 'policy_load'
opencryptoki-3.26.0/usr/lib/api/policy.c:2162:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/api/policy.c:2163:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/api/policy.c:2172:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/api/policy.c:2172:10: call_function: calling 'policy_check_cfg_file' from 'policy_load'
# 1644|       int err;
# 1645|   
# 1646|->     grp = getgrnam(PKCS_GROUP);
# 1647|       if (!grp) {
# 1648|           TRACE_ERROR("Could not retrieve \"%s\" group!", PKCS_GROUP);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def70]
opencryptoki-3.26.0/usr/lib/api/policy.c:1648:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen("/etc/opencryptoki/strength.conf", "r")'
opencryptoki-3.26.0/usr/lib/api/policy.c:2152:7: enter_function: entry to 'policy_load'
opencryptoki-3.26.0/usr/lib/api/policy.c:2162:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/api/policy.c:2163:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/api/policy.c:2172:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/api/policy.c:2172:10: call_function: calling 'policy_check_cfg_file' from 'policy_load'
# 1646|       grp = getgrnam(PKCS_GROUP);
# 1647|       if (!grp) {
# 1648|->         TRACE_ERROR("Could not retrieve \"%s\" group!", PKCS_GROUP);
# 1649|           OCK_SYSLOG(LOG_ERR, "POLICY: Could not retrieve \"%s\" group!",
# 1650|                      PKCS_GROUP);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
opencryptoki-3.26.0/usr/lib/api/policy.c:1655:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen("/etc/opencryptoki/strength.conf", "r")'
opencryptoki-3.26.0/usr/lib/api/policy.c:2152:7: enter_function: entry to 'policy_load'
opencryptoki-3.26.0/usr/lib/api/policy.c:2162:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/api/policy.c:2163:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/api/policy.c:2172:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/api/policy.c:2172:10: call_function: calling 'policy_check_cfg_file' from 'policy_load'
# 1653|       if (fstat(fileno(fp), &statbuf)) {
# 1654|           err = errno;
# 1655|->         TRACE_ERROR("Could not stat configuration file %s: %s\n",
# 1656|                       name, strerror(err));
# 1657|           OCK_SYSLOG(LOG_ERR, "POLICY: Could not stat configuration file %s: %s\n",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def72]
opencryptoki-3.26.0/usr/lib/api/policy.c:1661:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen("/etc/opencryptoki/strength.conf", "r")'
opencryptoki-3.26.0/usr/lib/api/policy.c:2152:7: enter_function: entry to 'policy_load'
opencryptoki-3.26.0/usr/lib/api/policy.c:2162:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/api/policy.c:2163:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/api/policy.c:2172:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/api/policy.c:2172:10: call_function: calling 'policy_check_cfg_file' from 'policy_load'
# 1659|           return CKR_GENERAL_ERROR;
# 1660|       }
# 1661|->     if (statbuf.st_uid != 0) {
# 1662|           TRACE_ERROR("Policy configuration file %s should be owned by \"root\"!\n",
# 1663|                       name);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def73]
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:245:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:204:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:207:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:207:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:212:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:244:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:245:70: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:245:9: danger: out-of-bounds write from byte 256 till byte 263 but 'rule_array' ends at byte 256
#  243|   
#  244|       if (cca_private->dom_any) {
#  245|->         sprintf((char *)(rule_array + CCA_KEYWORD_SIZE), "DOMN%04u", ssd.domain);
#  246|           rule_array_count = 2;
#  247|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def74]
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:1213:11: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(&*cca_private.token_config_filename, "r")'
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:1203:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:1206:18: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:1206:12: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:1207:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:1213:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:1213:11: throw: if 'parse_configlib_file' throws an exception...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_mkchange.c:1213:11: danger: 'fopen(&*cca_private.token_config_filename, "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 1211|       }
# 1212|   
# 1213|->     ret = parse_configlib_file(file, &config, cca_config_parse_error, 0);
# 1214|       if (ret != 0) {
# 1215|           TRACE_ERROR("Error parsing config file '%s'\n",

Error: GCC_ANALYZER_WARNING (CWE-121): [#def75]
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:1693:13: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:1776:7: enter_function: entry to 'cca_iterate_adapters'
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:1803:15: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:1803:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:1810:40: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:1812:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:1814:19: call_function: calling 'cca_iterate_domains' from 'cca_iterate_adapters'
# 1691|   
# 1692|           if (cca_private->dom_any) {
# 1693|->             sprintf((char *)(rule_array + CCA_KEYWORD_SIZE), "DOMN%04u",
# 1694|                       cca_private->usage_domains[i]);
# 1695|               rule_array_count = 2;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def76]
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:2201:11: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(&fname, "r")'
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:2181:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:2184:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:2186:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:2194:12: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:2195:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:2201:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:2201:11: throw: if 'parse_configlib_file' throws an exception...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:2201:11: danger: 'fopen(&fname, "r")' leaks here; was opened at [(6)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/5)
# 2199|       }
# 2200|   
# 2201|->     ret = parse_configlib_file(file, &config, cca_config_parse_error, 0);
# 2202|       if (ret != 0) {
# 2203|           TRACE_ERROR("Error parsing config file '%s'\n", fname);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def77]
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:15238:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(fname, "r")'
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:15233:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:15234:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:15238:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:15238:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:15239:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:15239:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/cca_stdll/cca_specific.c:15238:9: danger: 'fopen(fname, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/0)
#15236|           return CKR_FUNCTION_FAILED;
#15237|       }
#15238|->     if (fgets(buf, buflen, fp) == NULL) {
#15239|           TRACE_ERROR("Failed to read from file '%s'\n", fname);
#15240|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
opencryptoki-3.26.0/usr/lib/common/attributes.c:104:17: warning[-Wanalyzer-malloc-leak]: leak of 'dest'
opencryptoki-3.26.0/usr/lib/common/attributes.c:138:7: enter_function: entry to 'dup_attribute_array'
opencryptoki-3.26.0/usr/lib/common/attributes.c:153:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/attributes.c:154:8: branch_false: following 'false' branch (when 'dest' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/attributes.c:159:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/attributes.c:159:10: call_function: calling 'dup_attribute_array_no_alloc' from 'dup_attribute_array'
#  102|           it->ulValueLen = orig->ulValueLen;
#  103|           if (it->ulValueLen > 0) {
#  104|->             if (is_attribute_attr_array(it->type)) {
#  105|                   rc = dup_attribute_array((CK_ATTRIBUTE_PTR)orig->pValue,
#  106|                                   orig->ulValueLen / sizeof(CK_ATTRIBUTE),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
opencryptoki-3.26.0/usr/lib/common/attributes.c:115:21: warning[-Wanalyzer-malloc-leak]: leak of 'dest'
opencryptoki-3.26.0/usr/lib/common/attributes.c:138:7: enter_function: entry to 'dup_attribute_array'
opencryptoki-3.26.0/usr/lib/common/attributes.c:154:8: branch_false: following 'false' branch (when 'dest' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/attributes.c:159:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/attributes.c:159:10: call_function: calling 'dup_attribute_array_no_alloc' from 'dup_attribute_array'
#  113|                   it->pValue = malloc(it->ulValueLen);
#  114|                   if (it->pValue == NULL) {
#  115|->                     TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  116|                       rc = CKR_HOST_MEMORY;
#  117|                       goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
opencryptoki-3.26.0/usr/lib/common/attributes.c:155:9: warning[-Wanalyzer-malloc-leak]: leak of 'dest'
opencryptoki-3.26.0/usr/lib/common/attributes.c:138:7: enter_function: entry to 'dup_attribute_array'
opencryptoki-3.26.0/usr/lib/common/attributes.c:153:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/attributes.c:154:8: branch_false: following 'false' branch (when 'dest' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/attributes.c:159:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/attributes.c:159:10: call_function: calling 'dup_attribute_array_no_alloc' from 'dup_attribute_array'
#  153|       dest = malloc(dest_len * sizeof(*dest));
#  154|       if (dest == NULL) {
#  155|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  156|           return CKR_HOST_MEMORY;
#  157|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: warning[-Wanalyzer-malloc-leak]: leak of 'category_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:88:38: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: danger: 'category_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   95|       if (!trusted_attr || !category_attr || !chkval_attr || !start_attr ||
#   96|           !end_attr || !pki_attr) {
#   97|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#   98|           rc = CKR_HOST_MEMORY;
#   99|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: warning[-Wanalyzer-malloc-leak]: leak of 'chkval_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:90:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: danger: 'chkval_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   95|       if (!trusted_attr || !category_attr || !chkval_attr || !start_attr ||
#   96|           !end_attr || !pki_attr) {
#   97|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#   98|           rc = CKR_HOST_MEMORY;
#   99|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: warning[-Wanalyzer-malloc-leak]: leak of 'end_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:92:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: danger: 'end_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   95|       if (!trusted_attr || !category_attr || !chkval_attr || !start_attr ||
#   96|           !end_attr || !pki_attr) {
#   97|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#   98|           rc = CKR_HOST_MEMORY;
#   99|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: warning[-Wanalyzer-malloc-leak]: leak of 'pki_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:93:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: danger: 'pki_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#   95|       if (!trusted_attr || !category_attr || !chkval_attr || !start_attr ||
#   96|           !end_attr || !pki_attr) {
#   97|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#   98|           rc = CKR_HOST_MEMORY;
#   99|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: warning[-Wanalyzer-malloc-leak]: leak of 'start_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:91:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: danger: 'start_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   95|       if (!trusted_attr || !category_attr || !chkval_attr || !start_attr ||
#   96|           !end_attr || !pki_attr) {
#   97|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#   98|           rc = CKR_HOST_MEMORY;
#   99|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: warning[-Wanalyzer-malloc-leak]: leak of 'trusted_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:87:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:97:9: danger: 'trusted_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   95|       if (!trusted_attr || !category_attr || !chkval_attr || !start_attr ||
#   96|           !end_attr || !pki_attr) {
#   97|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#   98|           rc = CKR_HOST_MEMORY;
#   99|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: warning[-Wanalyzer-malloc-leak]: leak of 'category_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:88:38: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: danger: 'category_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  127|       pki_attr->pValue = NULL;
#  128|   
#  129|->     rc = template_update_attribute(tmpl, trusted_attr);
#  130|       if (rc != CKR_OK) {
#  131|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: warning[-Wanalyzer-malloc-leak]: leak of 'chkval_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:90:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:44: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:96:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: danger: 'chkval_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  127|       pki_attr->pValue = NULL;
#  128|   
#  129|->     rc = template_update_attribute(tmpl, trusted_attr);
#  130|       if (rc != CKR_OK) {
#  131|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: warning[-Wanalyzer-malloc-leak]: leak of 'end_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:92:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: danger: 'end_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  127|       pki_attr->pValue = NULL;
#  128|   
#  129|->     rc = template_update_attribute(tmpl, trusted_attr);
#  130|       if (rc != CKR_OK) {
#  131|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: warning[-Wanalyzer-malloc-leak]: leak of 'pki_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:93:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: danger: 'pki_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
#  127|       pki_attr->pValue = NULL;
#  128|   
#  129|->     rc = template_update_attribute(tmpl, trusted_attr);
#  130|       if (rc != CKR_OK) {
#  131|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: warning[-Wanalyzer-malloc-leak]: leak of 'start_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:91:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:44: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:96:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: danger: 'start_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  127|       pki_attr->pValue = NULL;
#  128|   
#  129|->     rc = template_update_attribute(tmpl, trusted_attr);
#  130|       if (rc != CKR_OK) {
#  131|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: warning[-Wanalyzer-malloc-leak]: leak of 'trusted_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:87:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:129:10: danger: 'trusted_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  127|       pki_attr->pValue = NULL;
#  128|   
#  129|->     rc = template_update_attribute(tmpl, trusted_attr);
#  130|       if (rc != CKR_OK) {
#  131|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: warning[-Wanalyzer-malloc-leak]: leak of 'category_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:88:38: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: danger: 'category_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  129|       rc = template_update_attribute(tmpl, trusted_attr);
#  130|       if (rc != CKR_OK) {
#  131|->         TRACE_DEVEL("template_update_attribute failed\n");
#  132|           goto error;
#  133|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: warning[-Wanalyzer-malloc-leak]: leak of 'chkval_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:90:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:44: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:96:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: danger: 'chkval_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
#  129|       rc = template_update_attribute(tmpl, trusted_attr);
#  130|       if (rc != CKR_OK) {
#  131|->         TRACE_DEVEL("template_update_attribute failed\n");
#  132|           goto error;
#  133|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: warning[-Wanalyzer-malloc-leak]: leak of 'end_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:92:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: danger: 'end_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
#  129|       rc = template_update_attribute(tmpl, trusted_attr);
#  130|       if (rc != CKR_OK) {
#  131|->         TRACE_DEVEL("template_update_attribute failed\n");
#  132|           goto error;
#  133|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: warning[-Wanalyzer-malloc-leak]: leak of 'pki_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:93:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: danger: 'pki_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
#  129|       rc = template_update_attribute(tmpl, trusted_attr);
#  130|       if (rc != CKR_OK) {
#  131|->         TRACE_DEVEL("template_update_attribute failed\n");
#  132|           goto error;
#  133|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: warning[-Wanalyzer-malloc-leak]: leak of 'start_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:91:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:44: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:96:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:131:9: danger: 'start_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
#  129|       rc = template_update_attribute(tmpl, trusted_attr);
#  130|       if (rc != CKR_OK) {
#  131|->         TRACE_DEVEL("template_update_attribute failed\n");
#  132|           goto error;
#  133|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: warning[-Wanalyzer-malloc-leak]: leak of 'category_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:88:38: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: danger: 'category_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/0)
#  133|       }
#  134|       trusted_attr = NULL;
#  135|->     rc = template_update_attribute(tmpl, category_attr);
#  136|       if (rc != CKR_OK) {
#  137|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: warning[-Wanalyzer-malloc-leak]: leak of 'chkval_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:90:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:44: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:96:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: danger: 'chkval_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
#  133|       }
#  134|       trusted_attr = NULL;
#  135|->     rc = template_update_attribute(tmpl, category_attr);
#  136|       if (rc != CKR_OK) {
#  137|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: warning[-Wanalyzer-malloc-leak]: leak of 'end_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:92:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: danger: 'end_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/0)
#  133|       }
#  134|       trusted_attr = NULL;
#  135|->     rc = template_update_attribute(tmpl, category_attr);
#  136|       if (rc != CKR_OK) {
#  137|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: warning[-Wanalyzer-malloc-leak]: leak of 'pki_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:93:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: danger: 'pki_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/0)
#  133|       }
#  134|       trusted_attr = NULL;
#  135|->     rc = template_update_attribute(tmpl, category_attr);
#  136|       if (rc != CKR_OK) {
#  137|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: warning[-Wanalyzer-malloc-leak]: leak of 'start_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:91:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:44: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:96:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: danger: 'start_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
#  133|       }
#  134|       trusted_attr = NULL;
#  135|->     rc = template_update_attribute(tmpl, category_attr);
#  136|       if (rc != CKR_OK) {
#  137|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: warning[-Wanalyzer-malloc-leak]: leak of 'chkval_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:90:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:44: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:96:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: danger: 'chkval_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/0)
#  135|       rc = template_update_attribute(tmpl, category_attr);
#  136|       if (rc != CKR_OK) {
#  137|->         TRACE_DEVEL("template_update_attribute failed\n");
#  138|           goto error;
#  139|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: warning[-Wanalyzer-malloc-leak]: leak of 'end_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:92:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: danger: 'end_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/0)
#  135|       rc = template_update_attribute(tmpl, category_attr);
#  136|       if (rc != CKR_OK) {
#  137|->         TRACE_DEVEL("template_update_attribute failed\n");
#  138|           goto error;
#  139|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: warning[-Wanalyzer-malloc-leak]: leak of 'pki_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:93:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: danger: 'pki_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/0)
#  135|       rc = template_update_attribute(tmpl, category_attr);
#  136|       if (rc != CKR_OK) {
#  137|->         TRACE_DEVEL("template_update_attribute failed\n");
#  138|           goto error;
#  139|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: warning[-Wanalyzer-malloc-leak]: leak of 'start_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:91:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:44: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:96:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:137:9: danger: 'start_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/0)
#  135|       rc = template_update_attribute(tmpl, category_attr);
#  136|       if (rc != CKR_OK) {
#  137|->         TRACE_DEVEL("template_update_attribute failed\n");
#  138|           goto error;
#  139|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: warning[-Wanalyzer-malloc-leak]: leak of 'chkval_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:90:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:44: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:96:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: danger: 'chkval_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/0)
#  139|       }
#  140|       category_attr = NULL;
#  141|->     rc = template_update_attribute(tmpl, chkval_attr);
#  142|       if (rc != CKR_OK) {
#  143|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: warning[-Wanalyzer-malloc-leak]: leak of 'end_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:92:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: danger: 'end_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/0)
#  139|       }
#  140|       category_attr = NULL;
#  141|->     rc = template_update_attribute(tmpl, chkval_attr);
#  142|       if (rc != CKR_OK) {
#  143|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: warning[-Wanalyzer-malloc-leak]: leak of 'pki_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:93:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: danger: 'pki_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/0)
#  139|       }
#  140|       category_attr = NULL;
#  141|->     rc = template_update_attribute(tmpl, chkval_attr);
#  142|       if (rc != CKR_OK) {
#  143|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: warning[-Wanalyzer-malloc-leak]: leak of 'start_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:91:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:44: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:96:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: danger: 'start_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/0)
#  139|       }
#  140|       category_attr = NULL;
#  141|->     rc = template_update_attribute(tmpl, chkval_attr);
#  142|       if (rc != CKR_OK) {
#  143|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
opencryptoki-3.26.0/usr/lib/common/cert.c:143:9: warning[-Wanalyzer-malloc-leak]: leak of 'end_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:92:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:142:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:143:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:143:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:143:9: danger: 'end_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/0)
#  141|       rc = template_update_attribute(tmpl, chkval_attr);
#  142|       if (rc != CKR_OK) {
#  143|->         TRACE_DEVEL("template_update_attribute failed\n");
#  144|           goto error;
#  145|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def112]
opencryptoki-3.26.0/usr/lib/common/cert.c:143:9: warning[-Wanalyzer-malloc-leak]: leak of 'pki_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:93:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:142:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:143:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:143:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:143:9: danger: 'pki_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/0)
#  141|       rc = template_update_attribute(tmpl, chkval_attr);
#  142|       if (rc != CKR_OK) {
#  143|->         TRACE_DEVEL("template_update_attribute failed\n");
#  144|           goto error;
#  145|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def113]
opencryptoki-3.26.0/usr/lib/common/cert.c:143:9: warning[-Wanalyzer-malloc-leak]: leak of 'start_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:91:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:44: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:96:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:142:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:143:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:143:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:143:9: danger: 'start_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/0)
#  141|       rc = template_update_attribute(tmpl, chkval_attr);
#  142|       if (rc != CKR_OK) {
#  143|->         TRACE_DEVEL("template_update_attribute failed\n");
#  144|           goto error;
#  145|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: warning[-Wanalyzer-malloc-leak]: leak of 'end_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:92:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:142:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: danger: 'end_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/0)
#  145|       }
#  146|       chkval_attr = NULL;
#  147|->     rc = template_update_attribute(tmpl, start_attr);
#  148|       if (rc != CKR_OK) {
#  149|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: warning[-Wanalyzer-malloc-leak]: leak of 'pki_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:93:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:142:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: danger: 'pki_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/0)
#  145|       }
#  146|       chkval_attr = NULL;
#  147|->     rc = template_update_attribute(tmpl, start_attr);
#  148|       if (rc != CKR_OK) {
#  149|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: warning[-Wanalyzer-malloc-leak]: leak of 'start_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:91:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:44: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:96:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:142:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: danger: 'start_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/0)
#  145|       }
#  146|       chkval_attr = NULL;
#  147|->     rc = template_update_attribute(tmpl, start_attr);
#  148|       if (rc != CKR_OK) {
#  149|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
opencryptoki-3.26.0/usr/lib/common/cert.c:149:9: warning[-Wanalyzer-malloc-leak]: leak of 'end_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:92:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:142:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:148:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:149:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:149:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:149:9: danger: 'end_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/0)
#  147|       rc = template_update_attribute(tmpl, start_attr);
#  148|       if (rc != CKR_OK) {
#  149|->         TRACE_DEVEL("template_update_attribute failed\n");
#  150|           goto error;
#  151|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
opencryptoki-3.26.0/usr/lib/common/cert.c:149:9: warning[-Wanalyzer-malloc-leak]: leak of 'pki_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:93:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:142:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:148:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:149:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:149:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:149:9: danger: 'pki_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/0)
#  147|       rc = template_update_attribute(tmpl, start_attr);
#  148|       if (rc != CKR_OK) {
#  149|->         TRACE_DEVEL("template_update_attribute failed\n");
#  150|           goto error;
#  151|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
opencryptoki-3.26.0/usr/lib/common/cert.c:153:10: warning[-Wanalyzer-malloc-leak]: leak of 'end_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:92:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:142:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:148:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:153:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:153:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:153:10: danger: 'end_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/0)
#  151|       }
#  152|       start_attr = NULL;
#  153|->     rc = template_update_attribute(tmpl, end_attr);
#  154|       if (rc != CKR_OK) {
#  155|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
opencryptoki-3.26.0/usr/lib/common/cert.c:153:10: warning[-Wanalyzer-malloc-leak]: leak of 'pki_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:93:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:142:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:148:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:153:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:153:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:153:10: danger: 'pki_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/0)
#  151|       }
#  152|       start_attr = NULL;
#  153|->     rc = template_update_attribute(tmpl, end_attr);
#  154|       if (rc != CKR_OK) {
#  155|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
opencryptoki-3.26.0/usr/lib/common/cert.c:155:9: warning[-Wanalyzer-malloc-leak]: leak of 'pki_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:93:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:142:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:148:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:153:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:154:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:155:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:155:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:155:9: danger: 'pki_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/0)
#  153|       rc = template_update_attribute(tmpl, end_attr);
#  154|       if (rc != CKR_OK) {
#  155|->         TRACE_DEVEL("template_update_attribute failed\n");
#  156|           goto error;
#  157|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
opencryptoki-3.26.0/usr/lib/common/cert.c:159:10: warning[-Wanalyzer-malloc-leak]: leak of 'pki_attr'
opencryptoki-3.26.0/usr/lib/common/cert.c:93:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/cert.c:95:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:95:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:130:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:135:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:136:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:141:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:142:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:147:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:148:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:153:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:154:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/cert.c:159:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/cert.c:159:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/cert.c:159:10: danger: 'pki_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/0)
#  157|       }
#  158|       end_attr = NULL;
#  159|->     rc = template_update_attribute(tmpl, pki_attr);
#  160|       if (rc != CKR_OK) {
#  161|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: warning[-Wanalyzer-malloc-leak]: leak of 'app_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:64:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: danger: 'app_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   67|   
#   68|       if (!class_attr || !app_attr || !value_attr || !objid_attr) {
#   69|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#   70|           rc = CKR_HOST_MEMORY;
#   71|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:63:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: danger: 'class_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   67|   
#   68|       if (!class_attr || !app_attr || !value_attr || !objid_attr) {
#   69|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#   70|           rc = CKR_HOST_MEMORY;
#   71|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: warning[-Wanalyzer-malloc-leak]: leak of 'objid_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:66:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: danger: 'objid_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   67|   
#   68|       if (!class_attr || !app_attr || !value_attr || !objid_attr) {
#   69|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#   70|           rc = CKR_HOST_MEMORY;
#   71|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:65:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:69:9: danger: 'value_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   67|   
#   68|       if (!class_attr || !app_attr || !value_attr || !objid_attr) {
#   69|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#   70|           rc = CKR_HOST_MEMORY;
#   71|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:91:10: warning[-Wanalyzer-malloc-leak]: leak of 'app_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:64:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:91:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:91:10: danger: 'app_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#   89|       *(CK_OBJECT_CLASS *) class_attr->pValue = CKO_DATA;
#   90|   
#   91|->     rc = template_update_attribute(tmpl, class_attr);
#   92|       if (rc != CKR_OK) {
#   93|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:91:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:63:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:91:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:91:10: danger: 'class_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#   89|       *(CK_OBJECT_CLASS *) class_attr->pValue = CKO_DATA;
#   90|   
#   91|->     rc = template_update_attribute(tmpl, class_attr);
#   92|       if (rc != CKR_OK) {
#   93|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:91:10: warning[-Wanalyzer-malloc-leak]: leak of 'objid_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:66:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:91:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:91:10: danger: 'objid_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#   89|       *(CK_OBJECT_CLASS *) class_attr->pValue = CKO_DATA;
#   90|   
#   91|->     rc = template_update_attribute(tmpl, class_attr);
#   92|       if (rc != CKR_OK) {
#   93|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:91:10: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:65:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:91:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:91:10: danger: 'value_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#   89|       *(CK_OBJECT_CLASS *) class_attr->pValue = CKO_DATA;
#   90|   
#   91|->     rc = template_update_attribute(tmpl, class_attr);
#   92|       if (rc != CKR_OK) {
#   93|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:93:9: warning[-Wanalyzer-malloc-leak]: leak of 'app_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:64:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:92:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:93:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:93:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:93:9: danger: 'app_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#   91|       rc = template_update_attribute(tmpl, class_attr);
#   92|       if (rc != CKR_OK) {
#   93|->         TRACE_DEVEL("template_update_attribute failed\n");
#   94|           goto error;
#   95|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:93:9: warning[-Wanalyzer-malloc-leak]: leak of 'objid_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:66:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:92:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:93:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:93:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:93:9: danger: 'objid_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#   91|       rc = template_update_attribute(tmpl, class_attr);
#   92|       if (rc != CKR_OK) {
#   93|->         TRACE_DEVEL("template_update_attribute failed\n");
#   94|           goto error;
#   95|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:93:9: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:65:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:92:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:93:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:93:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:93:9: danger: 'value_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#   91|       rc = template_update_attribute(tmpl, class_attr);
#   92|       if (rc != CKR_OK) {
#   93|->         TRACE_DEVEL("template_update_attribute failed\n");
#   94|           goto error;
#   95|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: warning[-Wanalyzer-malloc-leak]: leak of 'app_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:64:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:92:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: danger: 'app_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#   95|       }
#   96|       class_attr = NULL;
#   97|->     rc = template_update_attribute(tmpl, app_attr);
#   98|       if (rc != CKR_OK) {
#   99|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: warning[-Wanalyzer-malloc-leak]: leak of 'objid_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:66:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:92:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: danger: 'objid_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#   95|       }
#   96|       class_attr = NULL;
#   97|->     rc = template_update_attribute(tmpl, app_attr);
#   98|       if (rc != CKR_OK) {
#   99|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:65:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:92:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: danger: 'value_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#   95|       }
#   96|       class_attr = NULL;
#   97|->     rc = template_update_attribute(tmpl, app_attr);
#   98|       if (rc != CKR_OK) {
#   99|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:99:9: warning[-Wanalyzer-malloc-leak]: leak of 'objid_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:66:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:92:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:98:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:99:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:99:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:99:9: danger: 'objid_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#   97|       rc = template_update_attribute(tmpl, app_attr);
#   98|       if (rc != CKR_OK) {
#   99|->         TRACE_DEVEL("template_update_attribute failed\n");
#  100|           goto error;
#  101|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:99:9: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:65:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:92:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:98:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:99:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:99:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:99:9: danger: 'value_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#   97|       rc = template_update_attribute(tmpl, app_attr);
#   98|       if (rc != CKR_OK) {
#   99|->         TRACE_DEVEL("template_update_attribute failed\n");
#  100|           goto error;
#  101|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:103:10: warning[-Wanalyzer-malloc-leak]: leak of 'objid_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:66:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:92:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:98:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:103:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:103:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:103:10: danger: 'objid_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
#  101|       }
#  102|       app_attr = NULL;
#  103|->     rc = template_update_attribute(tmpl, value_attr);
#  104|       if (rc != CKR_OK) {
#  105|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:103:10: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:65:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:92:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:98:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:103:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:103:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:103:10: danger: 'value_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  101|       }
#  102|       app_attr = NULL;
#  103|->     rc = template_update_attribute(tmpl, value_attr);
#  104|       if (rc != CKR_OK) {
#  105|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:105:9: warning[-Wanalyzer-malloc-leak]: leak of 'objid_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:66:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:92:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:98:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:103:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:104:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:105:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:105:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:105:9: danger: 'objid_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  103|       rc = template_update_attribute(tmpl, value_attr);
#  104|       if (rc != CKR_OK) {
#  105|->         TRACE_DEVEL("template_update_attribute failed\n");
#  106|           goto error;
#  107|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
opencryptoki-3.26.0/usr/lib/common/data_obj.c:109:10: warning[-Wanalyzer-malloc-leak]: leak of 'objid_attr'
opencryptoki-3.26.0/usr/lib/common/data_obj.c:66:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:68:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:74:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:92:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:97:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:98:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:103:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:104:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:109:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/data_obj.c:109:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/data_obj.c:109:10: danger: 'objid_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
#  107|       }
#  108|       value_attr = NULL;
#  109|->     rc = template_update_attribute(tmpl, objid_attr);
#  110|       if (rc != CKR_OK) {
#  111|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:705:18: warning[-Wanalyzer-malloc-leak]: leak of 'ptr'
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:50:8: branch_false: following 'false' branch (when 'sess' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:54:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:54:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:60:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:62:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:71:49: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:72:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:78:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:78:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:113:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:132:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:144:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:356:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:362:50: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:364:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:369:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:369:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:377:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:692:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:693:27: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:694:12: branch_false: following 'false' branch (when 'ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:699:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:702:9: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:704:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:705:18: throw: if 'aes_gcm_dup_param' throws an exception...
opencryptoki-3.26.0/usr/lib/common/decr_mgr.c:705:18: danger: 'ptr' leaks here; was allocated at [(23)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/22)
#  703|           {
#  704|           case CKM_AES_GCM:
#  705|->             rc = aes_gcm_dup_param((CK_GCM_PARAMS *)mech->pParameter,
#  706|                                      (CK_GCM_PARAMS *)ptr);
#  707|               if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:176:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:164:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:166:8: branch_false: following 'false' branch (when 'local_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:171:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:176:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:176:10: danger: 'local_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  174|       *(CK_BBOOL *) local_attr->pValue = FALSE;
#  175|   
#  176|->     rc = template_update_attribute(tmpl, local_attr);
#  177|       if (rc != CKR_OK) {
#  178|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def145]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:356:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  361|       if (!prime_attr || !subprime_attr || !base_attr || !primebits_attr
#  362|           || !type_attr) {
#  363|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  364|           rc = CKR_HOST_MEMORY;
#  365|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: warning[-Wanalyzer-malloc-leak]: leak of 'prime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: danger: 'prime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  361|       if (!prime_attr || !subprime_attr || !base_attr || !primebits_attr
#  362|           || !type_attr) {
#  363|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  364|           rc = CKR_HOST_MEMORY;
#  365|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:357:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  361|       if (!prime_attr || !subprime_attr || !base_attr || !primebits_attr
#  362|           || !type_attr) {
#  363|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  364|           rc = CKR_HOST_MEMORY;
#  365|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: warning[-Wanalyzer-malloc-leak]: leak of 'subprime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:355:38: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: danger: 'subprime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  361|       if (!prime_attr || !subprime_attr || !base_attr || !primebits_attr
#  362|           || !type_attr) {
#  363|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  364|           rc = CKR_HOST_MEMORY;
#  365|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:359:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:363:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  361|       if (!prime_attr || !subprime_attr || !base_attr || !primebits_attr
#  362|           || !type_attr) {
#  363|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  364|           rc = CKR_HOST_MEMORY;
#  365|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:356:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  391|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DSA;
#  392|   
#  393|->     rc = template_update_attribute(tmpl, prime_attr);
#  394|       if (rc != CKR_OK) {
#  395|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: warning[-Wanalyzer-malloc-leak]: leak of 'prime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: danger: 'prime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
#  391|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DSA;
#  392|   
#  393|->     rc = template_update_attribute(tmpl, prime_attr);
#  394|       if (rc != CKR_OK) {
#  395|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:357:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
#  391|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DSA;
#  392|   
#  393|->     rc = template_update_attribute(tmpl, prime_attr);
#  394|       if (rc != CKR_OK) {
#  395|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: warning[-Wanalyzer-malloc-leak]: leak of 'subprime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:355:38: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: danger: 'subprime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
#  391|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DSA;
#  392|   
#  393|->     rc = template_update_attribute(tmpl, prime_attr);
#  394|       if (rc != CKR_OK) {
#  395|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:359:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:393:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
#  391|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DSA;
#  392|   
#  393|->     rc = template_update_attribute(tmpl, prime_attr);
#  394|       if (rc != CKR_OK) {
#  395|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:356:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
#  393|       rc = template_update_attribute(tmpl, prime_attr);
#  394|       if (rc != CKR_OK) {
#  395|->         TRACE_DEVEL("template_update_attribute failed\n");
#  396|           goto error;
#  397|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:357:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/2)
#  393|       rc = template_update_attribute(tmpl, prime_attr);
#  394|       if (rc != CKR_OK) {
#  395|->         TRACE_DEVEL("template_update_attribute failed\n");
#  396|           goto error;
#  397|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: warning[-Wanalyzer-malloc-leak]: leak of 'subprime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:355:38: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: danger: 'subprime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
#  393|       rc = template_update_attribute(tmpl, prime_attr);
#  394|       if (rc != CKR_OK) {
#  395|->         TRACE_DEVEL("template_update_attribute failed\n");
#  396|           goto error;
#  397|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def158]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:359:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:395:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/2)
#  393|       rc = template_update_attribute(tmpl, prime_attr);
#  394|       if (rc != CKR_OK) {
#  395|->         TRACE_DEVEL("template_update_attribute failed\n");
#  396|           goto error;
#  397|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:356:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/2)
#  397|       }
#  398|       prime_attr = NULL;
#  399|->     rc = template_update_attribute(tmpl, subprime_attr);
#  400|       if (rc != CKR_OK) {
#  401|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:357:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
#  397|       }
#  398|       prime_attr = NULL;
#  399|->     rc = template_update_attribute(tmpl, subprime_attr);
#  400|       if (rc != CKR_OK) {
#  401|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: warning[-Wanalyzer-malloc-leak]: leak of 'subprime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:355:38: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: danger: 'subprime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/2)
#  397|       }
#  398|       prime_attr = NULL;
#  399|->     rc = template_update_attribute(tmpl, subprime_attr);
#  400|       if (rc != CKR_OK) {
#  401|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:359:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/2)
#  397|       }
#  398|       prime_attr = NULL;
#  399|->     rc = template_update_attribute(tmpl, subprime_attr);
#  400|       if (rc != CKR_OK) {
#  401|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def163]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:401:9: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:356:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:400:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:401:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:401:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:401:9: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/2)
#  399|       rc = template_update_attribute(tmpl, subprime_attr);
#  400|       if (rc != CKR_OK) {
#  401|->         TRACE_DEVEL("template_update_attribute failed\n");
#  402|           goto error;
#  403|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:401:9: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:357:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:400:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:401:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:401:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:401:9: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/2)
#  399|       rc = template_update_attribute(tmpl, subprime_attr);
#  400|       if (rc != CKR_OK) {
#  401|->         TRACE_DEVEL("template_update_attribute failed\n");
#  402|           goto error;
#  403|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:401:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:359:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:400:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:401:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:401:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:401:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/2)
#  399|       rc = template_update_attribute(tmpl, subprime_attr);
#  400|       if (rc != CKR_OK) {
#  401|->         TRACE_DEVEL("template_update_attribute failed\n");
#  402|           goto error;
#  403|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:356:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/2)
#  403|       }
#  404|       subprime_attr = NULL;
#  405|->     rc = template_update_attribute(tmpl, base_attr);
#  406|       if (rc != CKR_OK) {
#  407|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:357:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/2)
#  403|       }
#  404|       subprime_attr = NULL;
#  405|->     rc = template_update_attribute(tmpl, base_attr);
#  406|       if (rc != CKR_OK) {
#  407|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:359:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/2)
#  403|       }
#  404|       subprime_attr = NULL;
#  405|->     rc = template_update_attribute(tmpl, base_attr);
#  406|       if (rc != CKR_OK) {
#  407|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:407:9: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:357:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:406:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:407:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:407:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:407:9: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/2)
#  405|       rc = template_update_attribute(tmpl, base_attr);
#  406|       if (rc != CKR_OK) {
#  407|->         TRACE_DEVEL("template_update_attribute failed\n");
#  408|           goto error;
#  409|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:407:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:359:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:406:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:407:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:407:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:407:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/2)
#  405|       rc = template_update_attribute(tmpl, base_attr);
#  406|       if (rc != CKR_OK) {
#  407|->         TRACE_DEVEL("template_update_attribute failed\n");
#  408|           goto error;
#  409|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def171]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:411:10: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:357:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:406:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:411:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:411:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:411:10: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/2)
#  409|       }
#  410|       base_attr = NULL;
#  411|->     rc = template_update_attribute(tmpl, primebits_attr);
#  412|       if (rc != CKR_OK) {
#  413|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def172]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:411:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:359:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:406:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:411:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:411:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:411:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/2)
#  409|       }
#  410|       base_attr = NULL;
#  411|->     rc = template_update_attribute(tmpl, primebits_attr);
#  412|       if (rc != CKR_OK) {
#  413|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:413:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:359:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:406:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:411:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:412:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:413:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:413:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:413:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/2)
#  411|       rc = template_update_attribute(tmpl, primebits_attr);
#  412|       if (rc != CKR_OK) {
#  413|->         TRACE_DEVEL("template_update_attribute failed\n");
#  414|           goto error;
#  415|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def174]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:417:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:354:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:359:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:361:9: branch_false: following 'false' branch (when 'type_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:368:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:394:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:399:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:405:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:406:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:411:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:412:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:417:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:417:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:417:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/2)
#  415|       }
#  416|       primebits_attr = NULL;
#  417|->     rc = template_update_attribute(tmpl, type_attr);
#  418|       if (rc != CKR_OK) {
#  419|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def175]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:454:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/2)
#  458|   
#  459|       if (!prime_attr || !base_attr || !primebits_attr || !type_attr) {
#  460|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  461|           rc = CKR_HOST_MEMORY;
#  462|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def176]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: warning[-Wanalyzer-malloc-leak]: leak of 'prime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: danger: 'prime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/2)
#  458|   
#  459|       if (!prime_attr || !base_attr || !primebits_attr || !type_attr) {
#  460|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  461|           rc = CKR_HOST_MEMORY;
#  462|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:455:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/2)
#  458|   
#  459|       if (!prime_attr || !base_attr || !primebits_attr || !type_attr) {
#  460|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  461|           rc = CKR_HOST_MEMORY;
#  462|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def178]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:457:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:460:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/2)
#  458|   
#  459|       if (!prime_attr || !base_attr || !primebits_attr || !type_attr) {
#  460|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  461|           rc = CKR_HOST_MEMORY;
#  462|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:482:10: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:454:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:482:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:482:10: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/2)
#  480|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DH;
#  481|   
#  482|->     rc = template_update_attribute(tmpl, prime_attr);
#  483|       if (rc != CKR_OK) {
#  484|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:482:10: warning[-Wanalyzer-malloc-leak]: leak of 'prime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:482:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:482:10: danger: 'prime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/2)
#  480|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DH;
#  481|   
#  482|->     rc = template_update_attribute(tmpl, prime_attr);
#  483|       if (rc != CKR_OK) {
#  484|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:482:10: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:455:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:465:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:482:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:482:10: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/2)
#  480|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DH;
#  481|   
#  482|->     rc = template_update_attribute(tmpl, prime_attr);
#  483|       if (rc != CKR_OK) {
#  484|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def182]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:482:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:457:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:465:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:482:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:482:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/2)
#  480|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DH;
#  481|   
#  482|->     rc = template_update_attribute(tmpl, prime_attr);
#  483|       if (rc != CKR_OK) {
#  484|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def183]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:484:9: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:454:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:483:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:484:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:484:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:484:9: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/2)
#  482|       rc = template_update_attribute(tmpl, prime_attr);
#  483|       if (rc != CKR_OK) {
#  484|->         TRACE_DEVEL("template_update_attribute failed\n");
#  485|           goto error;
#  486|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:484:9: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:455:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:465:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:483:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:484:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:484:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:484:9: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/2)
#  482|       rc = template_update_attribute(tmpl, prime_attr);
#  483|       if (rc != CKR_OK) {
#  484|->         TRACE_DEVEL("template_update_attribute failed\n");
#  485|           goto error;
#  486|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:484:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:457:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:465:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:483:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:484:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:484:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:484:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/62/codeFlows/0/threadFlows/0/locations/2)
#  482|       rc = template_update_attribute(tmpl, prime_attr);
#  483|       if (rc != CKR_OK) {
#  484|->         TRACE_DEVEL("template_update_attribute failed\n");
#  485|           goto error;
#  486|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:454:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:483:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/63/codeFlows/0/threadFlows/0/locations/2)
#  486|       }
#  487|       prime_attr = NULL;
#  488|->     rc = template_update_attribute(tmpl, base_attr);
#  489|       if (rc != CKR_OK) {
#  490|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:455:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:465:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:483:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/64/codeFlows/0/threadFlows/0/locations/2)
#  486|       }
#  487|       prime_attr = NULL;
#  488|->     rc = template_update_attribute(tmpl, base_attr);
#  489|       if (rc != CKR_OK) {
#  490|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:457:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:465:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:483:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/65/codeFlows/0/threadFlows/0/locations/2)
#  486|       }
#  487|       prime_attr = NULL;
#  488|->     rc = template_update_attribute(tmpl, base_attr);
#  489|       if (rc != CKR_OK) {
#  490|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:490:9: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:455:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:465:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:483:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:489:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:490:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:490:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:490:9: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/2)
#  488|       rc = template_update_attribute(tmpl, base_attr);
#  489|       if (rc != CKR_OK) {
#  490|->         TRACE_DEVEL("template_update_attribute failed\n");
#  491|           goto error;
#  492|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:490:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:457:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:465:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:483:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:489:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:490:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:490:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:490:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/2)
#  488|       rc = template_update_attribute(tmpl, base_attr);
#  489|       if (rc != CKR_OK) {
#  490|->         TRACE_DEVEL("template_update_attribute failed\n");
#  491|           goto error;
#  492|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:494:10: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:455:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:465:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:483:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:489:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:494:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:494:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:494:10: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/2)
#  492|       }
#  493|       base_attr = NULL;
#  494|->     rc = template_update_attribute(tmpl, primebits_attr);
#  495|       if (rc != CKR_OK) {
#  496|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:494:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:457:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:465:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:483:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:489:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:494:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:494:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:494:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/2)
#  492|       }
#  493|       base_attr = NULL;
#  494|->     rc = template_update_attribute(tmpl, primebits_attr);
#  495|       if (rc != CKR_OK) {
#  496|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:496:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:457:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:465:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:483:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:489:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:494:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:495:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:496:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:496:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:496:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/2)
#  494|       rc = template_update_attribute(tmpl, primebits_attr);
#  495|       if (rc != CKR_OK) {
#  496|->         TRACE_DEVEL("template_update_attribute failed\n");
#  497|           goto error;
#  498|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:500:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:450:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:453:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:457:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:459:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:465:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:483:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:488:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:489:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:494:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:495:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:500:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:500:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:500:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/2)
#  498|       }
#  499|       primebits_attr = NULL;
#  500|->     rc = template_update_attribute(tmpl, type_attr);
#  501|       if (rc != CKR_OK) {
#  502|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:538:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/74/codeFlows/0/threadFlows/0/locations/2)
#  544|       if (!prime_attr || !subprime_attr || !base_attr ||
#  545|           !primebits_attr || !subprimebits_attr || !type_attr) {
#  546|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  547|           rc = CKR_HOST_MEMORY;
#  548|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: warning[-Wanalyzer-malloc-leak]: leak of 'prime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: danger: 'prime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/72/codeFlows/0/threadFlows/0/locations/2)
#  544|       if (!prime_attr || !subprime_attr || !base_attr ||
#  545|           !primebits_attr || !subprimebits_attr || !type_attr) {
#  546|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  547|           rc = CKR_HOST_MEMORY;
#  548|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:539:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/75/codeFlows/0/threadFlows/0/locations/2)
#  544|       if (!prime_attr || !subprime_attr || !base_attr ||
#  545|           !primebits_attr || !subprimebits_attr || !type_attr) {
#  546|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  547|           rc = CKR_HOST_MEMORY;
#  548|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def198]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: warning[-Wanalyzer-malloc-leak]: leak of 'subprime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:537:38: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: danger: 'subprime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/73/codeFlows/0/threadFlows/0/locations/2)
#  544|       if (!prime_attr || !subprime_attr || !base_attr ||
#  545|           !primebits_attr || !subprimebits_attr || !type_attr) {
#  546|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  547|           rc = CKR_HOST_MEMORY;
#  548|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: warning[-Wanalyzer-malloc-leak]: leak of 'subprimebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:540:42: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: danger: 'subprimebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/76/codeFlows/0/threadFlows/0/locations/2)
#  544|       if (!prime_attr || !subprime_attr || !base_attr ||
#  545|           !primebits_attr || !subprimebits_attr || !type_attr) {
#  546|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  547|           rc = CKR_HOST_MEMORY;
#  548|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:542:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:546:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/77/codeFlows/0/threadFlows/0/locations/2)
#  544|       if (!prime_attr || !subprime_attr || !base_attr ||
#  545|           !primebits_attr || !subprimebits_attr || !type_attr) {
#  546|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  547|           rc = CKR_HOST_MEMORY;
#  548|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def201]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:538:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:545:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/94/codeFlows/0/threadFlows/0/locations/2)
#  574|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DSA;
#  575|   
#  576|->     rc = template_update_attribute(tmpl, prime_attr);
#  577|       if (rc != CKR_OK) {
#  578|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: warning[-Wanalyzer-malloc-leak]: leak of 'prime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: danger: 'prime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/92/codeFlows/0/threadFlows/0/locations/2)
#  574|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DSA;
#  575|   
#  576|->     rc = template_update_attribute(tmpl, prime_attr);
#  577|       if (rc != CKR_OK) {
#  578|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def203]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:539:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:545:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/95/codeFlows/0/threadFlows/0/locations/2)
#  574|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DSA;
#  575|   
#  576|->     rc = template_update_attribute(tmpl, prime_attr);
#  577|       if (rc != CKR_OK) {
#  578|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def204]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: warning[-Wanalyzer-malloc-leak]: leak of 'subprime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:537:38: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: danger: 'subprime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/93/codeFlows/0/threadFlows/0/locations/2)
#  574|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DSA;
#  575|   
#  576|->     rc = template_update_attribute(tmpl, prime_attr);
#  577|       if (rc != CKR_OK) {
#  578|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def205]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: warning[-Wanalyzer-malloc-leak]: leak of 'subprimebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:540:42: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: danger: 'subprimebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/96/codeFlows/0/threadFlows/0/locations/2)
#  574|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DSA;
#  575|   
#  576|->     rc = template_update_attribute(tmpl, prime_attr);
#  577|       if (rc != CKR_OK) {
#  578|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def206]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:542:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:576:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/97/codeFlows/0/threadFlows/0/locations/2)
#  574|       *(CK_KEY_TYPE *) type_attr->pValue = CKK_DSA;
#  575|   
#  576|->     rc = template_update_attribute(tmpl, prime_attr);
#  577|       if (rc != CKR_OK) {
#  578|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def207]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:538:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:545:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/99/codeFlows/0/threadFlows/0/locations/2)
#  576|       rc = template_update_attribute(tmpl, prime_attr);
#  577|       if (rc != CKR_OK) {
#  578|->         TRACE_DEVEL("template_update_attribute failed\n");
#  579|           goto error;
#  580|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:539:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:545:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/100/codeFlows/0/threadFlows/0/locations/2)
#  576|       rc = template_update_attribute(tmpl, prime_attr);
#  577|       if (rc != CKR_OK) {
#  578|->         TRACE_DEVEL("template_update_attribute failed\n");
#  579|           goto error;
#  580|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: warning[-Wanalyzer-malloc-leak]: leak of 'subprime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:537:38: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: danger: 'subprime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/98/codeFlows/0/threadFlows/0/locations/2)
#  576|       rc = template_update_attribute(tmpl, prime_attr);
#  577|       if (rc != CKR_OK) {
#  578|->         TRACE_DEVEL("template_update_attribute failed\n");
#  579|           goto error;
#  580|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: warning[-Wanalyzer-malloc-leak]: leak of 'subprimebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:540:42: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: danger: 'subprimebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/101/codeFlows/0/threadFlows/0/locations/2)
#  576|       rc = template_update_attribute(tmpl, prime_attr);
#  577|       if (rc != CKR_OK) {
#  578|->         TRACE_DEVEL("template_update_attribute failed\n");
#  579|           goto error;
#  580|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:542:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:578:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/102/codeFlows/0/threadFlows/0/locations/2)
#  576|       rc = template_update_attribute(tmpl, prime_attr);
#  577|       if (rc != CKR_OK) {
#  578|->         TRACE_DEVEL("template_update_attribute failed\n");
#  579|           goto error;
#  580|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:538:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:545:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/104/codeFlows/0/threadFlows/0/locations/2)
#  580|       }
#  581|       prime_attr = NULL;
#  582|->     rc = template_update_attribute(tmpl, subprime_attr);
#  583|       if (rc != CKR_OK) {
#  584|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def213]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:539:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:545:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/105/codeFlows/0/threadFlows/0/locations/2)
#  580|       }
#  581|       prime_attr = NULL;
#  582|->     rc = template_update_attribute(tmpl, subprime_attr);
#  583|       if (rc != CKR_OK) {
#  584|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: warning[-Wanalyzer-malloc-leak]: leak of 'subprime_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:537:38: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: danger: 'subprime_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/103/codeFlows/0/threadFlows/0/locations/2)
#  580|       }
#  581|       prime_attr = NULL;
#  582|->     rc = template_update_attribute(tmpl, subprime_attr);
#  583|       if (rc != CKR_OK) {
#  584|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: warning[-Wanalyzer-malloc-leak]: leak of 'subprimebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:540:42: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: danger: 'subprimebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/106/codeFlows/0/threadFlows/0/locations/2)
#  580|       }
#  581|       prime_attr = NULL;
#  582|->     rc = template_update_attribute(tmpl, subprime_attr);
#  583|       if (rc != CKR_OK) {
#  584|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:542:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/107/codeFlows/0/threadFlows/0/locations/2)
#  580|       }
#  581|       prime_attr = NULL;
#  582|->     rc = template_update_attribute(tmpl, subprime_attr);
#  583|       if (rc != CKR_OK) {
#  584|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def217]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:538:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:545:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/108/codeFlows/0/threadFlows/0/locations/2)
#  582|       rc = template_update_attribute(tmpl, subprime_attr);
#  583|       if (rc != CKR_OK) {
#  584|->         TRACE_DEVEL("template_update_attribute failed\n");
#  585|           goto error;
#  586|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:539:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:545:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/109/codeFlows/0/threadFlows/0/locations/2)
#  582|       rc = template_update_attribute(tmpl, subprime_attr);
#  583|       if (rc != CKR_OK) {
#  584|->         TRACE_DEVEL("template_update_attribute failed\n");
#  585|           goto error;
#  586|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: warning[-Wanalyzer-malloc-leak]: leak of 'subprimebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:540:42: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: danger: 'subprimebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/110/codeFlows/0/threadFlows/0/locations/2)
#  582|       rc = template_update_attribute(tmpl, subprime_attr);
#  583|       if (rc != CKR_OK) {
#  584|->         TRACE_DEVEL("template_update_attribute failed\n");
#  585|           goto error;
#  586|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def220]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:542:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:584:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/111/codeFlows/0/threadFlows/0/locations/2)
#  582|       rc = template_update_attribute(tmpl, subprime_attr);
#  583|       if (rc != CKR_OK) {
#  584|->         TRACE_DEVEL("template_update_attribute failed\n");
#  585|           goto error;
#  586|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def221]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:538:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:545:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: danger: 'base_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/112/codeFlows/0/threadFlows/0/locations/2)
#  586|       }
#  587|       subprime_attr = NULL;
#  588|->     rc = template_update_attribute(tmpl, base_attr);
#  589|       if (rc != CKR_OK) {
#  590|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def222]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:539:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:545:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/113/codeFlows/0/threadFlows/0/locations/2)
#  586|       }
#  587|       subprime_attr = NULL;
#  588|->     rc = template_update_attribute(tmpl, base_attr);
#  589|       if (rc != CKR_OK) {
#  590|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: warning[-Wanalyzer-malloc-leak]: leak of 'subprimebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:540:42: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: danger: 'subprimebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/114/codeFlows/0/threadFlows/0/locations/2)
#  586|       }
#  587|       subprime_attr = NULL;
#  588|->     rc = template_update_attribute(tmpl, base_attr);
#  589|       if (rc != CKR_OK) {
#  590|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def224]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:542:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/115/codeFlows/0/threadFlows/0/locations/2)
#  586|       }
#  587|       subprime_attr = NULL;
#  588|->     rc = template_update_attribute(tmpl, base_attr);
#  589|       if (rc != CKR_OK) {
#  590|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:590:9: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:539:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:545:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:589:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:590:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:590:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:590:9: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/116/codeFlows/0/threadFlows/0/locations/2)
#  588|       rc = template_update_attribute(tmpl, base_attr);
#  589|       if (rc != CKR_OK) {
#  590|->         TRACE_DEVEL("template_update_attribute failed\n");
#  591|           goto error;
#  592|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def226]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:590:9: warning[-Wanalyzer-malloc-leak]: leak of 'subprimebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:540:42: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:589:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:590:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:590:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:590:9: danger: 'subprimebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/117/codeFlows/0/threadFlows/0/locations/2)
#  588|       rc = template_update_attribute(tmpl, base_attr);
#  589|       if (rc != CKR_OK) {
#  590|->         TRACE_DEVEL("template_update_attribute failed\n");
#  591|           goto error;
#  592|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:590:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:542:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:589:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:590:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:590:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:590:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/118/codeFlows/0/threadFlows/0/locations/2)
#  588|       rc = template_update_attribute(tmpl, base_attr);
#  589|       if (rc != CKR_OK) {
#  590|->         TRACE_DEVEL("template_update_attribute failed\n");
#  591|           goto error;
#  592|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def228]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: warning[-Wanalyzer-malloc-leak]: leak of 'primebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:539:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:545:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:589:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: danger: 'primebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/119/codeFlows/0/threadFlows/0/locations/2)
#  592|       }
#  593|       base_attr = NULL;
#  594|->     rc = template_update_attribute(tmpl, primebits_attr);
#  595|       if (rc != CKR_OK) {
#  596|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def229]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: warning[-Wanalyzer-malloc-leak]: leak of 'subprimebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:540:42: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:589:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: danger: 'subprimebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/120/codeFlows/0/threadFlows/0/locations/2)
#  592|       }
#  593|       base_attr = NULL;
#  594|->     rc = template_update_attribute(tmpl, primebits_attr);
#  595|       if (rc != CKR_OK) {
#  596|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def230]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:542:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:589:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/121/codeFlows/0/threadFlows/0/locations/2)
#  592|       }
#  593|       base_attr = NULL;
#  594|->     rc = template_update_attribute(tmpl, primebits_attr);
#  595|       if (rc != CKR_OK) {
#  596|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:596:9: warning[-Wanalyzer-malloc-leak]: leak of 'subprimebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:540:42: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:589:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:595:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:596:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:596:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:596:9: danger: 'subprimebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/122/codeFlows/0/threadFlows/0/locations/2)
#  594|       rc = template_update_attribute(tmpl, primebits_attr);
#  595|       if (rc != CKR_OK) {
#  596|->         TRACE_DEVEL("template_update_attribute failed\n");
#  597|           goto error;
#  598|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:596:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:542:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:589:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:595:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:596:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:596:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:596:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/123/codeFlows/0/threadFlows/0/locations/2)
#  594|       rc = template_update_attribute(tmpl, primebits_attr);
#  595|       if (rc != CKR_OK) {
#  596|->         TRACE_DEVEL("template_update_attribute failed\n");
#  597|           goto error;
#  598|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def233]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:600:10: warning[-Wanalyzer-malloc-leak]: leak of 'subprimebits_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:540:42: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:589:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:595:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:600:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:600:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:600:10: danger: 'subprimebits_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/124/codeFlows/0/threadFlows/0/locations/2)
#  598|       }
#  599|       primebits_attr = NULL;
#  600|->     rc = template_update_attribute(tmpl, subprimebits_attr);
#  601|       if (rc != CKR_OK) {
#  602|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:600:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:542:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:589:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:595:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:600:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:600:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:600:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/125/codeFlows/0/threadFlows/0/locations/2)
#  598|       }
#  599|       primebits_attr = NULL;
#  600|->     rc = template_update_attribute(tmpl, subprimebits_attr);
#  601|       if (rc != CKR_OK) {
#  602|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def235]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:602:9: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:542:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:589:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:595:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:600:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:601:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:602:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:602:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:602:9: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/126/codeFlows/0/threadFlows/0/locations/2)
#  600|       rc = template_update_attribute(tmpl, subprimebits_attr);
#  601|       if (rc != CKR_OK) {
#  602|->         TRACE_DEVEL("template_update_attribute failed\n");
#  603|           goto error;
#  604|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def236]
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:606:10: warning[-Wanalyzer-malloc-leak]: leak of 'type_attr'
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:533:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:536:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:542:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:544:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:551:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:577:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:582:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:583:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:588:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:589:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:594:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:595:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:600:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:601:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:606:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:606:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/dp_obj.c:606:10: danger: 'type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/127/codeFlows/0/threadFlows/0/locations/2)
#  604|       }
#  605|       subprimebits_attr = NULL;
#  606|->     rc = template_update_attribute(tmpl, type_attr);
#  607|       if (rc != CKR_OK) {
#  608|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def237]
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:697:18: warning[-Wanalyzer-malloc-leak]: leak of 'ptr'
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:52:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:56:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:62:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:64:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:73:49: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:74:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:80:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:80:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:116:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:124:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:136:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:348:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:354:50: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:356:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:361:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:361:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:369:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:684:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:685:27: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:686:12: branch_false: following 'false' branch (when 'ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:691:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:694:9: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:696:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:697:18: throw: if 'aes_gcm_dup_param' throws an exception...
opencryptoki-3.26.0/usr/lib/common/encr_mgr.c:697:18: danger: 'ptr' leaks here; was allocated at [(23)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/22)
#  695|           {
#  696|           case CKM_AES_GCM:
#  697|->             rc = aes_gcm_dup_param((CK_GCM_PARAMS *)mech->pParameter,
#  698|                                      (CK_GCM_PARAMS *)ptr);
#  699|               if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def238]
opencryptoki-3.26.0/usr/lib/common/event_client.c:57:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘socketfd’
opencryptoki-3.26.0/usr/lib/common/event_client.c:34:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/event_client.c:37:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/event_client.c:38:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/event_client.c:41:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/event_client.c:42:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/event_client.c:45:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/event_client.c:45:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/event_client.c:48:21: acquire_resource: stream socket created here
opencryptoki-3.26.0/usr/lib/common/event_client.c:48:8: branch_false: following ‘false’ branch (when ‘socketfd >= 0’)...
opencryptoki-3.26.0/usr/lib/common/event_client.c:52:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/event_client.c:57:9: throw: if ‘connect’ throws an exception...
opencryptoki-3.26.0/usr/lib/common/event_client.c:57:9: danger: ‘socketfd’ leaks here
#   55|       daemon_address.sun_path[sizeof(daemon_address.sun_path) - 1] = '\0';
#   56|   
#   57|->     if (connect(socketfd, (struct sockaddr *) &daemon_address,
#   58|                   sizeof(struct sockaddr_un)) != 0) {
#   59|           rc = -errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def239]
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:210:10: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:196:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:199:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:199:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:201:8: branch_false: following 'false' branch (when 'value_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:206:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:210:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:210:10: danger: 'value_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  208|       value_attr->pValue = NULL;
#  209|   
#  210|->     rc = template_update_attribute(tmpl, value_attr);
#  211|       if (rc != CKR_OK) {
#  212|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def240]
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:238:9: warning[-Wanalyzer-malloc-leak]: leak of 'hasreset_attr'
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:233:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:238:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:238:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:238:9: danger: 'hasreset_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  236|   
#  237|       if (!value_attr || !hasreset_attr || !resetoninit_attr) {
#  238|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  239|           rc = CKR_HOST_MEMORY;
#  240|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def241]
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:238:9: warning[-Wanalyzer-malloc-leak]: leak of 'resetoninit_attr'
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:235:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:238:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:238:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:238:9: danger: 'resetoninit_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  236|   
#  237|       if (!value_attr || !hasreset_attr || !resetoninit_attr) {
#  238|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  239|           rc = CKR_HOST_MEMORY;
#  240|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def242]
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:238:9: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:238:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:238:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:238:9: danger: 'value_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  236|   
#  237|       if (!value_attr || !hasreset_attr || !resetoninit_attr) {
#  238|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  239|           rc = CKR_HOST_MEMORY;
#  240|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def243]
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:259:10: warning[-Wanalyzer-malloc-leak]: leak of 'hasreset_attr'
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:233:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:259:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:259:10: danger: 'hasreset_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  257|       *(CK_BBOOL *) resetoninit_attr->pValue = FALSE;
#  258|   
#  259|->     rc = template_update_attribute(tmpl, value_attr);
#  260|       if (rc != CKR_OK) {
#  261|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def244]
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:259:10: warning[-Wanalyzer-malloc-leak]: leak of 'resetoninit_attr'
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:235:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:9: branch_false: following 'false' branch (when 'resetoninit_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:243:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:259:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:259:10: danger: 'resetoninit_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  257|       *(CK_BBOOL *) resetoninit_attr->pValue = FALSE;
#  258|   
#  259|->     rc = template_update_attribute(tmpl, value_attr);
#  260|       if (rc != CKR_OK) {
#  261|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def245]
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:259:10: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:259:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:259:10: danger: 'value_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  257|       *(CK_BBOOL *) resetoninit_attr->pValue = FALSE;
#  258|   
#  259|->     rc = template_update_attribute(tmpl, value_attr);
#  260|       if (rc != CKR_OK) {
#  261|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def246]
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:261:9: warning[-Wanalyzer-malloc-leak]: leak of 'hasreset_attr'
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:233:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:260:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:261:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:261:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:261:9: danger: 'hasreset_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  259|       rc = template_update_attribute(tmpl, value_attr);
#  260|       if (rc != CKR_OK) {
#  261|->         TRACE_DEVEL("template_update_attribute failed\n");
#  262|           goto error;
#  263|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def247]
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:261:9: warning[-Wanalyzer-malloc-leak]: leak of 'resetoninit_attr'
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:235:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:9: branch_false: following 'false' branch (when 'resetoninit_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:243:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:260:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:261:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:261:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:261:9: danger: 'resetoninit_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#  259|       rc = template_update_attribute(tmpl, value_attr);
#  260|       if (rc != CKR_OK) {
#  261|->         TRACE_DEVEL("template_update_attribute failed\n");
#  262|           goto error;
#  263|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def248]
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:265:10: warning[-Wanalyzer-malloc-leak]: leak of 'hasreset_attr'
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:233:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:260:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:265:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:265:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:265:10: danger: 'hasreset_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#  263|       }
#  264|       value_attr = NULL;
#  265|->     rc = template_update_attribute(tmpl, hasreset_attr);
#  266|       if (rc != CKR_OK) {
#  267|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def249]
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:265:10: warning[-Wanalyzer-malloc-leak]: leak of 'resetoninit_attr'
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:235:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:9: branch_false: following 'false' branch (when 'resetoninit_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:243:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:260:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:265:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:265:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:265:10: danger: 'resetoninit_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#  263|       }
#  264|       value_attr = NULL;
#  265|->     rc = template_update_attribute(tmpl, hasreset_attr);
#  266|       if (rc != CKR_OK) {
#  267|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:267:9: warning[-Wanalyzer-malloc-leak]: leak of 'resetoninit_attr'
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:235:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:9: branch_false: following 'false' branch (when 'resetoninit_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:243:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:260:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:265:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:266:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:267:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:267:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:267:9: danger: 'resetoninit_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
#  265|       rc = template_update_attribute(tmpl, hasreset_attr);
#  266|       if (rc != CKR_OK) {
#  267|->         TRACE_DEVEL("template_update_attribute failed\n");
#  268|           goto error;
#  269|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def251]
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:271:10: warning[-Wanalyzer-malloc-leak]: leak of 'resetoninit_attr'
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:231:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:235:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:237:9: branch_false: following 'false' branch (when 'resetoninit_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:243:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:260:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:265:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:266:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:271:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:271:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/hwf_obj.c:271:10: danger: 'resetoninit_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
#  269|       }
#  270|       hasreset_attr = NULL;
#  271|->     rc = template_update_attribute(tmpl, resetoninit_attr);
#  272|       if (rc != CKR_OK) {
#  273|           TRACE_DEVEL("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def252]
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1235:10: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:867:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:869:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:876:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:877:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:884:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:887:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:891:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:893:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:897:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:897:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:905:50: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:904:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:913:45: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:914:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:921:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:921:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:927:54: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:929:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:935:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:935:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:942:45: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:944:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:948:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:966:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:984:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1017:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1029:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1052:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1057:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1077:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1157:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1220:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1221:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1230:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1235:10: throw: if 'encr_mgr_init' throws an exception...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1235:10: danger: 'ctx' leaks here; was allocated at [(33)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/32)
# 1233|       //
# 1234|       /* Policy already checked */
# 1235|->     rc = encr_mgr_init(tokdata, sess, ctx, OP_WRAP, mech, h_wrapping_key,
# 1236|                          FALSE);
# 1237|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1512:10: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1300:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1307:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1314:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1317:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1321:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1321:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1328:56: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1330:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1336:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1336:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1354:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1356:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1361:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1363:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1368:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1375:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1412:59: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1416:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1421:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1477:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1482:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1482:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1489:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1503:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1504:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1509:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1512:10: throw: if 'decr_mgr_init' throws an exception...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1512:10: danger: 'ctx' leaks here; was allocated at [(25)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/24)
# 1510|   
# 1511|       /* Policy already checked */
# 1512|->     rc = decr_mgr_init(tokdata, sess, ctx, OP_UNWRAP, mech, h_unwrapping_key,
# 1513|                          FALSE, FALSE);
# 1514|       if (rc != CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1533:10: warning[-Wanalyzer-malloc-leak]: leak of 'data'
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1300:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1307:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1314:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1317:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1321:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1321:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1328:56: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1330:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1336:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1336:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1354:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1356:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1361:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1363:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1368:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1375:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1412:59: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1416:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1421:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1477:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1482:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1482:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1489:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1504:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1509:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1514:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1517:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1520:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1526:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1526:24: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1527:8: branch_false: following 'false' branch (when 'data' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1533:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1533:10: throw: if 'decr_mgr_decrypt' throws an exception...
opencryptoki-3.26.0/usr/lib/common/key_mgr.c:1533:10: danger: 'data' leaks here; was allocated at [(31)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/30)
# 1531|       }
# 1532|   
# 1533|->     rc = decr_mgr_decrypt(tokdata, sess,
# 1534|                             FALSE,
# 1535|                             ctx, wrapped_key, wrapped_key_len, data, &data_len);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:296:5: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:258:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:266:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:272:36: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:274:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:280:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:280:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:287:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:287:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:288:8: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:293:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:296:5: throw: if 'add_pkcs_padding' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:296:5: danger: 'clear' leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  294|           memcpy(clear, in_data, in_data_len);
#  295|   
#  296|->     add_pkcs_padding(clear + in_data_len,
#  297|                        AES_BLOCK_SIZE, in_data_len, padded_len);
#  298|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1921:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1874:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1882:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1892:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1895:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1900:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1900:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1905:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1906:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1911:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1911:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1912:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1918:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1921:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1921:14: danger: 'cipher' leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
# 1919|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 1920|   
# 1921|->         rc = token_specific.t_aes_ofb(tokdata, cipher, out_len, out_data,
# 1922|                                         key_obj, ctx->mech.pParameter, 1);
# 1923|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2104:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2056:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2065:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2075:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2078:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2083:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2083:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2088:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2089:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2094:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2094:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2095:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2101:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2104:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2104:14: danger: 'cipher' leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
# 2102|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 2103|   
# 2104|->         rc = token_specific.t_aes_ofb(tokdata, cipher, out_len, out_data,
# 2105|                                         key_obj, ctx->mech.pParameter, 0);
# 2106|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2288:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2241:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2249:8: branch_false: following 'false' branch (when 'total >= cfb_len')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2259:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2262:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2267:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2267:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2272:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2273:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2278:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2278:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2279:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2285:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2288:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2288:14: danger: 'cipher' leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
# 2286|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 2287|   
# 2288|->         rc = token_specific.t_aes_cfb(tokdata, cipher, out_len, out_data,
# 2289|                                         key_obj, ctx->mech.pParameter, cfb_len,
# 2290|                                         1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2474:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2427:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2435:8: branch_false: following 'false' branch (when 'total >= cfb_len')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2445:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2448:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2453:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2453:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2458:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2459:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2464:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2464:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2465:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2471:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2474:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2474:14: danger: 'cipher' leaks here; was allocated at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
# 2472|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 2473|   
# 2474|->         rc = token_specific.t_aes_cfb(tokdata, cipher, out_len, out_data,
# 2475|                                         key_obj, ctx->mech.pParameter, cfb_len,
# 2476|                                         0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def260]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2668:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2633:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2638:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2642:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2649:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2653:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2658:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2658:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2659:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2665:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2668:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2668:14: danger: 'cipher' leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
# 2666|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 2667|   
# 2668|->         rc = token_specific.t_aes_mac(tokdata, cipher, out_len, key_obj,
# 2669|                                         context->iv);
# 2670|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def261]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2873:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2838:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2843:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2847:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2854:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2858:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2863:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2863:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2864:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2870:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2873:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:2873:14: danger: 'cipher' leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
# 2871|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 2872|   
# 2873|->         rc = token_specific.t_aes_mac(tokdata, cipher, out_len, key_obj,
# 2874|                                         context->iv);
# 2875|           if (rc == CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def262]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3092:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3055:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3060:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3064:8: branch_false: following 'false' branch (when 'total > 16')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3071:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3077:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3082:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3082:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3083:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3089:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3092:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3092:14: danger: 'cipher' leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
# 3090|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 3091|   
# 3092|->         rc = token_specific.t_aes_cmac(tokdata, sess, cipher, out_len, key_obj,
# 3093|                                          context->iv,
# 3094|                                          !context->initialized, CK_FALSE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def263]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3300:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3263:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3268:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3272:8: branch_false: following 'false' branch (when 'total > 16')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3279:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3285:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3290:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3290:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3291:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3297:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3300:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3300:14: danger: 'cipher' leaks here; was allocated at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
# 3298|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 3299|   
# 3300|->         rc = token_specific.t_aes_cmac(tokdata, sess, cipher, out_len, key_obj,
# 3301|                                         context->iv,
# 3302|                                         !context->initialized, CK_FALSE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def264]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3807:14: warning[-Wanalyzer-malloc-leak]: leak of 'opaque_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3797:30: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3797:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3798:12: branch_false: following 'false' branch (when 'opaque_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3803:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3807:14: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3807:14: danger: 'opaque_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
# 3805|           opaque_attr->pValue = (CK_BYTE *) opaque_attr + sizeof(CK_ATTRIBUTE);
# 3806|           memcpy(opaque_attr->pValue, aes_key, token_keysize);
# 3807|->         rc = template_update_attribute(tmpl, opaque_attr);
# 3808|           if (rc != CKR_OK) {
# 3809|               TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3825:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: danger: 'class_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/8)
# 3828|   
# 3829|       if (!value_attr || !key_type_attr || !class_attr || !local_attr) {
# 3830|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 3831|           rc = CKR_HOST_MEMORY;
# 3832|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3823:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: danger: 'key_type_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/8)
# 3828|   
# 3829|       if (!value_attr || !key_type_attr || !class_attr || !local_attr) {
# 3830|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 3831|           rc = CKR_HOST_MEMORY;
# 3832|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def267]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3827:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: danger: 'local_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/8)
# 3828|   
# 3829|       if (!value_attr || !key_type_attr || !class_attr || !local_attr) {
# 3830|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 3831|           rc = CKR_HOST_MEMORY;
# 3832|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3830:9: danger: 'value_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/8)
# 3828|   
# 3829|       if (!value_attr || !key_type_attr || !class_attr || !local_attr) {
# 3830|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 3831|           rc = CKR_HOST_MEMORY;
# 3832|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def269]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3860:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3825:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3835:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3860:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3860:10: danger: 'class_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/8)
# 3858|       *(CK_BBOOL *) local_attr->pValue = TRUE;
# 3859|   
# 3860|->     rc = template_update_attribute(tmpl, value_attr);
# 3861|       if (rc != CKR_OK) {
# 3862|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3860:10: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3823:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3860:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3860:10: danger: 'key_type_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/8)
# 3858|       *(CK_BBOOL *) local_attr->pValue = TRUE;
# 3859|   
# 3860|->     rc = template_update_attribute(tmpl, value_attr);
# 3861|       if (rc != CKR_OK) {
# 3862|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def271]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3860:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3827:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3835:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3860:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3860:10: danger: 'local_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/8)
# 3858|       *(CK_BBOOL *) local_attr->pValue = TRUE;
# 3859|   
# 3860|->     rc = template_update_attribute(tmpl, value_attr);
# 3861|       if (rc != CKR_OK) {
# 3862|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3860:10: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3860:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3860:10: danger: 'value_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/8)
# 3858|       *(CK_BBOOL *) local_attr->pValue = TRUE;
# 3859|   
# 3860|->     rc = template_update_attribute(tmpl, value_attr);
# 3861|       if (rc != CKR_OK) {
# 3862|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3862:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3825:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3835:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3861:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3862:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3862:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3862:9: danger: 'class_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/8)
# 3860|       rc = template_update_attribute(tmpl, value_attr);
# 3861|       if (rc != CKR_OK) {
# 3862|->         TRACE_ERROR("template_update_attribute failed\n");
# 3863|           goto err;
# 3864|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3862:9: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3823:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3861:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3862:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3862:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3862:9: danger: 'key_type_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/8)
# 3860|       rc = template_update_attribute(tmpl, value_attr);
# 3861|       if (rc != CKR_OK) {
# 3862|->         TRACE_ERROR("template_update_attribute failed\n");
# 3863|           goto err;
# 3864|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3862:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3827:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3835:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3861:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3862:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3862:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3862:9: danger: 'local_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/8)
# 3860|       rc = template_update_attribute(tmpl, value_attr);
# 3861|       if (rc != CKR_OK) {
# 3862|->         TRACE_ERROR("template_update_attribute failed\n");
# 3863|           goto err;
# 3864|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3825:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3835:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3861:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: danger: 'class_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/8)
# 3864|       }
# 3865|       value_attr = NULL;
# 3866|->     rc = template_update_attribute(tmpl, key_type_attr);
# 3867|       if (rc != CKR_OK) {
# 3868|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def277]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3823:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3861:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: danger: 'key_type_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/8)
# 3864|       }
# 3865|       value_attr = NULL;
# 3866|->     rc = template_update_attribute(tmpl, key_type_attr);
# 3867|       if (rc != CKR_OK) {
# 3868|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3827:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3835:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3861:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: danger: 'local_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/8)
# 3864|       }
# 3865|       value_attr = NULL;
# 3866|->     rc = template_update_attribute(tmpl, key_type_attr);
# 3867|       if (rc != CKR_OK) {
# 3868|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def279]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3868:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3825:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3835:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3861:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3867:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3868:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3868:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3868:9: danger: 'class_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/8)
# 3866|       rc = template_update_attribute(tmpl, key_type_attr);
# 3867|       if (rc != CKR_OK) {
# 3868|->         TRACE_ERROR("template_update_attribute failed\n");
# 3869|           goto err;
# 3870|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3868:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3827:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3835:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3861:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3867:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3868:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3868:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3868:9: danger: 'local_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/8)
# 3866|       rc = template_update_attribute(tmpl, key_type_attr);
# 3867|       if (rc != CKR_OK) {
# 3868|->         TRACE_ERROR("template_update_attribute failed\n");
# 3869|           goto err;
# 3870|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3872:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3825:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3835:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3861:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3867:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3872:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3872:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3872:10: danger: 'class_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/8)
# 3870|       }
# 3871|       key_type_attr = NULL;
# 3872|->     rc = template_update_attribute(tmpl, class_attr);
# 3873|       if (rc != CKR_OK) {
# 3874|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def282]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3872:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3827:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3835:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3861:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3867:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3872:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3872:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3872:10: danger: 'local_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/8)
# 3870|       }
# 3871|       key_type_attr = NULL;
# 3872|->     rc = template_update_attribute(tmpl, class_attr);
# 3873|       if (rc != CKR_OK) {
# 3874|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3874:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3827:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3835:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3861:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3867:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3872:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3873:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3874:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3874:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3874:9: danger: 'local_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/8)
# 3872|       rc = template_update_attribute(tmpl, class_attr);
# 3873|       if (rc != CKR_OK) {
# 3874|->         TRACE_ERROR("template_update_attribute failed\n");
# 3875|           goto err;
# 3876|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3878:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3768:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3773:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3785:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3791:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3795:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3814:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3821:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3827:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3829:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3835:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3861:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3866:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3867:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3872:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3873:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3878:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3878:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3878:10: danger: 'local_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/8)
# 3876|       }
# 3877|       class_attr = NULL;
# 3878|->     rc = template_update_attribute(tmpl, local_attr);
# 3879|       if (rc != CKR_OK) {
# 3880|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3915:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:572:7: enter_function: entry to 'aes_ecb_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:586:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:594:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:604:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:607:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:612:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:613:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:618:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:618:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:619:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:627:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:630:14: call_function: calling 'ckm_aes_ecb_encrypt' from 'aes_ecb_encrypt_update'
# 3913|   
# 3914|       if (!in_data || !out_data || !key) {
# 3915|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 3916|           return CKR_FUNCTION_FAILED;
# 3917|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3919:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:572:7: enter_function: entry to 'aes_ecb_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:586:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:594:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:604:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:607:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:612:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:613:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:618:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:618:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:619:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:627:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:630:14: call_function: calling 'ckm_aes_ecb_encrypt' from 'aes_ecb_encrypt_update'
# 3917|       }
# 3918|       if (*out_data_len < in_data_len) {
# 3919|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 3920|           return CKR_BUFFER_TOO_SMALL;
# 3921|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3924:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:572:7: enter_function: entry to 'aes_ecb_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:586:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:594:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:604:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:607:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:612:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:613:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:618:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:618:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:619:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:627:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:630:14: call_function: calling 'ckm_aes_ecb_encrypt' from 'aes_ecb_encrypt_update'
# 3922|   
# 3923|       if (token_specific.t_aes_ecb == NULL) {
# 3924|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 3925|           return CKR_MECHANISM_INVALID;
# 3926|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3928:10: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:572:7: enter_function: entry to 'aes_ecb_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:586:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:594:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:604:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:607:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:612:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:613:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:618:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:618:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:619:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:627:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:630:14: call_function: calling 'ckm_aes_ecb_encrypt' from 'aes_ecb_encrypt_update'
# 3926|       }
# 3927|   
# 3928|->     rc = token_specific.t_aes_ecb(tokdata, sess, in_data, in_data_len,
# 3929|                                     out_data, out_data_len, key, 1);
# 3930|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3950:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:656:7: enter_function: entry to 'aes_ecb_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:670:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:678:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:689:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:692:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:697:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:698:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:703:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:703:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:704:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:712:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:715:14: call_function: calling 'ckm_aes_ecb_decrypt' from 'aes_ecb_decrypt_update'
# 3948|   
# 3949|       if (!in_data || !out_data || !key) {
# 3950|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 3951|           return CKR_FUNCTION_FAILED;
# 3952|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def290]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3954:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:656:7: enter_function: entry to 'aes_ecb_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:670:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:678:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:689:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:692:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:697:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:698:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:703:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:703:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:704:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:712:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:715:14: call_function: calling 'ckm_aes_ecb_decrypt' from 'aes_ecb_decrypt_update'
# 3952|       }
# 3953|       if (*out_data_len < in_data_len) {
# 3954|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 3955|           return CKR_BUFFER_TOO_SMALL;
# 3956|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def291]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3959:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:656:7: enter_function: entry to 'aes_ecb_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:670:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:678:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:689:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:692:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:697:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:698:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:703:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:703:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:704:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:712:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:715:14: call_function: calling 'ckm_aes_ecb_decrypt' from 'aes_ecb_decrypt_update'
# 3957|   
# 3958|       if (token_specific.t_aes_ecb == NULL) {
# 3959|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 3960|           return CKR_MECHANISM_INVALID;
# 3961|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3963:10: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:656:7: enter_function: entry to 'aes_ecb_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:670:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:678:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:689:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:692:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:697:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:698:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:703:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:703:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:704:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:712:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:715:14: call_function: calling 'ckm_aes_ecb_decrypt' from 'aes_ecb_decrypt_update'
# 3961|       }
# 3962|   
# 3963|->     rc = token_specific.t_aes_ecb(tokdata, sess, in_data, in_data_len,
# 3964|                                     out_data, out_data_len, key, 0);
# 3965|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def293]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3986:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:739:7: enter_function: entry to 'aes_cbc_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:754:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:762:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:773:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:776:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:781:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:782:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:788:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:788:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:789:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:797:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:800:14: call_function: calling 'ckm_aes_cbc_encrypt' from 'aes_cbc_encrypt_update'
# 3984|   
# 3985|       if (!in_data || !out_data || !init_v || !key) {
# 3986|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 3987|           return CKR_FUNCTION_FAILED;
# 3988|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def294]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3991:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:739:7: enter_function: entry to 'aes_cbc_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:754:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:762:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:773:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:776:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:781:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:782:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:788:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:788:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:789:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:797:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:800:14: call_function: calling 'ckm_aes_cbc_encrypt' from 'aes_cbc_encrypt_update'
# 3989|       if (*out_data_len < in_data_len) {
# 3990|           *out_data_len = in_data_len;
# 3991|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 3992|           return CKR_BUFFER_TOO_SMALL;
# 3993|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:3996:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:739:7: enter_function: entry to 'aes_cbc_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:754:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:762:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:773:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:776:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:781:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:782:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:788:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:788:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:789:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:797:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:800:14: call_function: calling 'ckm_aes_cbc_encrypt' from 'aes_cbc_encrypt_update'
# 3994|   
# 3995|       if (token_specific.t_aes_cbc == NULL) {
# 3996|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 3997|           return CKR_MECHANISM_INVALID;
# 3998|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def296]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4000:10: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:739:7: enter_function: entry to 'aes_cbc_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:754:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:762:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:773:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:776:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:781:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:782:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:788:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:788:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:789:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:797:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:800:14: call_function: calling 'ckm_aes_cbc_encrypt' from 'aes_cbc_encrypt_update'
# 3998|       }
# 3999|   
# 4000|->     rc = token_specific.t_aes_cbc(tokdata, sess, in_data, in_data_len,
# 4001|                                     out_data, out_data_len, key, init_v, 1);
# 4002|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4023:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:830:7: enter_function: entry to 'aes_cbc_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:845:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:854:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:865:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:868:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:873:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:874:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:880:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:880:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:881:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:889:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:892:14: call_function: calling 'ckm_aes_cbc_decrypt' from 'aes_cbc_decrypt_update'
# 4021|   
# 4022|       if (!in_data || !out_data || !init_v || !key) {
# 4023|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 4024|           return CKR_FUNCTION_FAILED;
# 4025|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def298]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4023:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:314:7: enter_function: entry to 'aes_cbc_pad_decrypt'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:328:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:337:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:344:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:344:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:352:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:354:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:360:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:360:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:361:8: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:366:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:366:10: call_function: calling 'ckm_aes_cbc_decrypt' from 'aes_cbc_pad_decrypt'
# 4021|   
# 4022|       if (!in_data || !out_data || !init_v || !key) {
# 4023|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 4024|           return CKR_FUNCTION_FAILED;
# 4025|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4027:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:830:7: enter_function: entry to 'aes_cbc_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:845:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:854:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:865:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:868:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:873:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:874:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:880:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:880:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:881:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:889:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:892:14: call_function: calling 'ckm_aes_cbc_decrypt' from 'aes_cbc_decrypt_update'
# 4025|       }
# 4026|       if (*out_data_len < in_data_len) {
# 4027|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 4028|           return CKR_BUFFER_TOO_SMALL;
# 4029|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4032:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:830:7: enter_function: entry to 'aes_cbc_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:845:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:854:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:865:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:868:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:873:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:874:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:880:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:880:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:881:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:889:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:892:14: call_function: calling 'ckm_aes_cbc_decrypt' from 'aes_cbc_decrypt_update'
# 4030|   
# 4031|       if (token_specific.t_aes_cbc == NULL) {
# 4032|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 4033|           return CKR_MECHANISM_INVALID;
# 4034|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4032:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:314:7: enter_function: entry to 'aes_cbc_pad_decrypt'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:328:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:337:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:344:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:344:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:352:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:354:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:360:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:360:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:361:8: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:366:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:366:10: call_function: calling 'ckm_aes_cbc_decrypt' from 'aes_cbc_pad_decrypt'
# 4030|   
# 4031|       if (token_specific.t_aes_cbc == NULL) {
# 4032|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 4033|           return CKR_MECHANISM_INVALID;
# 4034|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def302]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4036:10: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:830:7: enter_function: entry to 'aes_cbc_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:845:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:854:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:865:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:868:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:873:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:874:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:880:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:880:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:881:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:889:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:892:14: call_function: calling 'ckm_aes_cbc_decrypt' from 'aes_cbc_decrypt_update'
# 4034|       }
# 4035|   
# 4036|->     rc = token_specific.t_aes_cbc(tokdata, sess, in_data, in_data_len,
# 4037|                                     out_data, out_data_len, key, init_v, 0);
# 4038|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4036:10: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:314:7: enter_function: entry to 'aes_cbc_pad_decrypt'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:328:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:337:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:344:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:344:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:352:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:354:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:360:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:360:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:361:8: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:366:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:366:10: call_function: calling 'ckm_aes_cbc_decrypt' from 'aes_cbc_pad_decrypt'
# 4034|       }
# 4035|   
# 4036|->     rc = token_specific.t_aes_cbc(tokdata, sess, in_data, in_data_len,
# 4037|                                     out_data, out_data_len, key, init_v, 0);
# 4038|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def304]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4057:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1123:7: enter_function: entry to 'aes_ctr_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1138:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1144:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1153:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1155:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1159:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1160:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1165:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1165:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1166:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1174:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1177:14: call_function: calling 'ckm_aes_ctr_encrypt' from 'aes_ctr_encrypt_update'
# 4055|       CK_ULONG rc;
# 4056|       if (!in_data || !out_data || !counterblock || !key) {
# 4057|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 4058|           return CKR_FUNCTION_FAILED;
# 4059|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def305]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4062:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1123:7: enter_function: entry to 'aes_ctr_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1138:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1144:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1153:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1155:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1159:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1160:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1165:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1165:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1166:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1174:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1177:14: call_function: calling 'ckm_aes_ctr_encrypt' from 'aes_ctr_encrypt_update'
# 4060|       if (*out_data_len < in_data_len) {
# 4061|           *out_data_len = in_data_len;
# 4062|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 4063|           return CKR_BUFFER_TOO_SMALL;
# 4064|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def306]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4066:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1123:7: enter_function: entry to 'aes_ctr_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1138:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1144:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1153:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1155:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1159:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1160:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1165:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1165:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1166:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1174:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1177:14: call_function: calling 'ckm_aes_ctr_encrypt' from 'aes_ctr_encrypt_update'
# 4064|       }
# 4065|       if (counter_width % 8 != 0) {
# 4066|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_PARAM_INVALID));
# 4067|           return CKR_MECHANISM_PARAM_INVALID;
# 4068|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4071:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1123:7: enter_function: entry to 'aes_ctr_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1138:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1144:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1153:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1155:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1159:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1160:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1165:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1165:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1166:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1174:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1177:14: call_function: calling 'ckm_aes_ctr_encrypt' from 'aes_ctr_encrypt_update'
# 4069|   
# 4070|       if (token_specific.t_aes_ctr == NULL) {
# 4071|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 4072|           return CKR_MECHANISM_INVALID;
# 4073|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def308]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4075:10: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1123:7: enter_function: entry to 'aes_ctr_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1138:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1144:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1153:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1155:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1159:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1160:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1165:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1165:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1166:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1174:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1177:14: call_function: calling 'ckm_aes_ctr_encrypt' from 'aes_ctr_encrypt_update'
# 4073|       }
# 4074|   
# 4075|->     rc = token_specific.t_aes_ctr(tokdata, in_data, in_data_len,
# 4076|                                     out_data, out_data_len, key,
# 4077|                                     counterblock, counter_width, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4096:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1199:7: enter_function: entry to 'aes_ctr_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1214:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1220:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1229:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1231:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1235:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1236:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1241:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1241:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1242:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1250:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1253:14: call_function: calling 'ckm_aes_ctr_decrypt' from 'aes_ctr_decrypt_update'
# 4094|       CK_ULONG rc;
# 4095|       if (!in_data || !out_data || !counterblock || !key) {
# 4096|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 4097|           return CKR_FUNCTION_FAILED;
# 4098|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def310]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4101:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1199:7: enter_function: entry to 'aes_ctr_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1214:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1220:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1229:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1231:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1235:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1236:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1241:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1241:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1242:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1250:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1253:14: call_function: calling 'ckm_aes_ctr_decrypt' from 'aes_ctr_decrypt_update'
# 4099|       if (*out_data_len < in_data_len) {
# 4100|           *out_data_len = in_data_len;
# 4101|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 4102|           return CKR_BUFFER_TOO_SMALL;
# 4103|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4105:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1199:7: enter_function: entry to 'aes_ctr_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1214:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1220:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1229:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1231:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1235:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1236:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1241:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1241:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1242:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1250:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1253:14: call_function: calling 'ckm_aes_ctr_decrypt' from 'aes_ctr_decrypt_update'
# 4103|       }
# 4104|       if (counter_width % 8 != 0) {
# 4105|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_PARAM_INVALID));
# 4106|           return CKR_MECHANISM_PARAM_INVALID;
# 4107|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def312]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4110:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1199:7: enter_function: entry to 'aes_ctr_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1214:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1220:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1229:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1231:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1235:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1236:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1241:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1241:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1242:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1250:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1253:14: call_function: calling 'ckm_aes_ctr_decrypt' from 'aes_ctr_decrypt_update'
# 4108|   
# 4109|       if (token_specific.t_aes_ctr == NULL) {
# 4110|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 4111|           return CKR_MECHANISM_INVALID;
# 4112|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4114:10: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1199:7: enter_function: entry to 'aes_ctr_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1214:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1220:8: branch_false: following 'false' branch (when 'total > 15')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1229:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1231:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1235:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1236:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1241:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1241:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1242:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1250:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1253:14: call_function: calling 'ckm_aes_ctr_decrypt' from 'aes_ctr_decrypt_update'
# 4112|       }
# 4113|   
# 4114|->     rc = token_specific.t_aes_ctr(tokdata, in_data, in_data_len,
# 4115|                                     out_data, out_data_len, key,
# 4116|                                     counterblock, counter_width, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def314]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4156:17: warning[-Wanalyzer-malloc-leak]: leak of 'ptr'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4139:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4140:30: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4142:12: branch_true: following 'true' branch (when 'length_only == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4147:30: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4147:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4148:16: branch_false: following 'false' branch (when 'ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4153:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4154:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4155:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4156:17: throw: if 'OPENSSL_cleanse' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4156:17: danger: 'ptr' leaks here; was allocated at [(5)](sarif:/runs/0/results/94/codeFlows/0/threadFlows/0/locations/4)
# 4154|               if (*data != NULL) {
# 4155|                   memcpy(ptr, *data, len1);
# 4156|->                 OPENSSL_cleanse(*data, len1);
# 4157|                   free(*data);
# 4158|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def315]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4182:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1273:14: enter_function: entry to 'aes_xts_crypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1288:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1296:8: branch_false: following 'false' branch (when 'total > 31')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1307:31: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1310:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1315:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1315:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1318:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1319:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1324:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1324:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1343:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1343:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1344:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1350:23: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1353:14: call_function: calling 'ckm_aes_xts_crypt' from 'aes_xts_crypt_update'
# 4180|   
# 4181|       if (!in_data || !out_data || !tweak || !iv || !key) {
# 4182|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 4183|           return CKR_FUNCTION_FAILED;
# 4184|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4187:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1273:14: enter_function: entry to 'aes_xts_crypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1288:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1296:8: branch_false: following 'false' branch (when 'total > 31')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1307:31: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1310:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1315:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1315:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1318:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1319:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1324:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1324:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1343:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1343:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1344:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1350:23: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1353:14: call_function: calling 'ckm_aes_xts_crypt' from 'aes_xts_crypt_update'
# 4185|       if (*out_data_len < in_data_len) {
# 4186|           *out_data_len = in_data_len;
# 4187|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 4188|           return CKR_BUFFER_TOO_SMALL;
# 4189|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def317]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4192:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1273:14: enter_function: entry to 'aes_xts_crypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1288:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1296:8: branch_false: following 'false' branch (when 'total > 31')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1307:31: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1310:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1315:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1315:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1318:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1319:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1324:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1324:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1343:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1343:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1344:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1350:23: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1353:14: call_function: calling 'ckm_aes_xts_crypt' from 'aes_xts_crypt_update'
# 4190|   
# 4191|       if (token_specific.t_aes_xts == NULL) {
# 4192|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 4193|           return CKR_MECHANISM_INVALID;
# 4194|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def318]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4196:10: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1273:14: enter_function: entry to 'aes_xts_crypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1288:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1296:8: branch_false: following 'false' branch (when 'total > 31')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1307:31: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1310:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1315:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1315:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1318:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1319:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1324:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1324:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1343:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1343:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1344:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1350:23: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:1353:14: call_function: calling 'ckm_aes_xts_crypt' from 'aes_xts_crypt_update'
# 4194|       }
# 4195|   
# 4196|->     rc = token_specific.t_aes_xts(tokdata, sess, in_data, in_data_len,
# 4197|                                     out_data, out_data_len, key, tweak, encrypt,
# 4198|                                     initial, final, iv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def319]
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4823:14: warning[-Wanalyzer-malloc-leak]: leak of 'pad_buffer'
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4757:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4795:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4800:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4800:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4806:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4807:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4812:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4812:8: branch_true: following 'true' branch (when 'pkcs7_pad == 1')...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4813:33: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4813:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4814:12: branch_false: following 'false' branch (when 'pad_buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4820:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4823:14: throw: if 'add_pkcs_padding' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_aes.c:4823:14: danger: 'pad_buffer' leaks here; was allocated at [(11)](sarif:/runs/0/results/101/codeFlows/0/threadFlows/0/locations/10)
# 4821|               memcpy(pad_buffer, in_data, in_data_len);
# 4822|   
# 4823|->         rc = add_pkcs_padding(pad_buffer + in_data_len,
# 4824|                                 AES_BLOCK_SIZE, in_data_len, padded_len);
# 4825|           if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def320]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:300:5: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:262:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:270:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:276:36: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:278:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:284:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:284:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:291:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:291:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:292:8: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:297:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:300:5: throw: if 'add_pkcs_padding' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:300:5: danger: 'clear' leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  298|           memcpy(clear, in_data, in_data_len);
#  299|   
#  300|->     add_pkcs_padding(clear + in_data_len,
#  301|                        DES_BLOCK_SIZE, in_data_len, padded_len);
#  302|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def321]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1243:14: warning[-Wanalyzer-malloc-leak]: leak of 'opaque_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1233:40: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1233:40: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1234:12: branch_false: following 'false' branch (when 'opaque_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1239:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1243:14: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1243:14: danger: 'opaque_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 1241|           opaque_attr->pValue = (CK_BYTE *) opaque_attr + sizeof(CK_ATTRIBUTE);
# 1242|           memcpy(opaque_attr->pValue, des_key, keysize);
# 1243|->         rc = template_update_attribute(tmpl, opaque_attr);
# 1244|           if (rc != CKR_OK) {
# 1245|               TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1261:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: danger: 'class_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
# 1264|   
# 1265|       if (!value_attr || !key_type_attr || !class_attr || !local_attr) {
# 1266|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1267|           rc = CKR_HOST_MEMORY;
# 1268|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def323]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1259:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: danger: 'key_type_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
# 1264|   
# 1265|       if (!value_attr || !key_type_attr || !class_attr || !local_attr) {
# 1266|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1267|           rc = CKR_HOST_MEMORY;
# 1268|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def324]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1263:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
# 1264|   
# 1265|       if (!value_attr || !key_type_attr || !class_attr || !local_attr) {
# 1266|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1267|           rc = CKR_HOST_MEMORY;
# 1268|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def325]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1266:9: danger: 'value_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
# 1264|   
# 1265|       if (!value_attr || !key_type_attr || !class_attr || !local_attr) {
# 1266|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1267|           rc = CKR_HOST_MEMORY;
# 1268|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def326]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1296:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1261:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1271:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1274:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1277:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1296:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1296:10: danger: 'class_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6)
# 1294|       *(CK_BBOOL *) local_attr->pValue = TRUE;
# 1295|   
# 1296|->     rc = template_update_attribute(tmpl, value_attr);
# 1297|       if (rc != CKR_OK) {
# 1298|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def327]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1296:10: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1259:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1274:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1277:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1296:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1296:10: danger: 'key_type_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
# 1294|       *(CK_BBOOL *) local_attr->pValue = TRUE;
# 1295|   
# 1296|->     rc = template_update_attribute(tmpl, value_attr);
# 1297|       if (rc != CKR_OK) {
# 1298|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def328]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1296:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1263:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1271:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1274:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1277:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1296:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1296:10: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/6)
# 1294|       *(CK_BBOOL *) local_attr->pValue = TRUE;
# 1295|   
# 1296|->     rc = template_update_attribute(tmpl, value_attr);
# 1297|       if (rc != CKR_OK) {
# 1298|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def329]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1296:10: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1274:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1277:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1296:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1296:10: danger: 'value_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/6)
# 1294|       *(CK_BBOOL *) local_attr->pValue = TRUE;
# 1295|   
# 1296|->     rc = template_update_attribute(tmpl, value_attr);
# 1297|       if (rc != CKR_OK) {
# 1298|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def330]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1298:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1261:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1271:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1297:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1298:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1298:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1298:9: danger: 'class_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/6)
# 1296|       rc = template_update_attribute(tmpl, value_attr);
# 1297|       if (rc != CKR_OK) {
# 1298|->         TRACE_ERROR("template_update_attribute failed\n");
# 1299|           goto err;
# 1300|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def331]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1298:9: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1259:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1297:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1298:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1298:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1298:9: danger: 'key_type_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/6)
# 1296|       rc = template_update_attribute(tmpl, value_attr);
# 1297|       if (rc != CKR_OK) {
# 1298|->         TRACE_ERROR("template_update_attribute failed\n");
# 1299|           goto err;
# 1300|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def332]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1298:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1263:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1271:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1297:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1298:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1298:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1298:9: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/6)
# 1296|       rc = template_update_attribute(tmpl, value_attr);
# 1297|       if (rc != CKR_OK) {
# 1298|->         TRACE_ERROR("template_update_attribute failed\n");
# 1299|           goto err;
# 1300|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def333]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1261:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1271:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1297:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: danger: 'class_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/6)
# 1300|       }
# 1301|       value_attr = NULL;
# 1302|->     rc = template_update_attribute(tmpl, key_type_attr);
# 1303|       if (rc != CKR_OK) {
# 1304|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def334]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1259:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1297:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: danger: 'key_type_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/6)
# 1300|       }
# 1301|       value_attr = NULL;
# 1302|->     rc = template_update_attribute(tmpl, key_type_attr);
# 1303|       if (rc != CKR_OK) {
# 1304|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def335]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1263:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1271:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1297:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/6)
# 1300|       }
# 1301|       value_attr = NULL;
# 1302|->     rc = template_update_attribute(tmpl, key_type_attr);
# 1303|       if (rc != CKR_OK) {
# 1304|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def336]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1304:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1261:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1271:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1297:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1303:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1304:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1304:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1304:9: danger: 'class_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/6)
# 1302|       rc = template_update_attribute(tmpl, key_type_attr);
# 1303|       if (rc != CKR_OK) {
# 1304|->         TRACE_ERROR("template_update_attribute failed\n");
# 1305|           goto err;
# 1306|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def337]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1304:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1263:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1271:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1297:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1303:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1304:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1304:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1304:9: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/6)
# 1302|       rc = template_update_attribute(tmpl, key_type_attr);
# 1303|       if (rc != CKR_OK) {
# 1304|->         TRACE_ERROR("template_update_attribute failed\n");
# 1305|           goto err;
# 1306|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def338]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1308:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1261:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1271:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1297:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1303:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1308:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1308:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1308:10: danger: 'class_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/6)
# 1306|       }
# 1307|       key_type_attr = NULL;
# 1308|->     rc = template_update_attribute(tmpl, class_attr);
# 1309|       if (rc != CKR_OK) {
# 1310|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def339]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1308:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1263:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1271:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1297:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1303:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1308:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1308:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1308:10: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/6)
# 1306|       }
# 1307|       key_type_attr = NULL;
# 1308|->     rc = template_update_attribute(tmpl, class_attr);
# 1309|       if (rc != CKR_OK) {
# 1310|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def340]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1310:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1263:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1271:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1297:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1303:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1308:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1309:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1310:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1310:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1310:9: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/6)
# 1308|       rc = template_update_attribute(tmpl, class_attr);
# 1309|       if (rc != CKR_OK) {
# 1310|->         TRACE_ERROR("template_update_attribute failed\n");
# 1311|           goto err;
# 1312|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1314:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1221:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1226:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1232:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1250:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1257:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1263:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1265:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1271:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1297:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1302:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1303:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1308:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1309:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1314:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1314:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1314:10: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/6)
# 1312|       }
# 1313|       class_attr = NULL;
# 1314|->     rc = template_update_attribute(tmpl, local_attr);
# 1315|       if (rc != CKR_OK) {
# 1316|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1350:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:389:7: enter_function: entry to 'des_ecb_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:403:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:411:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:421:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:424:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:429:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:430:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:435:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:435:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:436:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:444:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:447:14: call_function: calling 'ckm_des_ecb_encrypt' from 'des_ecb_encrypt_update'
# 1348|   
# 1349|       if (!in_data || !out_data || !key) {
# 1350|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 1351|           return CKR_FUNCTION_FAILED;
# 1352|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def343]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1354:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:389:7: enter_function: entry to 'des_ecb_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:403:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:411:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:421:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:424:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:429:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:430:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:435:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:435:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:436:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:444:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:447:14: call_function: calling 'ckm_des_ecb_encrypt' from 'des_ecb_encrypt_update'
# 1352|       }
# 1353|       if (*out_data_len < in_data_len) {
# 1354|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 1355|           return CKR_BUFFER_TOO_SMALL;
# 1356|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def344]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1359:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:389:7: enter_function: entry to 'des_ecb_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:403:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:411:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:421:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:424:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:429:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:430:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:435:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:435:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:436:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:444:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:447:14: call_function: calling 'ckm_des_ecb_encrypt' from 'des_ecb_encrypt_update'
# 1357|   
# 1358|       if (token_specific.t_des_ecb == NULL) {
# 1359|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 1360|           return CKR_MECHANISM_INVALID;
# 1361|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def345]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1362:10: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:389:7: enter_function: entry to 'des_ecb_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:403:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:411:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:421:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:424:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:429:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:430:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:435:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:435:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:436:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:444:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:447:14: call_function: calling 'ckm_des_ecb_encrypt' from 'des_ecb_encrypt_update'
# 1360|           return CKR_MECHANISM_INVALID;
# 1361|       }
# 1362|->     rc = token_specific.t_des_ecb(tokdata, in_data, in_data_len,
# 1363|                                     out_data, out_data_len, key, 1);
# 1364|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def346]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1385:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:472:7: enter_function: entry to 'des_ecb_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:486:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:494:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:505:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:508:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:513:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:514:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:519:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:519:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:520:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:528:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:531:14: call_function: calling 'ckm_des_ecb_decrypt' from 'des_ecb_decrypt_update'
# 1383|   
# 1384|       if (!in_data || !out_data || !key) {
# 1385|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 1386|           return CKR_FUNCTION_FAILED;
# 1387|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def347]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1389:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:472:7: enter_function: entry to 'des_ecb_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:486:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:494:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:505:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:508:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:513:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:514:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:519:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:519:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:520:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:528:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:531:14: call_function: calling 'ckm_des_ecb_decrypt' from 'des_ecb_decrypt_update'
# 1387|       }
# 1388|       if (*out_data_len < in_data_len) {
# 1389|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 1390|           return CKR_BUFFER_TOO_SMALL;
# 1391|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def348]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1394:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:472:7: enter_function: entry to 'des_ecb_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:486:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:494:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:505:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:508:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:513:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:514:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:519:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:519:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:520:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:528:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:531:14: call_function: calling 'ckm_des_ecb_decrypt' from 'des_ecb_decrypt_update'
# 1392|   
# 1393|       if (token_specific.t_des_ecb == NULL) {
# 1394|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 1395|           return CKR_MECHANISM_INVALID;
# 1396|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def349]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1397:10: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:472:7: enter_function: entry to 'des_ecb_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:486:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:494:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:505:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:508:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:513:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:514:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:519:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:519:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:520:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:528:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:531:14: call_function: calling 'ckm_des_ecb_decrypt' from 'des_ecb_decrypt_update'
# 1395|           return CKR_MECHANISM_INVALID;
# 1396|       }
# 1397|->     rc = token_specific.t_des_ecb(tokdata, in_data, in_data_len, out_data,
# 1398|                                     out_data_len, key, 0);
# 1399|       if (rc != CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def350]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1419:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:555:7: enter_function: entry to 'des_cbc_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:570:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:578:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:589:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:592:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:597:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:598:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:604:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:604:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:605:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:613:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:616:14: call_function: calling 'ckm_des_cbc_encrypt' from 'des_cbc_encrypt_update'
# 1417|   
# 1418|       if (!in_data || !out_data || !init_v || !key) {
# 1419|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 1420|           return CKR_FUNCTION_FAILED;
# 1421|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def351]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1424:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:555:7: enter_function: entry to 'des_cbc_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:570:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:578:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:589:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:592:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:597:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:598:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:604:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:604:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:605:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:613:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:616:14: call_function: calling 'ckm_des_cbc_encrypt' from 'des_cbc_encrypt_update'
# 1422|       if (*out_data_len < in_data_len) {
# 1423|           *out_data_len = in_data_len;
# 1424|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 1425|           return CKR_BUFFER_TOO_SMALL;
# 1426|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def352]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1429:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:555:7: enter_function: entry to 'des_cbc_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:570:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:578:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:589:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:592:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:597:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:598:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:604:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:604:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:605:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:613:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:616:14: call_function: calling 'ckm_des_cbc_encrypt' from 'des_cbc_encrypt_update'
# 1427|   
# 1428|       if (token_specific.t_des_cbc == NULL) {
# 1429|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 1430|           return CKR_MECHANISM_INVALID;
# 1431|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def353]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1432:10: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:555:7: enter_function: entry to 'des_cbc_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:570:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:578:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:589:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:592:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:597:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:598:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:604:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:604:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:605:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:613:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:616:14: call_function: calling 'ckm_des_cbc_encrypt' from 'des_cbc_encrypt_update'
# 1430|           return CKR_MECHANISM_INVALID;
# 1431|       }
# 1432|->     rc = token_specific.t_des_cbc(tokdata, in_data, in_data_len, out_data,
# 1433|                                     out_data_len, key, init_v, 1);
# 1434|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def354]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1455:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:645:7: enter_function: entry to 'des_cbc_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:660:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:668:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:679:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:682:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:687:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:688:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:694:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:694:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:695:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:703:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:706:14: call_function: calling 'ckm_des_cbc_decrypt' from 'des_cbc_decrypt_update'
# 1453|   
# 1454|       if (!in_data || !out_data || !init_v || !key) {
# 1455|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 1456|           return CKR_FUNCTION_FAILED;
# 1457|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1455:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:317:7: enter_function: entry to 'des_cbc_pad_decrypt'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:331:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:340:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:347:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:347:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:355:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:357:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:363:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:363:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:364:8: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:369:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:369:10: call_function: calling 'ckm_des_cbc_decrypt' from 'des_cbc_pad_decrypt'
# 1453|   
# 1454|       if (!in_data || !out_data || !init_v || !key) {
# 1455|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 1456|           return CKR_FUNCTION_FAILED;
# 1457|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1459:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:645:7: enter_function: entry to 'des_cbc_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:660:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:668:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:679:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:682:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:687:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:688:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:694:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:694:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:695:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:703:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:706:14: call_function: calling 'ckm_des_cbc_decrypt' from 'des_cbc_decrypt_update'
# 1457|       }
# 1458|       if (*out_data_len < in_data_len) {
# 1459|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 1460|           return CKR_BUFFER_TOO_SMALL;
# 1461|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def357]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1464:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:645:7: enter_function: entry to 'des_cbc_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:660:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:668:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:679:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:682:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:687:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:688:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:694:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:694:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:695:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:703:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:706:14: call_function: calling 'ckm_des_cbc_decrypt' from 'des_cbc_decrypt_update'
# 1462|   
# 1463|       if (token_specific.t_des_cbc == NULL) {
# 1464|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 1465|           return CKR_MECHANISM_INVALID;
# 1466|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def358]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1464:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:317:7: enter_function: entry to 'des_cbc_pad_decrypt'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:331:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:340:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:347:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:347:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:355:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:357:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:363:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:363:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:364:8: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:369:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:369:10: call_function: calling 'ckm_des_cbc_decrypt' from 'des_cbc_pad_decrypt'
# 1462|   
# 1463|       if (token_specific.t_des_cbc == NULL) {
# 1464|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 1465|           return CKR_MECHANISM_INVALID;
# 1466|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def359]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1467:10: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:645:7: enter_function: entry to 'des_cbc_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:660:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:668:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:679:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:682:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:687:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:688:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:694:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:694:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:695:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:703:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:706:14: call_function: calling 'ckm_des_cbc_decrypt' from 'des_cbc_decrypt_update'
# 1465|           return CKR_MECHANISM_INVALID;
# 1466|       }
# 1467|->     rc = token_specific.t_des_cbc(tokdata, in_data, in_data_len, out_data,
# 1468|                                     out_data_len, key, init_v, 0);
# 1469|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def360]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1467:10: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:317:7: enter_function: entry to 'des_cbc_pad_decrypt'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:331:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:340:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:347:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:347:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:355:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:357:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:363:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:363:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:364:8: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:369:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:369:10: call_function: calling 'ckm_des_cbc_decrypt' from 'des_cbc_pad_decrypt'
# 1465|           return CKR_MECHANISM_INVALID;
# 1466|       }
# 1467|->     rc = token_specific.t_des_cbc(tokdata, in_data, in_data_len, out_data,
# 1468|                                     out_data_len, key, init_v, 0);
# 1469|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def361]
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1516:17: warning[-Wanalyzer-malloc-leak]: leak of 'ptr'
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1499:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1500:34: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1502:12: branch_true: following 'true' branch (when 'length_only == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1507:30: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1507:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1508:16: branch_false: following 'false' branch (when 'ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1513:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1514:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1515:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1516:17: throw: if 'OPENSSL_cleanse' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des.c:1516:17: danger: 'ptr' leaks here; was allocated at [(5)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/4)
# 1514|               if (*data != NULL) {
# 1515|                   memcpy(ptr, *data, len1);
# 1516|->                 OPENSSL_cleanse(*data, len1);
# 1517|                   free(*data);
# 1518|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def362]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:300:5: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:262:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:270:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:276:36: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:278:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:284:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:284:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:291:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:291:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:292:8: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:297:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:300:5: throw: if 'add_pkcs_padding' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:300:5: danger: 'clear' leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  298|           memcpy(clear, in_data, in_data_len);
#  299|   
#  300|->     add_pkcs_padding(clear + in_data_len,
#  301|                        DES_BLOCK_SIZE, in_data_len, padded_len);
#  302|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def363]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1308:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1261:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1269:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1279:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1282:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1287:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1287:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1292:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1293:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1298:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1298:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1299:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1305:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1308:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1308:14: danger: 'cipher' leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
# 1306|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 1307|   
# 1308|->         rc = token_specific.t_tdes_ofb(tokdata, cipher, out_data, out_len,
# 1309|                                          key_obj, ctx->mech.pParameter, 1);
# 1310|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def364]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1488:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1441:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1449:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1459:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1462:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1467:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1467:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1472:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1473:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1478:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1478:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1479:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1485:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1488:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1488:14: danger: 'cipher' leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
# 1486|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 1487|   
# 1488|->         rc = token_specific.t_tdes_ofb(tokdata, cipher, out_data, out_len,
# 1489|                                          key_obj, ctx->mech.pParameter, 0);
# 1490|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def365]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1671:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1625:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1633:8: branch_false: following 'false' branch (when 'total >= cfb_len')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1643:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1646:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1651:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1651:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1656:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1657:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1661:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1661:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1662:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1668:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1671:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1671:14: danger: 'cipher' leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
# 1669|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 1670|   
# 1671|->         rc = token_specific.t_tdes_cfb(tokdata, cipher, out_data, out_len,
# 1672|                                          key_obj, ctx->mech.pParameter, cfb_len,
# 1673|                                          1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def366]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1857:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1810:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1819:8: branch_false: following 'false' branch (when 'total >= cfb_len')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1829:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1832:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1837:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1837:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1842:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1843:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1847:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1847:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1848:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1854:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1857:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:1857:14: danger: 'cipher' leaks here; was allocated at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
# 1855|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 1856|   
# 1857|->         rc = token_specific.t_tdes_cfb(tokdata, cipher, out_data, out_len,
# 1858|                                          key_obj, ctx->mech.pParameter, cfb_len,
# 1859|                                          0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def367]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2049:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2014:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2019:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2023:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2030:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2034:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2039:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2039:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2040:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2046:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2049:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2049:14: danger: 'cipher' leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
# 2047|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 2048|   
# 2049|->         rc = token_specific.t_tdes_mac(tokdata, cipher, out_len, key_obj,
# 2050|                                          context->iv);
# 2051|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def368]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2249:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2214:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2219:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2223:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2230:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2234:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2239:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2239:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2240:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2246:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2249:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2249:14: danger: 'cipher' leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
# 2247|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 2248|   
# 2249|->         rc = token_specific.t_tdes_mac(tokdata, cipher, out_len, key_obj,
# 2250|                                          context->iv);
# 2251|           if (rc == CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def369]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2466:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2429:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2434:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2438:8: branch_false: following 'false' branch (when 'total > 8')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2445:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2451:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2456:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2456:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2457:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2463:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2466:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2466:14: danger: 'cipher' leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
# 2464|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 2465|   
# 2466|->         rc = token_specific.t_tdes_cmac(tokdata, cipher, out_len, key_obj,
# 2467|                                           context->iv,
# 2468|                                           !context->initialized, CK_FALSE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def370]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2669:14: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2632:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2637:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2641:8: branch_false: following 'false' branch (when 'total > 8')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2648:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2654:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2659:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2659:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2660:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2666:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2669:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2669:14: danger: 'cipher' leaks here; was allocated at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
# 2667|           memcpy(cipher + context->len, in_data, out_len - context->len);
# 2668|   
# 2669|->         rc = token_specific.t_tdes_cmac(tokdata, cipher, out_len, key_obj,
# 2670|                                           context->iv,
# 2671|                                           !context->initialized, CK_FALSE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def371]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2802:14: warning[-Wanalyzer-malloc-leak]: leak of 'opaque_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2792:40: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2792:40: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2793:12: branch_false: following 'false' branch (when 'opaque_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2798:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2802:14: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2802:14: danger: 'opaque_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
# 2800|           opaque_attr->pValue = (CK_BYTE *) opaque_attr + sizeof(CK_ATTRIBUTE);
# 2801|           memcpy(opaque_attr->pValue, des_key, keysize);
# 2802|->         rc = template_update_attribute(tmpl, opaque_attr);
# 2803|           if (rc != CKR_OK) {
# 2804|               TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def372]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2821:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: danger: 'class_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
# 2824|   
# 2825|       if (!value_attr || !key_type_attr || !class_attr || !local_attr) {
# 2826|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 2827|           rc = CKR_HOST_MEMORY;
# 2828|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def373]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2819:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: danger: 'key_type_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
# 2824|   
# 2825|       if (!value_attr || !key_type_attr || !class_attr || !local_attr) {
# 2826|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 2827|           rc = CKR_HOST_MEMORY;
# 2828|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def374]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2823:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
# 2824|   
# 2825|       if (!value_attr || !key_type_attr || !class_attr || !local_attr) {
# 2826|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 2827|           rc = CKR_HOST_MEMORY;
# 2828|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def375]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2826:9: danger: 'value_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
# 2824|   
# 2825|       if (!value_attr || !key_type_attr || !class_attr || !local_attr) {
# 2826|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 2827|           rc = CKR_HOST_MEMORY;
# 2828|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def376]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2856:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2821:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2831:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2834:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2837:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2856:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2856:10: danger: 'class_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/6)
# 2854|       *(CK_BBOOL *) local_attr->pValue = TRUE;
# 2855|   
# 2856|->     rc = template_update_attribute(tmpl, value_attr);
# 2857|       if (rc != CKR_OK) {
# 2858|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def377]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2856:10: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2819:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2834:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2837:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2856:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2856:10: danger: 'key_type_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/6)
# 2854|       *(CK_BBOOL *) local_attr->pValue = TRUE;
# 2855|   
# 2856|->     rc = template_update_attribute(tmpl, value_attr);
# 2857|       if (rc != CKR_OK) {
# 2858|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def378]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2856:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2823:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2831:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2834:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2837:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2856:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2856:10: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/6)
# 2854|       *(CK_BBOOL *) local_attr->pValue = TRUE;
# 2855|   
# 2856|->     rc = template_update_attribute(tmpl, value_attr);
# 2857|       if (rc != CKR_OK) {
# 2858|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def379]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2856:10: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2834:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2837:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2856:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2856:10: danger: 'value_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/6)
# 2854|       *(CK_BBOOL *) local_attr->pValue = TRUE;
# 2855|   
# 2856|->     rc = template_update_attribute(tmpl, value_attr);
# 2857|       if (rc != CKR_OK) {
# 2858|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def380]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2858:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2821:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2831:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2857:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2858:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2858:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2858:9: danger: 'class_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/6)
# 2856|       rc = template_update_attribute(tmpl, value_attr);
# 2857|       if (rc != CKR_OK) {
# 2858|->         TRACE_ERROR("template_update_attribute failed\n");
# 2859|           goto err;
# 2860|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def381]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2858:9: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2819:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2857:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2858:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2858:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2858:9: danger: 'key_type_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/6)
# 2856|       rc = template_update_attribute(tmpl, value_attr);
# 2857|       if (rc != CKR_OK) {
# 2858|->         TRACE_ERROR("template_update_attribute failed\n");
# 2859|           goto err;
# 2860|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def382]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2858:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2823:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2831:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2857:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2858:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2858:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2858:9: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/6)
# 2856|       rc = template_update_attribute(tmpl, value_attr);
# 2857|       if (rc != CKR_OK) {
# 2858|->         TRACE_ERROR("template_update_attribute failed\n");
# 2859|           goto err;
# 2860|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2821:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2831:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2857:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: danger: 'class_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/6)
# 2860|       }
# 2861|       value_attr = NULL;
# 2862|->     rc = template_update_attribute(tmpl, key_type_attr);
# 2863|       if (rc != CKR_OK) {
# 2864|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def384]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2819:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2857:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: danger: 'key_type_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/6)
# 2860|       }
# 2861|       value_attr = NULL;
# 2862|->     rc = template_update_attribute(tmpl, key_type_attr);
# 2863|       if (rc != CKR_OK) {
# 2864|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def385]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2823:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2831:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2857:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/6)
# 2860|       }
# 2861|       value_attr = NULL;
# 2862|->     rc = template_update_attribute(tmpl, key_type_attr);
# 2863|       if (rc != CKR_OK) {
# 2864|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def386]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2864:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2821:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2831:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2857:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2863:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2864:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2864:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2864:9: danger: 'class_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/6)
# 2862|       rc = template_update_attribute(tmpl, key_type_attr);
# 2863|       if (rc != CKR_OK) {
# 2864|->         TRACE_ERROR("template_update_attribute failed\n");
# 2865|           goto err;
# 2866|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def387]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2864:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2823:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2831:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2857:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2863:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2864:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2864:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2864:9: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/6)
# 2862|       rc = template_update_attribute(tmpl, key_type_attr);
# 2863|       if (rc != CKR_OK) {
# 2864|->         TRACE_ERROR("template_update_attribute failed\n");
# 2865|           goto err;
# 2866|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def388]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2868:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2821:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2831:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2857:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2863:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2868:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2868:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2868:10: danger: 'class_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/6)
# 2866|       }
# 2867|       key_type_attr = NULL;
# 2868|->     rc = template_update_attribute(tmpl, class_attr);
# 2869|       if (rc != CKR_OK) {
# 2870|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def389]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2868:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2823:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2831:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2857:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2863:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2868:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2868:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2868:10: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/6)
# 2866|       }
# 2867|       key_type_attr = NULL;
# 2868|->     rc = template_update_attribute(tmpl, class_attr);
# 2869|       if (rc != CKR_OK) {
# 2870|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def390]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2870:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2823:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2831:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2857:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2863:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2868:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2869:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2870:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2870:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2870:9: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/6)
# 2868|       rc = template_update_attribute(tmpl, class_attr);
# 2869|       if (rc != CKR_OK) {
# 2870|->         TRACE_ERROR("template_update_attribute failed\n");
# 2871|           goto err;
# 2872|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def391]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2874:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2785:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2787:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2791:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2809:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2817:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2823:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:42: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2825:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2831:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2857:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2862:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2863:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2868:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2869:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2874:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2874:10: danger: 'local_attr' leaks here; was allocated at [(7)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/6)
# 2872|       }
# 2873|       class_attr = NULL;
# 2874|->     rc = template_update_attribute(tmpl, local_attr);
# 2875|       if (rc != CKR_OK) {
# 2876|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def392]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2911:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:390:7: enter_function: entry to 'des3_ecb_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:404:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:412:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:422:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:425:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:430:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:431:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:436:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:436:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:437:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:445:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:448:14: call_function: calling 'ckm_des3_ecb_encrypt' from 'des3_ecb_encrypt_update'
# 2909|   
# 2910|       if (!in_data || !out_data || !key) {
# 2911|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 2912|           return CKR_FUNCTION_FAILED;
# 2913|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def393]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2915:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:390:7: enter_function: entry to 'des3_ecb_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:404:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:412:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:422:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:425:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:430:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:431:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:436:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:436:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:437:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:445:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:448:14: call_function: calling 'ckm_des3_ecb_encrypt' from 'des3_ecb_encrypt_update'
# 2913|       }
# 2914|       if (*out_data_len < in_data_len) {
# 2915|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 2916|           return CKR_BUFFER_TOO_SMALL;
# 2917|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def394]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2919:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:390:7: enter_function: entry to 'des3_ecb_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:404:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:412:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:422:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:425:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:430:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:431:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:436:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:436:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:437:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:445:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:448:14: call_function: calling 'ckm_des3_ecb_encrypt' from 'des3_ecb_encrypt_update'
# 2917|       }
# 2918|       if (token_specific.t_tdes_ecb == NULL) {
# 2919|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 2920|           return CKR_MECHANISM_INVALID;
# 2921|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def395]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2922:10: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:390:7: enter_function: entry to 'des3_ecb_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:404:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:412:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:422:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:425:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:430:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:431:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:436:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:436:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:437:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:445:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:448:14: call_function: calling 'ckm_des3_ecb_encrypt' from 'des3_ecb_encrypt_update'
# 2920|           return CKR_MECHANISM_INVALID;
# 2921|       }
# 2922|->     rc = token_specific.t_tdes_ecb(tokdata, in_data, in_data_len,
# 2923|                                      out_data, out_data_len, key, 1);
# 2924|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def396]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2944:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:474:7: enter_function: entry to 'des3_ecb_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:488:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:496:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:507:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:510:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:515:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:516:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:521:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:521:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:522:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:529:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:532:14: call_function: calling 'ckm_des3_ecb_decrypt' from 'des3_ecb_decrypt_update'
# 2942|   
# 2943|       if (!in_data || !out_data || !key) {
# 2944|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 2945|           return CKR_FUNCTION_FAILED;
# 2946|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def397]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2948:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:474:7: enter_function: entry to 'des3_ecb_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:488:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:496:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:507:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:510:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:515:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:516:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:521:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:521:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:522:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:529:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:532:14: call_function: calling 'ckm_des3_ecb_decrypt' from 'des3_ecb_decrypt_update'
# 2946|       }
# 2947|       if (*out_data_len < in_data_len) {
# 2948|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 2949|           return CKR_BUFFER_TOO_SMALL;
# 2950|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def398]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2953:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:474:7: enter_function: entry to 'des3_ecb_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:488:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:496:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:507:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:510:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:515:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:516:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:521:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:521:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:522:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:529:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:532:14: call_function: calling 'ckm_des3_ecb_decrypt' from 'des3_ecb_decrypt_update'
# 2951|   
# 2952|       if (token_specific.t_tdes_ecb == NULL) {
# 2953|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 2954|           return CKR_MECHANISM_INVALID;
# 2955|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def399]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2956:10: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:474:7: enter_function: entry to 'des3_ecb_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:488:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:496:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:507:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:510:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:515:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:516:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:521:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:521:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:522:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:529:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:532:14: call_function: calling 'ckm_des3_ecb_decrypt' from 'des3_ecb_decrypt_update'
# 2954|           return CKR_MECHANISM_INVALID;
# 2955|       }
# 2956|->     rc = token_specific.t_tdes_ecb(tokdata, in_data, in_data_len,
# 2957|                                      out_data, out_data_len, key, 0);
# 2958|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def400]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2979:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:558:7: enter_function: entry to 'des3_cbc_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:573:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:581:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:592:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:595:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:600:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:601:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:607:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:607:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:608:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:616:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:619:14: call_function: calling 'ckm_des3_cbc_encrypt' from 'des3_cbc_encrypt_update'
# 2977|   
# 2978|       if (!in_data || !out_data || !init_v || !key) {
# 2979|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 2980|           return CKR_FUNCTION_FAILED;
# 2981|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def401]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2984:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:558:7: enter_function: entry to 'des3_cbc_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:573:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:581:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:592:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:595:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:600:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:601:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:607:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:607:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:608:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:616:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:619:14: call_function: calling 'ckm_des3_cbc_encrypt' from 'des3_cbc_encrypt_update'
# 2982|       if (*out_data_len < in_data_len) {
# 2983|           *out_data_len = in_data_len;
# 2984|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 2985|           return CKR_BUFFER_TOO_SMALL;
# 2986|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def402]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2988:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:558:7: enter_function: entry to 'des3_cbc_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:573:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:581:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:592:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:595:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:600:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:601:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:607:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:607:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:608:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:616:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:619:14: call_function: calling 'ckm_des3_cbc_encrypt' from 'des3_cbc_encrypt_update'
# 2986|       }
# 2987|       if (token_specific.t_tdes_cbc == NULL) {
# 2988|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 2989|           return CKR_MECHANISM_INVALID;
# 2990|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def403]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:2991:10: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:558:7: enter_function: entry to 'des3_cbc_encrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:573:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:581:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:592:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:595:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:600:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:601:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:607:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:607:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:608:12: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:616:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:619:14: call_function: calling 'ckm_des3_cbc_encrypt' from 'des3_cbc_encrypt_update'
# 2989|           return CKR_MECHANISM_INVALID;
# 2990|       }
# 2991|->     rc = token_specific.t_tdes_cbc(tokdata, in_data, in_data_len,
# 2992|                                      out_data, out_data_len, key, init_v, 1);
# 2993|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def404]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:3014:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:649:7: enter_function: entry to 'des3_cbc_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:664:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:672:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:683:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:686:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:691:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:692:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:698:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:698:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:699:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:707:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:710:14: call_function: calling 'ckm_des3_cbc_decrypt' from 'des3_cbc_decrypt_update'
# 3012|   
# 3013|       if (!in_data || !out_data || !init_v || !key) {
# 3014|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 3015|           return CKR_FUNCTION_FAILED;
# 3016|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def405]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:3014:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:318:7: enter_function: entry to 'des3_cbc_pad_decrypt'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:332:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:341:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:348:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:348:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:356:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:358:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:364:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:364:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:365:8: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:370:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:370:10: call_function: calling 'ckm_des3_cbc_decrypt' from 'des3_cbc_pad_decrypt'
# 3012|   
# 3013|       if (!in_data || !out_data || !init_v || !key) {
# 3014|->         TRACE_ERROR("%s received bad argument(s)\n", __func__);
# 3015|           return CKR_FUNCTION_FAILED;
# 3016|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def406]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:3018:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:649:7: enter_function: entry to 'des3_cbc_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:664:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:672:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:683:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:686:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:691:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:692:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:698:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:698:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:699:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:707:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:710:14: call_function: calling 'ckm_des3_cbc_decrypt' from 'des3_cbc_decrypt_update'
# 3016|       }
# 3017|       if (*out_data_len < in_data_len) {
# 3018|->         TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 3019|           return CKR_BUFFER_TOO_SMALL;
# 3020|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def407]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:3022:9: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:649:7: enter_function: entry to 'des3_cbc_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:664:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:672:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:683:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:686:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:691:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:692:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:698:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:698:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:699:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:707:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:710:14: call_function: calling 'ckm_des3_cbc_decrypt' from 'des3_cbc_decrypt_update'
# 3020|       }
# 3021|       if (token_specific.t_tdes_cbc == NULL) {
# 3022|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 3023|           return CKR_MECHANISM_INVALID;
# 3024|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def408]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:3022:9: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:318:7: enter_function: entry to 'des3_cbc_pad_decrypt'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:332:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:341:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:348:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:348:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:356:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:358:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:364:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:364:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:365:8: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:370:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:370:10: call_function: calling 'ckm_des3_cbc_decrypt' from 'des3_cbc_pad_decrypt'
# 3020|       }
# 3021|       if (token_specific.t_tdes_cbc == NULL) {
# 3022|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 3023|           return CKR_MECHANISM_INVALID;
# 3024|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def409]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:3025:10: warning[-Wanalyzer-malloc-leak]: leak of 'cipher'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:649:7: enter_function: entry to 'des3_cbc_decrypt_update'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:664:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:672:8: branch_false: following 'false' branch (when 'total > 7')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:683:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:686:12: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:691:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:692:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:698:30: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:698:30: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:699:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:707:39: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:710:14: call_function: calling 'ckm_des3_cbc_decrypt' from 'des3_cbc_decrypt_update'
# 3023|           return CKR_MECHANISM_INVALID;
# 3024|       }
# 3025|->     rc = token_specific.t_tdes_cbc(tokdata, in_data, in_data_len,
# 3026|                                      out_data, out_data_len, key, init_v, 0);
# 3027|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def410]
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:3025:10: warning[-Wanalyzer-malloc-leak]: leak of 'clear'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:318:7: enter_function: entry to 'des3_cbc_pad_decrypt'
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:332:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:341:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:348:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:348:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:356:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:358:8: branch_false: following 'false' branch (when 'length_only != 1')...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:364:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:364:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:365:8: branch_false: following 'false' branch (when 'clear' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:370:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_des3.c:370:10: call_function: calling 'ckm_des3_cbc_decrypt' from 'des3_cbc_pad_decrypt'
# 3023|           return CKR_MECHANISM_INVALID;
# 3024|       }
# 3025|->     rc = token_specific.t_tdes_cbc(tokdata, in_data, in_data_len,
# 3026|                                      out_data, out_data_len, key, init_v, 0);
# 3027|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def411]
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:636:10: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:665:7: enter_function: entry to 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:682:8: branch_false: following 'false' branch (when 'max_keybytes > key_len')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:692:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:693:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:694:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:697:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:698:8: branch_false: following 'false' branch (when 'shared_data_len == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:704:22: call_function: inlined call to '__bswap_32' from 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:706:14: call_function: calling 'ckm_kdf' from 'ckm_kdf_X9_63'
#  634|       memset(&digest_mech, 0, sizeof(CK_MECHANISM));
#  635|   
#  636|->     rc = digest_from_kdf(kdf, &digest_mech.mechanism);
#  637|       if (rc != CKR_OK) {
#  638|           TRACE_ERROR("digest_from_kdf failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def412]
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:638:9: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:665:7: enter_function: entry to 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:682:8: branch_false: following 'false' branch (when 'max_keybytes > key_len')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:692:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:693:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:694:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:697:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:698:8: branch_false: following 'false' branch (when 'shared_data_len == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:704:22: call_function: inlined call to '__bswap_32' from 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:706:14: call_function: calling 'ckm_kdf' from 'ckm_kdf_X9_63'
#  636|       rc = digest_from_kdf(kdf, &digest_mech.mechanism);
#  637|       if (rc != CKR_OK) {
#  638|->         TRACE_ERROR("digest_from_kdf failed\n");
#  639|           return CKR_FUNCTION_NOT_SUPPORTED;
#  640|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def413]
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:642:10: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:665:7: enter_function: entry to 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:682:8: branch_false: following 'false' branch (when 'max_keybytes > key_len')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:692:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:693:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:694:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:697:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:698:8: branch_false: following 'false' branch (when 'shared_data_len == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:704:22: call_function: inlined call to '__bswap_32' from 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:706:14: call_function: calling 'ckm_kdf' from 'ckm_kdf_X9_63'
#  640|       }
#  641|   
#  642|->     rc = get_sha_size(digest_mech.mechanism, h_len);
#  643|       if (rc != CKR_OK) {
#  644|           TRACE_ERROR("get_sha_size failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def414]
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:644:9: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:665:7: enter_function: entry to 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:682:8: branch_false: following 'false' branch (when 'max_keybytes > key_len')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:692:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:693:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:694:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:697:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:698:8: branch_false: following 'false' branch (when 'shared_data_len == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:704:22: call_function: inlined call to '__bswap_32' from 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:706:14: call_function: calling 'ckm_kdf' from 'ckm_kdf_X9_63'
#  642|       rc = get_sha_size(digest_mech.mechanism, h_len);
#  643|       if (rc != CKR_OK) {
#  644|->         TRACE_ERROR("get_sha_size failed\n");
#  645|           return CKR_FUNCTION_NOT_SUPPORTED;
#  646|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def415]
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:648:10: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:665:7: enter_function: entry to 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:682:8: branch_false: following 'false' branch (when 'max_keybytes > key_len')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:692:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:693:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:694:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:697:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:698:8: branch_false: following 'false' branch (when 'shared_data_len == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:704:22: call_function: inlined call to '__bswap_32' from 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:706:14: call_function: calling 'ckm_kdf' from 'ckm_kdf_X9_63'
#  646|       }
#  647|   
#  648|->     rc = digest_mgr_init(tokdata, sess, &ctx, &digest_mech, FALSE);
#  649|       if (rc != CKR_OK) {
#  650|           TRACE_ERROR("%s\n", ock_err(ERR_FUNCTION_FAILED));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def416]
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:650:9: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:665:7: enter_function: entry to 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:682:8: branch_false: following 'false' branch (when 'max_keybytes > key_len')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:692:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:693:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:694:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:697:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:698:8: branch_false: following 'false' branch (when 'shared_data_len == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:704:22: call_function: inlined call to '__bswap_32' from 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:706:14: call_function: calling 'ckm_kdf' from 'ckm_kdf_X9_63'
#  648|       rc = digest_mgr_init(tokdata, sess, &ctx, &digest_mech, FALSE);
#  649|       if (rc != CKR_OK) {
#  650|->         TRACE_ERROR("%s\n", ock_err(ERR_FUNCTION_FAILED));
#  651|           return rc;
#  652|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def417]
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:654:10: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:665:7: enter_function: entry to 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:682:8: branch_false: following 'false' branch (when 'max_keybytes > key_len')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:692:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:693:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:694:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:697:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:698:8: branch_false: following 'false' branch (when 'shared_data_len == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:703:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:704:22: call_function: inlined call to '__bswap_32' from 'ckm_kdf_X9_63'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:706:14: call_function: calling 'ckm_kdf' from 'ckm_kdf_X9_63'
#  652|       }
#  653|   
#  654|->     rc = digest_mgr_digest(tokdata, sess, FALSE, &ctx, data, data_len, hash,
#  655|                              h_len);
#  656|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def418]
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1438:5: warning[-Wanalyzer-malloc-leak]: leak of 'ec_point'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1374:7: enter_function: entry to 'ec_point_from_priv_key'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1386:11: call_function: calling 'ec_nid_from_oid' from 'ec_point_from_priv_key'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1386:11: return_function: returning to 'ec_point_from_priv_key' from 'ec_nid_from_oid'
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1387:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1390:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1391:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1395:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1395:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1400:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1401:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1406:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1409:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1413:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1413:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1419:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1421:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1425:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1425:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1430:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1431:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1432:8: branch_false: following 'false' branch (when 'ec_point' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1437:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1438:5: throw: if 'BN_bn2binpad' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ec.c:1438:5: danger: 'ec_point' leaks here; was allocated at [(23)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/22)
# 1436|   
# 1437|       ec_point[0] = POINT_CONVERSION_UNCOMPRESSED;
# 1438|->     BN_bn2binpad(bn_x, ec_point + 1, p_len);
# 1439|       BN_bn2binpad(bn_y, ec_point + 1 + p_len, p_len);
# 1440|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def419]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:268:16: warning[-Wanalyzer-malloc-leak]: leak of 'ssl_ptr'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:164:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:175:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:177:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:187:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:188:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:192:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:195:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:207:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:229:19: branch_true: following 'true' branch (when 'try != 11')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:230:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:238:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:261:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:262:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:263:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:268:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:268:16: throw: if 'BN_bn2bin' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:268:16: danger: 'ssl_ptr' leaks here; was allocated at [(27)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/26)
#  266|           goto done;
#  267|       }
#  268|->     BNLength = BN_bn2bin(bignum, ssl_ptr);
#  269|       rc = build_attribute(CKA_MODULUS, ssl_ptr, BNLength, &attr);    // in bytes
#  270|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def420]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:304:16: warning[-Wanalyzer-malloc-leak]: leak of 'ssl_ptr'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:164:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:175:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:177:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:187:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:188:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:192:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:195:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:207:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:229:19: branch_true: following 'true' branch (when 'try != 11')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:230:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:238:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:261:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:262:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:263:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:268:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:270:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:274:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:275:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:280:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:291:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:297:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:298:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:299:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:304:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:304:16: throw: if 'BN_bn2bin' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:304:16: danger: 'ssl_ptr' leaks here; was allocated at [(37)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/36)
#  302|           goto done;
#  303|       }
#  304|->     BNLength = BN_bn2bin(bignum, ssl_ptr);
#  305|       // in bytes
#  306|       rc = build_attribute(CKA_PUBLIC_EXPONENT, ssl_ptr, BNLength, &attr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def421]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:377:16: warning[-Wanalyzer-malloc-leak]: leak of 'ssl_ptr'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:164:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:175:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:177:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:187:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:188:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:192:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:195:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:207:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:229:19: branch_true: following 'true' branch (when 'try != 11')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:230:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:238:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:261:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:262:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:263:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:268:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:270:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:274:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:275:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:280:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:291:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:297:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:298:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:299:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:304:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:307:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:311:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:312:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:321:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:322:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:326:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:327:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:332:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:343:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:347:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:348:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:370:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:371:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:372:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:377:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:377:16: throw: if 'BN_bn2bin' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:377:16: danger: 'ssl_ptr' leaks here; was allocated at [(55)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/54)
#  375|           goto done;
#  376|       }
#  377|->     BNLength = BN_bn2bin(bignum, ssl_ptr);
#  378|       rc = build_attribute(CKA_MODULUS, ssl_ptr, BNLength, &attr);    // in bytes
#  379|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def422]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:413:16: warning[-Wanalyzer-malloc-leak]: leak of 'ssl_ptr'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:164:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:175:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:177:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:187:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:188:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:192:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:195:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:207:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:229:19: branch_true: following 'true' branch (when 'try != 11')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:230:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:238:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:261:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:262:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:263:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:268:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:270:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:274:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:275:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:280:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:291:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:297:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:298:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:299:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:304:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:307:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:311:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:312:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:321:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:322:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:326:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:327:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:332:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:343:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:347:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:348:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:370:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:371:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:372:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:377:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:379:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:383:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:384:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:389:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:406:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:407:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:408:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:413:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:413:16: throw: if 'BN_bn2bin' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:413:16: danger: 'ssl_ptr' leaks here; was allocated at [(65)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/64)
#  411|           goto done;
#  412|       }
#  413|->     BNLength = BN_bn2bin(bignum, ssl_ptr);
#  414|       rc = build_attribute(CKA_PRIVATE_EXPONENT, ssl_ptr, BNLength, &attr);
#  415|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def423]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:451:16: warning[-Wanalyzer-malloc-leak]: leak of 'ssl_ptr'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:164:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:175:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:177:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:187:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:188:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:192:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:195:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:207:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:229:19: branch_true: following 'true' branch (when 'try != 11')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:230:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:238:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:261:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:262:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:263:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:268:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:270:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:274:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:275:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:280:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:291:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:297:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:298:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:299:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:304:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:307:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:311:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:312:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:321:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:322:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:326:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:327:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:332:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:343:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:347:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:348:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:370:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:371:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:372:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:377:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:379:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:383:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:384:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:389:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:406:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:407:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:408:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:413:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:415:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:419:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:420:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:426:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:438:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:444:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:445:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:446:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:451:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:451:16: throw: if 'BN_bn2bin' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:451:16: danger: 'ssl_ptr' leaks here; was allocated at [(75)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/74)
#  449|           goto done;
#  450|       }
#  451|->     BNLength = BN_bn2bin(bignum, ssl_ptr);
#  452|       rc = build_attribute(CKA_PRIME_1, ssl_ptr, BNLength, &attr);
#  453|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def424]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:489:16: warning[-Wanalyzer-malloc-leak]: leak of 'ssl_ptr'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:164:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:175:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:177:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:187:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:188:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:192:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:195:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:207:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:229:19: branch_true: following 'true' branch (when 'try != 11')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:230:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:238:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:261:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:262:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:263:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:268:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:270:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:274:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:275:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:280:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:291:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:297:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:298:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:299:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:304:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:307:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:311:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:312:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:321:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:322:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:326:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:327:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:332:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:343:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:347:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:348:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:370:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:371:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:372:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:377:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:379:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:383:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:384:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:389:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:406:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:407:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:408:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:413:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:415:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:419:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:420:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:426:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:438:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:444:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:445:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:446:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:451:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:453:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:457:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:458:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:464:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:476:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:482:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:483:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:484:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:489:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:489:16: throw: if 'BN_bn2bin' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:489:16: danger: 'ssl_ptr' leaks here; was allocated at [(85)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/84)
#  487|           goto done;
#  488|       }
#  489|->     BNLength = BN_bn2bin(bignum, ssl_ptr);
#  490|       rc = build_attribute(CKA_PRIME_2, ssl_ptr, BNLength, &attr);
#  491|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def425]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:527:16: warning[-Wanalyzer-malloc-leak]: leak of 'ssl_ptr'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:164:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:175:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:177:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:187:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:188:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:192:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:195:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:207:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:229:19: branch_true: following 'true' branch (when 'try != 11')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:230:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:238:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:261:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:262:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:263:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:268:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:270:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:274:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:275:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:280:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:291:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:297:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:298:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:299:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:304:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:307:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:311:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:312:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:321:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:322:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:326:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:327:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:332:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:343:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:347:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:348:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:370:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:371:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:372:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:377:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:379:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:383:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:384:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:389:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:406:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:407:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:408:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:413:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:415:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:419:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:420:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:426:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:438:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:444:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:445:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:446:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:451:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:453:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:457:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:458:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:464:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:476:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:482:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:483:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:484:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:489:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:491:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:495:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:496:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:502:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:514:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:520:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:521:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:522:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:527:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:527:16: throw: if 'BN_bn2bin' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:527:16: danger: 'ssl_ptr' leaks here; was allocated at [(95)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/94)
#  525|           goto done;
#  526|       }
#  527|->     BNLength = BN_bn2bin(bignum, ssl_ptr);
#  528|       rc = build_attribute(CKA_EXPONENT_1, ssl_ptr, BNLength, &attr);
#  529|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def426]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:565:16: warning[-Wanalyzer-malloc-leak]: leak of 'ssl_ptr'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:164:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:175:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:177:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:187:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:188:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:192:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:195:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:207:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:229:19: branch_true: following 'true' branch (when 'try != 11')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:230:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:238:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:261:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:262:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:263:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:268:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:270:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:274:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:275:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:280:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:291:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:297:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:298:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:299:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:304:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:307:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:311:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:312:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:321:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:322:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:326:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:327:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:332:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:343:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:347:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:348:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:370:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:371:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:372:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:377:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:379:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:383:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:384:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:389:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:406:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:407:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:408:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:413:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:415:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:419:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:420:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:426:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:438:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:444:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:445:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:446:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:451:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:453:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:457:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:458:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:464:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:476:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:482:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:483:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:484:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:489:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:491:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:495:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:496:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:502:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:514:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:520:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:521:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:522:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:527:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:533:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:534:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:540:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:552:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:558:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:559:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:560:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:565:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:565:16: throw: if 'BN_bn2bin' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:565:16: danger: 'ssl_ptr' leaks here; was allocated at [(105)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/104)
#  563|           goto done;
#  564|       }
#  565|->     BNLength = BN_bn2bin(bignum, ssl_ptr);
#  566|       rc = build_attribute(CKA_EXPONENT_2, ssl_ptr, BNLength, &attr);
#  567|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def427]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:604:16: warning[-Wanalyzer-malloc-leak]: leak of 'ssl_ptr'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:164:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:170:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:175:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:177:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:182:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:187:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:188:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:192:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:195:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:201:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:207:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:206:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:215:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:229:19: branch_true: following 'true' branch (when 'try != 11')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:230:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:238:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:255:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:261:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:262:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:263:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:268:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:270:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:274:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:275:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:280:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:291:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:297:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:298:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:299:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:304:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:307:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:311:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:312:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:321:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:322:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:326:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:327:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:332:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:343:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:347:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:348:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:364:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:370:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:371:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:372:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:377:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:379:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:383:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:384:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:389:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:400:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:406:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:407:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:408:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:413:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:415:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:419:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:420:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:426:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:438:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:444:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:445:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:446:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:451:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:453:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:457:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:458:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:464:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:476:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:482:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:483:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:484:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:489:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:491:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:495:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:496:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:502:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:514:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:520:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:521:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:522:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:527:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:533:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:534:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:540:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:552:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:558:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:559:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:560:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:565:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:567:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:571:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:572:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:578:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:590:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:597:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:598:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:599:8: branch_false: following 'false' branch (when 'ssl_ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:604:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:604:16: throw: if 'BN_bn2bin' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:604:16: danger: 'ssl_ptr' leaks here; was allocated at [(115)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/114)
#  602|           goto done;
#  603|       }
#  604|->     BNLength = BN_bn2bin(bignum, ssl_ptr);
#  605|       rc = build_attribute(CKA_COEFFICIENT, ssl_ptr, BNLength, &attr);
#  606|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def428]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1402:10: warning[-Wanalyzer-malloc-leak]: leak of 'emdata'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1367:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1372:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1372:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1377:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1381:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1386:50: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1388:7: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1392:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1395:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1396:8: branch_false: following 'false' branch (when 'emdata' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1402:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1402:10: throw: if 'emsa_pss_encode' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1402:10: danger: 'emdata' leaks here; was allocated at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
# 1400|       }
# 1401|   
# 1402|->     rc = emsa_pss_encode(tokdata, pssParms, in_data, in_data_len, emdata,
# 1403|                            &modbytes);
# 1404|       if (rc != CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def429]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1768:10: warning[-Wanalyzer-malloc-leak]: leak of 'em_data'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1736:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1744:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1749:50: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1751:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1756:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1761:27: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1762:8: branch_false: following 'false' branch (when 'em_data' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1768:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1768:10: throw: if 'encode_eme_oaep' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1768:10: danger: 'em_data' leaks here; was allocated at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
# 1766|       }
# 1767|   
# 1768|->     rc = encode_eme_oaep(tokdata, in_data, in_data_len, em_data,
# 1769|                            modulus_bytes, oaepParms->mgf, hash, hlen);
# 1770|       if (rc != CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def430]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1836:10: warning[-Wanalyzer-malloc-leak]: leak of 'decr_data'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1807:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1815:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1820:50: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1822:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1827:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1829:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1830:8: branch_false: following 'false' branch (when 'decr_data' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1836:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1836:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:1836:10: danger: 'decr_data' leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
# 1834|       }
# 1835|   
# 1836|->     rc = rsa_decrypt_func(tokdata, in_data, in_data_len, decr_data, key_obj);
# 1837|       if (rc != CKR_OK)
# 1838|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def431]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2647:9: warning[-Wanalyzer-malloc-leak]: leak of 'sigbuf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2579:7: enter_function: entry to 'openssl_specific_ec_sign'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2601:10: call_function: calling 'openssl_get_ex_data' from 'openssl_specific_ec_sign'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2601:10: return_function: returning to 'openssl_specific_ec_sign' from 'openssl_get_ex_data'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2604:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2607:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2607:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2614:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2615:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2621:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2622:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2628:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2628:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2634:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2634:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2640:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2640:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2641:8: branch_false: following 'false' branch (when 'sigbuf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2647:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2647:9: throw: if 'EVP_PKEY_sign' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:2647:9: danger: 'sigbuf' leaks here; was allocated at [(28)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/27)
# 2645|       }
# 2646|   
# 2647|->     if (EVP_PKEY_sign(ctx, sigbuf, &siglen, in_data, in_data_len) <= 0) {
# 2648|           TRACE_ERROR("EVP_PKEY_sign failed\n");
# 2649|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def432]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: warning[-Wanalyzer-malloc-leak]: leak of 'derived_key_value'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3336:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3342:8: branch_false: following 'false' branch (when 'derived_key_value' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: throw: if 'EVP_MD_CTX_new' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: danger: 'derived_key_value' leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
# 3346|       }
# 3347|   
# 3348|->     ctx = EVP_MD_CTX_new();
# 3349|       if (ctx == NULL) {
# 3350|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def433]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3350:9: warning[-Wanalyzer-malloc-leak]: leak of 'derived_key_value'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3336:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3342:8: branch_false: following 'false' branch (when 'derived_key_value' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3349:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3350:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3350:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3350:9: danger: 'derived_key_value' leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
# 3348|       ctx = EVP_MD_CTX_new();
# 3349|       if (ctx == NULL) {
# 3350|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 3351|           rc = CKR_HOST_MEMORY;
# 3352|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def434]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3357:14: warning[-Wanalyzer-malloc-leak]: leak of 'derived_key_value'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3336:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3342:8: branch_false: following 'false' branch (when 'derived_key_value' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3349:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3355:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3357:14: throw: if 'EVP_shake128' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3357:14: danger: 'derived_key_value' leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
# 3355|       switch (mech->mechanism) {
# 3356|       case CKM_SHAKE_128_KEY_DERIVATION:
# 3357|->         md = EVP_shake128();
# 3358|           break;
# 3359|       case CKM_SHAKE_256_KEY_DERIVATION:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def435]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3360:14: warning[-Wanalyzer-malloc-leak]: leak of 'derived_key_value'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3336:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3342:8: branch_false: following 'false' branch (when 'derived_key_value' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3349:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3355:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3360:14: throw: if 'EVP_shake256' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3360:14: danger: 'derived_key_value' leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
# 3358|           break;
# 3359|       case CKM_SHAKE_256_KEY_DERIVATION:
# 3360|->         md = EVP_shake256();
# 3361|           break;
# 3362|       default:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def436]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3363:9: warning[-Wanalyzer-malloc-leak]: leak of 'derived_key_value'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3336:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3342:8: branch_false: following 'false' branch (when 'derived_key_value' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3349:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3355:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3363:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3363:9: danger: 'derived_key_value' leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
# 3361|           break;
# 3362|       default:
# 3363|->         TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_INVALID));
# 3364|           rc = CKR_MECHANISM_INVALID;
# 3365|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def437]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3369:10: warning[-Wanalyzer-malloc-leak]: leak of 'derived_key_value'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3336:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3342:8: branch_false: following 'false' branch (when 'derived_key_value' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3349:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3355:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3368:8: branch_false: following 'false' branch (when 'md' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3369:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3369:10: throw: if 'EVP_DigestInit_ex' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3369:10: danger: 'derived_key_value' leaks here; was allocated at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
# 3367|   
# 3368|       if (md == NULL ||
# 3369|->         !EVP_DigestInit_ex(ctx, md, NULL) ||
# 3370|           !EVP_DigestUpdate(ctx, base_key_value->pValue,
# 3371|                             base_key_value->ulValueLen) ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def438]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3370:10: warning[-Wanalyzer-malloc-leak]: leak of 'derived_key_value'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3336:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3342:8: branch_false: following 'false' branch (when 'derived_key_value' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3349:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3355:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3368:8: branch_false: following 'false' branch (when 'md' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3369:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3368:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3371:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3370:10: throw: if 'EVP_DigestUpdate' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3370:10: danger: 'derived_key_value' leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
# 3368|       if (md == NULL ||
# 3369|           !EVP_DigestInit_ex(ctx, md, NULL) ||
# 3370|->         !EVP_DigestUpdate(ctx, base_key_value->pValue,
# 3371|                             base_key_value->ulValueLen) ||
# 3372|           !EVP_DigestFinalXOF(ctx, derived_key_value, derived_key_len)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def439]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3372:10: warning[-Wanalyzer-malloc-leak]: leak of 'derived_key_value'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3336:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3342:8: branch_false: following 'false' branch (when 'derived_key_value' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3349:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3355:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3368:8: branch_false: following 'false' branch (when 'md' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3369:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3368:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3371:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3368:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3372:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3372:10: throw: if 'EVP_DigestFinalXOF' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3372:10: danger: 'derived_key_value' leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
# 3370|           !EVP_DigestUpdate(ctx, base_key_value->pValue,
# 3371|                             base_key_value->ulValueLen) ||
# 3372|->         !EVP_DigestFinalXOF(ctx, derived_key_value, derived_key_len)) {
# 3373|           TRACE_ERROR("%s\n", ock_err(ERR_FUNCTION_FAILED));
# 3374|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def440]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3373:9: warning[-Wanalyzer-malloc-leak]: leak of 'derived_key_value'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3336:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3342:8: branch_false: following 'false' branch (when 'derived_key_value' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3349:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3355:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3373:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3373:9: danger: 'derived_key_value' leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
# 3371|                             base_key_value->ulValueLen) ||
# 3372|           !EVP_DigestFinalXOF(ctx, derived_key_value, derived_key_len)) {
# 3373|->         TRACE_ERROR("%s\n", ock_err(ERR_FUNCTION_FAILED));
# 3374|           rc = CKR_FUNCTION_FAILED;
# 3375|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def441]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3439:9: warning[-Wanalyzer-malloc-leak]: leak of 'derived_key_value'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3336:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3342:8: branch_false: following 'false' branch (when 'derived_key_value' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3438:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3439:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3439:9: throw: if 'EVP_MD_CTX_free' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3439:9: danger: 'derived_key_value' leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
# 3437|   out:
# 3438|       if (ctx != NULL)
# 3439|->         EVP_MD_CTX_free(ctx);
# 3440|   
# 3441|       if (derived_key_value != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def442]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3442:9: warning[-Wanalyzer-malloc-leak]: leak of 'derived_key_value'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3336:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3341:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3342:8: branch_false: following 'false' branch (when 'derived_key_value' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3348:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3441:8: branch_true: following 'true' branch (when 'derived_key_value' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3442:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3442:9: throw: if 'OPENSSL_cleanse' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3442:9: danger: 'derived_key_value' leaks here; was allocated at [(3)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/2)
# 3440|   
# 3441|       if (derived_key_value != NULL) {
# 3442|->         OPENSSL_cleanse(derived_key_value, derived_key_len);
# 3443|           free(derived_key_value);
# 3444|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def443]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3475:20: warning[-Wanalyzer-malloc-leak]: leak of 'out_buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4766:7: enter_function: entry to 'openssl_specific_tdes_mac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4773:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4774:8: branch_false: following 'false' branch (when 'out_buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: call_function: calling 'openssl_specific_tdes_cbc' from 'openssl_specific_tdes_mac'
# 3473|       case CKM_DES3_CBC:
# 3474|           if (keytype == CKK_DES2 && keylen == DES_KEY_SIZE * 2)
# 3475|->             return EVP_des_ede_cbc();
# 3476|           if (keytype == CKK_DES3 && keylen == DES_KEY_SIZE * 3)
# 3477|               return EVP_des_ede3_cbc();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def444]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3477:20: warning[-Wanalyzer-malloc-leak]: leak of 'out_buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4766:7: enter_function: entry to 'openssl_specific_tdes_mac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4773:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4774:8: branch_false: following 'false' branch (when 'out_buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: call_function: calling 'openssl_specific_tdes_cbc' from 'openssl_specific_tdes_mac'
# 3475|               return EVP_des_ede_cbc();
# 3476|           if (keytype == CKK_DES3 && keylen == DES_KEY_SIZE * 3)
# 3477|->             return EVP_des_ede3_cbc();
# 3478|           break;
# 3479|       case CKM_DES_OFB64:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def445]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3520:20: warning[-Wanalyzer-malloc-leak]: leak of 'out_buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4444:7: enter_function: entry to 'openssl_specific_aes_mac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4451:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4452:8: branch_false: following 'false' branch (when 'out_buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4457:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4457:10: call_function: calling 'openssl_specific_aes_cbc' from 'openssl_specific_aes_mac'
# 3518|           switch (keylen * 8) {
# 3519|           case 128:
# 3520|->             return EVP_aes_128_cbc();
# 3521|           case 192:
# 3522|               return EVP_aes_192_cbc();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def446]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3522:20: warning[-Wanalyzer-malloc-leak]: leak of 'out_buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4444:7: enter_function: entry to 'openssl_specific_aes_mac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4451:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4452:8: branch_false: following 'false' branch (when 'out_buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4457:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4457:10: call_function: calling 'openssl_specific_aes_cbc' from 'openssl_specific_aes_mac'
# 3520|               return EVP_aes_128_cbc();
# 3521|           case 192:
# 3522|->             return EVP_aes_192_cbc();
# 3523|           case 256:
# 3524|               return EVP_aes_256_cbc();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def447]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3524:20: warning[-Wanalyzer-malloc-leak]: leak of 'out_buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4444:7: enter_function: entry to 'openssl_specific_aes_mac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4451:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4452:8: branch_false: following 'false' branch (when 'out_buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4457:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4457:10: call_function: calling 'openssl_specific_aes_cbc' from 'openssl_specific_aes_mac'
# 3522|               return EVP_aes_192_cbc();
# 3523|           case 256:
# 3524|->             return EVP_aes_256_cbc();
# 3525|           default:
# 3526|               break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def448]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3644:5: warning[-Wanalyzer-malloc-leak]: leak of 'out_buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4444:7: enter_function: entry to 'openssl_specific_aes_mac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4451:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4452:8: branch_false: following 'false' branch (when 'out_buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4457:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4457:10: call_function: calling 'openssl_specific_aes_cbc' from 'openssl_specific_aes_mac'
# 3642|       }
# 3643|   
# 3644|->     TRACE_ERROR("key length %lu or key type %lu not supported for mech 0x%lx\n",
# 3645|                               keylen, keytype, mech);
# 3646|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def449]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3662:10: warning[-Wanalyzer-malloc-leak]: leak of 'out_buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4766:7: enter_function: entry to 'openssl_specific_tdes_mac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4773:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4774:8: branch_false: following 'false' branch (when 'out_buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: call_function: calling 'openssl_specific_tdes_cbc' from 'openssl_specific_tdes_mac'
# 3660|       CK_RV rc;
# 3661|   
# 3662|->     rc = template_attribute_get_ulong(key->template, CKA_KEY_TYPE, &keytype);
# 3663|       if (rc != CKR_OK) {
# 3664|           TRACE_ERROR("Could not find CKA_KEY_TYPE for the key\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def450]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3664:9: warning[-Wanalyzer-malloc-leak]: leak of 'out_buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4766:7: enter_function: entry to 'openssl_specific_tdes_mac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4773:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4774:8: branch_false: following 'false' branch (when 'out_buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: call_function: calling 'openssl_specific_tdes_cbc' from 'openssl_specific_tdes_mac'
# 3662|       rc = template_attribute_get_ulong(key->template, CKA_KEY_TYPE, &keytype);
# 3663|       if (rc != CKR_OK) {
# 3664|->         TRACE_ERROR("Could not find CKA_KEY_TYPE for the key\n");
# 3665|           return rc;
# 3666|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def451]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3668:10: warning[-Wanalyzer-malloc-leak]: leak of 'out_buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4766:7: enter_function: entry to 'openssl_specific_tdes_mac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4773:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4774:8: branch_false: following 'false' branch (when 'out_buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: call_function: calling 'openssl_specific_tdes_cbc' from 'openssl_specific_tdes_mac'
# 3666|       }
# 3667|   
# 3668|->     rc = template_attribute_get_non_empty(key->template, CKA_VALUE, &key_attr);
# 3669|       if (rc != CKR_OK) {
# 3670|           TRACE_ERROR("Could not find CKA_VALUE for the key.\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def452]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3670:9: warning[-Wanalyzer-malloc-leak]: leak of 'out_buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4766:7: enter_function: entry to 'openssl_specific_tdes_mac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4773:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4774:8: branch_false: following 'false' branch (when 'out_buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: call_function: calling 'openssl_specific_tdes_cbc' from 'openssl_specific_tdes_mac'
# 3668|       rc = template_attribute_get_non_empty(key->template, CKA_VALUE, &key_attr);
# 3669|       if (rc != CKR_OK) {
# 3670|->         TRACE_ERROR("Could not find CKA_VALUE for the key.\n");
# 3671|           return rc;
# 3672|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def453]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3676:9: warning[-Wanalyzer-malloc-leak]: leak of 'out_buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4766:7: enter_function: entry to 'openssl_specific_tdes_mac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4773:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4774:8: branch_false: following 'false' branch (when 'out_buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:4779:10: call_function: calling 'openssl_specific_tdes_cbc' from 'openssl_specific_tdes_mac'
# 3674|       cipher = openssl_cipher_from_mech(mech, key_attr->ulValueLen, keytype);
# 3675|       if (cipher == NULL) {
# 3676|->         TRACE_ERROR("Cipher not supported.\n");
# 3677|           return CKR_MECHANISM_INVALID;
# 3678|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def454]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3840:21: warning[-Wanalyzer-malloc-leak]: leak of 'cmac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3742:7: enter_function: entry to 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3768:8: branch_true: following 'true' branch (when 'first != 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_false: following 'false' branch (when 'key' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3772:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3774:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3779:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3781:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3786:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: call_function: calling 'openssl_cipher_from_mech' from 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: return_function: returning to 'openssl_cmac_perform' from 'openssl_cipher_from_mech'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3802:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3809:12: branch_false: following 'false' branch (when 'cmac' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3840:21: throw: if 'EVP_MAC_fetch' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3840:21: danger: 'cmac' leaks here; was allocated at [(17)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/16)
# 3838|           }
# 3839|   #else
# 3840|->         cmac->mac = EVP_MAC_fetch(NULL, "CMAC", NULL);
# 3841|           if (cmac->mac == NULL) {
# 3842|               TRACE_ERROR("%s\n", ock_err(ERR_FUNCTION_FAILED));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def455]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3842:13: warning[-Wanalyzer-malloc-leak]: leak of 'cmac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3742:7: enter_function: entry to 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3768:8: branch_true: following 'true' branch (when 'first != 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_false: following 'false' branch (when 'key' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3772:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3774:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3779:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3781:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3786:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: call_function: calling 'openssl_cipher_from_mech' from 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: return_function: returning to 'openssl_cmac_perform' from 'openssl_cipher_from_mech'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3802:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3809:12: branch_false: following 'false' branch (when 'cmac' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3841:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3842:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3842:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3842:13: danger: 'cmac' leaks here; was allocated at [(17)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/16)
# 3840|           cmac->mac = EVP_MAC_fetch(NULL, "CMAC", NULL);
# 3841|           if (cmac->mac == NULL) {
# 3842|->             TRACE_ERROR("%s\n", ock_err(ERR_FUNCTION_FAILED));
# 3843|               rv = CKR_FUNCTION_FAILED;
# 3844|               goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def456]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3847:22: warning[-Wanalyzer-malloc-leak]: leak of 'cmac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3742:7: enter_function: entry to 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3768:8: branch_true: following 'true' branch (when 'first != 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_false: following 'false' branch (when 'key' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3772:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3774:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3779:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3781:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3786:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: call_function: calling 'openssl_cipher_from_mech' from 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: return_function: returning to 'openssl_cmac_perform' from 'openssl_cipher_from_mech'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3802:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3809:12: branch_false: following 'false' branch (when 'cmac' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3841:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3847:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3847:22: throw: if 'EVP_MAC_CTX_new' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3847:22: danger: 'cmac' leaks here; was allocated at [(17)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/16)
# 3845|           }
# 3846|   
# 3847|->         cmac->mctx = EVP_MAC_CTX_new(cmac->mac);
# 3848|           if (cmac->mctx == NULL) {
# 3849|               TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def457]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3849:13: warning[-Wanalyzer-malloc-leak]: leak of 'cmac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3742:7: enter_function: entry to 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3768:8: branch_true: following 'true' branch (when 'first != 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_false: following 'false' branch (when 'key' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3772:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3774:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3779:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3781:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3786:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: call_function: calling 'openssl_cipher_from_mech' from 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: return_function: returning to 'openssl_cmac_perform' from 'openssl_cipher_from_mech'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3802:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3809:12: branch_false: following 'false' branch (when 'cmac' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3841:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3847:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3848:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3849:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3849:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3849:13: danger: 'cmac' leaks here; was allocated at [(17)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/16)
# 3847|           cmac->mctx = EVP_MAC_CTX_new(cmac->mac);
# 3848|           if (cmac->mctx == NULL) {
# 3849|->             TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 3850|               rv = CKR_HOST_MEMORY;
# 3851|               goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def458]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3854:21: warning[-Wanalyzer-malloc-leak]: leak of 'cmac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3742:7: enter_function: entry to 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3768:8: branch_true: following 'true' branch (when 'first != 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_false: following 'false' branch (when 'key' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3772:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3774:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3779:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3781:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3786:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: call_function: calling 'openssl_cipher_from_mech' from 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: return_function: returning to 'openssl_cmac_perform' from 'openssl_cipher_from_mech'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3802:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3809:12: branch_false: following 'false' branch (when 'cmac' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3841:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3847:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3848:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3855:47: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3854:21: throw: if 'OSSL_PARAM_construct_utf8_string' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3854:21: danger: 'cmac' leaks here; was allocated at [(17)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/16)
# 3852|           }
# 3853|   
# 3854|->         params[0] = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_CIPHER,
# 3855|                                         (char *)EVP_CIPHER_get0_name(cipher), 0);
# 3856|           params[1] = OSSL_PARAM_construct_end();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def459]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3855:47: warning[-Wanalyzer-malloc-leak]: leak of 'cmac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3742:7: enter_function: entry to 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3768:8: branch_true: following 'true' branch (when 'first != 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_false: following 'false' branch (when 'key' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3772:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3774:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3779:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3781:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3786:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: call_function: calling 'openssl_cipher_from_mech' from 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: return_function: returning to 'openssl_cmac_perform' from 'openssl_cipher_from_mech'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3802:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3809:12: branch_false: following 'false' branch (when 'cmac' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3841:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3847:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3848:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3855:47: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3855:47: throw: if 'EVP_CIPHER_get0_name' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3855:47: danger: 'cmac' leaks here; was allocated at [(17)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/16)
# 3853|   
# 3854|           params[0] = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_CIPHER,
# 3855|->                                       (char *)EVP_CIPHER_get0_name(cipher), 0);
# 3856|           params[1] = OSSL_PARAM_construct_end();
# 3857|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def460]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3856:21: warning[-Wanalyzer-malloc-leak]: leak of 'cmac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3742:7: enter_function: entry to 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3768:8: branch_true: following 'true' branch (when 'first != 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_false: following 'false' branch (when 'key' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3772:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3774:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3779:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3781:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3786:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: call_function: calling 'openssl_cipher_from_mech' from 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: return_function: returning to 'openssl_cmac_perform' from 'openssl_cipher_from_mech'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3802:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3809:12: branch_false: following 'false' branch (when 'cmac' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3841:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3847:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3848:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3855:47: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3856:21: throw: if 'OSSL_PARAM_construct_end' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3856:21: danger: 'cmac' leaks here; was allocated at [(17)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/16)
# 3854|           params[0] = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_CIPHER,
# 3855|                                         (char *)EVP_CIPHER_get0_name(cipher), 0);
# 3856|->         params[1] = OSSL_PARAM_construct_end();
# 3857|   
# 3858|           if (!EVP_MAC_init(cmac->mctx, key_attr->pValue, key_attr->ulValueLen,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def461]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3858:14: warning[-Wanalyzer-malloc-leak]: leak of 'cmac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3742:7: enter_function: entry to 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3768:8: branch_true: following 'true' branch (when 'first != 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_false: following 'false' branch (when 'key' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3772:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3774:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3779:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3781:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3786:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: call_function: calling 'openssl_cipher_from_mech' from 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: return_function: returning to 'openssl_cmac_perform' from 'openssl_cipher_from_mech'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3802:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3809:12: branch_false: following 'false' branch (when 'cmac' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3841:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3847:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3848:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3855:47: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3858:14: throw: if 'EVP_MAC_init' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3858:14: danger: 'cmac' leaks here; was allocated at [(17)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/16)
# 3856|           params[1] = OSSL_PARAM_construct_end();
# 3857|   
# 3858|->         if (!EVP_MAC_init(cmac->mctx, key_attr->pValue, key_attr->ulValueLen,
# 3859|                             params)) {
# 3860|               TRACE_ERROR("%s\n", ock_err(ERR_FUNCTION_FAILED));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def462]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3860:13: warning[-Wanalyzer-malloc-leak]: leak of 'cmac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3742:7: enter_function: entry to 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3768:8: branch_true: following 'true' branch (when 'first != 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_false: following 'false' branch (when 'key' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3772:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3774:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3779:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3781:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3786:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: call_function: calling 'openssl_cipher_from_mech' from 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: return_function: returning to 'openssl_cmac_perform' from 'openssl_cipher_from_mech'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3802:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3809:12: branch_false: following 'false' branch (when 'cmac' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3841:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3847:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3848:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3855:47: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3858:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3860:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3860:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3860:13: danger: 'cmac' leaks here; was allocated at [(17)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/16)
# 3858|           if (!EVP_MAC_init(cmac->mctx, key_attr->pValue, key_attr->ulValueLen,
# 3859|                             params)) {
# 3860|->             TRACE_ERROR("%s\n", ock_err(ERR_FUNCTION_FAILED));
# 3861|               rv = CKR_FUNCTION_FAILED;
# 3862|               goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def463]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3929:13: warning[-Wanalyzer-malloc-leak]: leak of 'cmac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3742:7: enter_function: entry to 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3768:8: branch_true: following 'true' branch (when 'first != 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_false: following 'false' branch (when 'key' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3772:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3774:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3779:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3781:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3786:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3788:22: call_function: calling 'openssl_cipher_from_mech' from 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3788:22: return_function: returning to 'openssl_cmac_perform' from 'openssl_cipher_from_mech'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3802:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3809:12: branch_false: following 'false' branch (when 'cmac' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3841:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3847:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3858:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3860:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3921:8: branch_true: following 'true' branch (when 'cmac' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3928:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3928:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3929:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3929:13: throw: if 'EVP_MAC_CTX_free' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3929:13: danger: 'cmac' leaks here; was allocated at [(19)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/18)
# 3927|   #else
# 3928|           if (cmac->mctx != NULL)
# 3929|->             EVP_MAC_CTX_free(cmac->mctx);
# 3930|           if (cmac->mac != NULL)
# 3931|               EVP_MAC_free(cmac->mac);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def464]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3931:13: warning[-Wanalyzer-malloc-leak]: leak of 'cmac'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3742:7: enter_function: entry to 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3768:8: branch_true: following 'true' branch (when 'first != 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3769:12: branch_false: following 'false' branch (when 'key' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3772:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3774:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3779:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3781:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3786:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: call_function: calling 'openssl_cipher_from_mech' from 'openssl_cmac_perform'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3792:22: return_function: returning to 'openssl_cmac_perform' from 'openssl_cipher_from_mech'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3802:12: branch_false: following 'false' branch (when 'cipher' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3808:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3809:12: branch_false: following 'false' branch (when 'cmac' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3841:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3847:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3921:8: branch_true: following 'true' branch (when 'cmac' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3928:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3930:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3931:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3931:13: throw: if 'EVP_MAC_free' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:3931:13: danger: 'cmac' leaks here; was allocated at [(17)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/16)
# 3929|               EVP_MAC_CTX_free(cmac->mctx);
# 3930|           if (cmac->mac != NULL)
# 3931|->             EVP_MAC_free(cmac->mac);
# 3932|   #endif
# 3933|           free(cmac);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def465]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5345:9: warning[-Wanalyzer-malloc-leak]: leak of 'buff'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5137:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5143:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5144:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5145:36: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5144:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5152:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5153:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5154:36: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5153:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5161:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5162:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5163:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5162:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5169:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5183:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5183:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5183:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5191:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5192:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5191:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5205:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5205:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5205:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5212:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5212:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5219:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5220:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5220:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5227:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5228:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5227:13: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5233:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5236:17: branch_true: following 'true' branch (when 'i != 101')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5239:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5239:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5249:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5249:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5256:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5262:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5269:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5308:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5309:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5308:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5310:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5308:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5317:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5324:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5325:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5324:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5326:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5324:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5327:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5324:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5328:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5324:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5329:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5324:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5330:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5324:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5337:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5338:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5339:8: branch_false: following 'false' branch (when 'buff' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5345:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5345:9: throw: if 'BN_bn2bin' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5345:9: danger: 'buff' leaks here; was allocated at [(65)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/64)
# 5343|       }
# 5344|   
# 5345|->     if (BN_bn2bin(p, buff) != prime_len) {
# 5346|           TRACE_DEVEL("BN_bn2bin failed for p\n");
# 5347|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def466]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5458:14: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5566:7: enter_function: entry to 'openssl_specific_rsa_derive_kdk'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:62: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:14: call_function: calling 'calc_rsa_priv_exp' from 'openssl_specific_rsa_derive_kdk'
# 5456|       UNUSED(tokdata);
# 5457|   
# 5458|->     bn_ctx = BN_CTX_secure_new();
# 5459|       if (bn_ctx == NULL) {
# 5460|           TRACE_ERROR("BN_CTX_secure_new failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def467]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5460:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5566:7: enter_function: entry to 'openssl_specific_rsa_derive_kdk'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:62: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:14: call_function: calling 'calc_rsa_priv_exp' from 'openssl_specific_rsa_derive_kdk'
# 5458|       bn_ctx = BN_CTX_secure_new();
# 5459|       if (bn_ctx == NULL) {
# 5460|->         TRACE_ERROR("BN_CTX_secure_new failed\n");
# 5461|           return CKR_FUNCTION_FAILED;
# 5462|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def468]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5465:10: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5566:7: enter_function: entry to 'openssl_specific_rsa_derive_kdk'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:62: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:14: call_function: calling 'calc_rsa_priv_exp' from 'openssl_specific_rsa_derive_kdk'
# 5463|   
# 5464|       /* Get modulus a BIGNUM */
# 5465|->     rc = template_attribute_get_non_empty(key_obj->template, CKA_MODULUS,
# 5466|                                             &modulus);
# 5467|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def469]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5468:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5566:7: enter_function: entry to 'openssl_specific_rsa_derive_kdk'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:62: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:14: call_function: calling 'calc_rsa_priv_exp' from 'openssl_specific_rsa_derive_kdk'
# 5466|                                             &modulus);
# 5467|       if (rc != CKR_OK) {
# 5468|->         TRACE_ERROR("Failed to get CKA_MODULUS\n");
# 5469|           goto done;
# 5470|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def470]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5472:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5566:7: enter_function: entry to 'openssl_specific_rsa_derive_kdk'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:62: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:14: call_function: calling 'calc_rsa_priv_exp' from 'openssl_specific_rsa_derive_kdk'
# 5470|       }
# 5471|   
# 5472|->     n = BN_CTX_get(bn_ctx);
# 5473|       if (n == NULL ||
# 5474|           BN_bin2bn(modulus->pValue, modulus->ulValueLen, n) == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def471]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5474:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5566:7: enter_function: entry to 'openssl_specific_rsa_derive_kdk'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:62: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:14: call_function: calling 'calc_rsa_priv_exp' from 'openssl_specific_rsa_derive_kdk'
# 5472|       n = BN_CTX_get(bn_ctx);
# 5473|       if (n == NULL ||
# 5474|->         BN_bin2bn(modulus->pValue, modulus->ulValueLen, n) == NULL) {
# 5475|           TRACE_ERROR("BN_CTX_get/BN_bin2bn failed for modulus\n");
# 5476|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def472]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5475:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5566:7: enter_function: entry to 'openssl_specific_rsa_derive_kdk'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:62: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:14: call_function: calling 'calc_rsa_priv_exp' from 'openssl_specific_rsa_derive_kdk'
# 5473|       if (n == NULL ||
# 5474|           BN_bin2bn(modulus->pValue, modulus->ulValueLen, n) == NULL) {
# 5475|->         TRACE_ERROR("BN_CTX_get/BN_bin2bn failed for modulus\n");
# 5476|           rc = CKR_FUNCTION_FAILED;
# 5477|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def473]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5479:5: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5566:7: enter_function: entry to 'openssl_specific_rsa_derive_kdk'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:62: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5619:14: call_function: calling 'calc_rsa_priv_exp' from 'openssl_specific_rsa_derive_kdk'
# 5477|           goto done;
# 5478|       }
# 5479|->     BN_set_flags(n, BN_FLG_CONSTTIME);
# 5480|   
# 5481|       /* Get public exponent a BIGNUM */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def474]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: throw: if 'template_attribute_get_non_empty' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/4)
# 5608|       }
# 5609|   
# 5610|->     rc = template_attribute_get_non_empty(key_obj->template,
# 5611|                                             CKA_PRIVATE_EXPONENT, &priv_exp_attr);
# 5612|       if (rc != CKR_OK && rc != CKR_TEMPLATE_INCOMPLETE &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def475]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5614:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5612:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5614:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5614:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/4)
# 5612|       if (rc != CKR_OK && rc != CKR_TEMPLATE_INCOMPLETE &&
# 5613|           rc != CKR_ATTRIBUTE_VALUE_INVALID) {
# 5614|->         TRACE_ERROR("Failed to get CKA_PRIVATE_EXPONENT\n");
# 5615|           goto out;
# 5616|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def476]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5643:10: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5631:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5643:10: throw: if 'EVP_sha256' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5643:10: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/4)
# 5641|        * synthetically generated, which means that the padding check failed
# 5642|        */
# 5643|->     md = EVP_sha256();
# 5644|       if (md == NULL) {
# 5645|           TRACE_ERROR("EVP_sha256 failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def477]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5643:10: warning[-Wanalyzer-malloc-leak]: leak of 'priv_exp'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5628:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5643:10: throw: if 'EVP_sha256' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5643:10: danger: 'priv_exp' leaks here; was allocated at [(5)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/4)
# 5641|        * synthetically generated, which means that the padding check failed
# 5642|        */
# 5643|->     md = EVP_sha256();
# 5644|       if (md == NULL) {
# 5645|           TRACE_ERROR("EVP_sha256 failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def478]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5645:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5631:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5645:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5645:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5645:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/4)
# 5643|       md = EVP_sha256();
# 5644|       if (md == NULL) {
# 5645|->         TRACE_ERROR("EVP_sha256 failed\n");
# 5646|           rc = CKR_FUNCTION_FAILED;
# 5647|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def479]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5645:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_exp'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5628:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5645:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5645:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5645:9: danger: 'priv_exp' leaks here; was allocated at [(5)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/4)
# 5643|       md = EVP_sha256();
# 5644|       if (md == NULL) {
# 5645|->         TRACE_ERROR("EVP_sha256 failed\n");
# 5646|           rc = CKR_FUNCTION_FAILED;
# 5647|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def480]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5631:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:9: throw: if 'EVP_Digest' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/72/codeFlows/0/threadFlows/0/locations/4)
# 5648|       }
# 5649|   
# 5650|->     if (EVP_Digest(priv_exp, modulus->ulValueLen, d_hash, NULL,
# 5651|                      md, NULL) <= 0) {
# 5652|           TRACE_ERROR("EVP_Digest failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def481]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_exp'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5628:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:9: throw: if 'EVP_Digest' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:9: danger: 'priv_exp' leaks here; was allocated at [(5)](sarif:/runs/0/results/73/codeFlows/0/threadFlows/0/locations/4)
# 5648|       }
# 5649|   
# 5650|->     if (EVP_Digest(priv_exp, modulus->ulValueLen, d_hash, NULL,
# 5651|                      md, NULL) <= 0) {
# 5652|           TRACE_ERROR("EVP_Digest failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def482]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5652:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5631:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5652:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5652:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5652:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/74/codeFlows/0/threadFlows/0/locations/4)
# 5650|       if (EVP_Digest(priv_exp, modulus->ulValueLen, d_hash, NULL,
# 5651|                      md, NULL) <= 0) {
# 5652|->         TRACE_ERROR("EVP_Digest failed\n");
# 5653|           rc = CKR_FUNCTION_FAILED;
# 5654|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def483]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5652:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_exp'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5628:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5652:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5652:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5652:9: danger: 'priv_exp' leaks here; was allocated at [(5)](sarif:/runs/0/results/75/codeFlows/0/threadFlows/0/locations/4)
# 5650|       if (EVP_Digest(priv_exp, modulus->ulValueLen, d_hash, NULL,
# 5651|                      md, NULL) <= 0) {
# 5652|->         TRACE_ERROR("EVP_Digest failed\n");
# 5653|           rc = CKR_FUNCTION_FAILED;
# 5654|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def484]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5631:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: throw: if 'EVP_PKEY_new_mac_key' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/76/codeFlows/0/threadFlows/0/locations/4)
# 5655|       }
# 5656|   
# 5657|->     pkey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL, d_hash, sizeof(d_hash));
# 5658|       if (pkey == NULL) {
# 5659|           TRACE_ERROR("EVP_PKEY_new_mac_key() failed.\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def485]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: warning[-Wanalyzer-malloc-leak]: leak of 'priv_exp'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5628:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: throw: if 'EVP_PKEY_new_mac_key' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: danger: 'priv_exp' leaks here; was allocated at [(5)](sarif:/runs/0/results/77/codeFlows/0/threadFlows/0/locations/4)
# 5655|       }
# 5656|   
# 5657|->     pkey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL, d_hash, sizeof(d_hash));
# 5658|       if (pkey == NULL) {
# 5659|           TRACE_ERROR("EVP_PKEY_new_mac_key() failed.\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def486]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5659:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5631:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5659:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5659:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5659:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/78/codeFlows/0/threadFlows/0/locations/4)
# 5657|       pkey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL, d_hash, sizeof(d_hash));
# 5658|       if (pkey == NULL) {
# 5659|->         TRACE_ERROR("EVP_PKEY_new_mac_key() failed.\n");
# 5660|           rc = CKR_FUNCTION_FAILED;
# 5661|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def487]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5659:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_exp'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5628:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5659:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5659:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5659:9: danger: 'priv_exp' leaks here; was allocated at [(5)](sarif:/runs/0/results/79/codeFlows/0/threadFlows/0/locations/4)
# 5657|       pkey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL, d_hash, sizeof(d_hash));
# 5658|       if (pkey == NULL) {
# 5659|->         TRACE_ERROR("EVP_PKEY_new_mac_key() failed.\n");
# 5660|           rc = CKR_FUNCTION_FAILED;
# 5661|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def488]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5666:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5631:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5666:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5666:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5666:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/80/codeFlows/0/threadFlows/0/locations/4)
# 5664|       mdctx = EVP_MD_CTX_create();
# 5665|       if (mdctx == NULL) {
# 5666|->         TRACE_ERROR("EVP_MD_CTX_create() failed.\n");
# 5667|           rc = CKR_FUNCTION_FAILED;
# 5668|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def489]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5666:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_exp'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5628:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5666:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5666:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5666:9: danger: 'priv_exp' leaks here; was allocated at [(5)](sarif:/runs/0/results/81/codeFlows/0/threadFlows/0/locations/4)
# 5664|       mdctx = EVP_MD_CTX_create();
# 5665|       if (mdctx == NULL) {
# 5666|->         TRACE_ERROR("EVP_MD_CTX_create() failed.\n");
# 5667|           rc = CKR_FUNCTION_FAILED;
# 5668|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def490]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5631:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: throw: if 'EVP_DigestSignInit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/82/codeFlows/0/threadFlows/0/locations/4)
# 5669|       }
# 5670|   
# 5671|->     if (EVP_DigestSignInit(mdctx, NULL, md, NULL, pkey) != 1) {
# 5672|           TRACE_ERROR("EVP_DigestSignInit failed\n");
# 5673|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def491]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_exp'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5628:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: throw: if 'EVP_DigestSignInit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: danger: 'priv_exp' leaks here; was allocated at [(5)](sarif:/runs/0/results/83/codeFlows/0/threadFlows/0/locations/4)
# 5669|       }
# 5670|   
# 5671|->     if (EVP_DigestSignInit(mdctx, NULL, md, NULL, pkey) != 1) {
# 5672|           TRACE_ERROR("EVP_DigestSignInit failed\n");
# 5673|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def492]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5672:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5631:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5672:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5672:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5672:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/84/codeFlows/0/threadFlows/0/locations/4)
# 5670|   
# 5671|       if (EVP_DigestSignInit(mdctx, NULL, md, NULL, pkey) != 1) {
# 5672|->         TRACE_ERROR("EVP_DigestSignInit failed\n");
# 5673|           rc = CKR_FUNCTION_FAILED;
# 5674|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def493]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5672:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_exp'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5628:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5672:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5672:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5672:9: danger: 'priv_exp' leaks here; was allocated at [(5)](sarif:/runs/0/results/85/codeFlows/0/threadFlows/0/locations/4)
# 5670|   
# 5671|       if (EVP_DigestSignInit(mdctx, NULL, md, NULL, pkey) != 1) {
# 5672|->         TRACE_ERROR("EVP_DigestSignInit failed\n");
# 5673|           rc = CKR_FUNCTION_FAILED;
# 5674|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def494]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5631:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: throw: if 'EVP_DigestSignUpdate' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/86/codeFlows/0/threadFlows/0/locations/4)
# 5683|           }
# 5684|       }
# 5685|->     if (EVP_DigestSignUpdate(mdctx, in, inlen) != 1) {
# 5686|           TRACE_ERROR("EVP_DigestSignUpdate failed\n");
# 5687|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def495]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_exp'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5628:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: throw: if 'EVP_DigestSignUpdate' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: danger: 'priv_exp' leaks here; was allocated at [(5)](sarif:/runs/0/results/87/codeFlows/0/threadFlows/0/locations/4)
# 5683|           }
# 5684|       }
# 5685|->     if (EVP_DigestSignUpdate(mdctx, in, inlen) != 1) {
# 5686|           TRACE_ERROR("EVP_DigestSignUpdate failed\n");
# 5687|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def496]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5686:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5631:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5686:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5686:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5686:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/88/codeFlows/0/threadFlows/0/locations/4)
# 5684|       }
# 5685|       if (EVP_DigestSignUpdate(mdctx, in, inlen) != 1) {
# 5686|->         TRACE_ERROR("EVP_DigestSignUpdate failed\n");
# 5687|           rc = CKR_FUNCTION_FAILED;
# 5688|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def497]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5686:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_exp'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5628:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5686:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5686:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5686:9: danger: 'priv_exp' leaks here; was allocated at [(5)](sarif:/runs/0/results/89/codeFlows/0/threadFlows/0/locations/4)
# 5684|       }
# 5685|       if (EVP_DigestSignUpdate(mdctx, in, inlen) != 1) {
# 5686|->         TRACE_ERROR("EVP_DigestSignUpdate failed\n");
# 5687|           rc = CKR_FUNCTION_FAILED;
# 5688|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def498]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5692:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5631:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5691:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5692:9: throw: if 'EVP_DigestSignFinal' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5692:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/90/codeFlows/0/threadFlows/0/locations/4)
# 5690|   
# 5691|       md_len = kdklen;
# 5692|->     if (EVP_DigestSignFinal(mdctx, kdk, &md_len) != 1 ||
# 5693|           md_len != kdklen) {
# 5694|           TRACE_ERROR("EVP_DigestSignFinal failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def499]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5692:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_exp'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5628:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5691:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5692:9: throw: if 'EVP_DigestSignFinal' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5692:9: danger: 'priv_exp' leaks here; was allocated at [(5)](sarif:/runs/0/results/91/codeFlows/0/threadFlows/0/locations/4)
# 5690|   
# 5691|       md_len = kdklen;
# 5692|->     if (EVP_DigestSignFinal(mdctx, kdk, &md_len) != 1 ||
# 5693|           md_len != kdklen) {
# 5694|           TRACE_ERROR("EVP_DigestSignFinal failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def500]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5694:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5631:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5691:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5694:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5694:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/92/codeFlows/0/threadFlows/0/locations/4)
# 5692|       if (EVP_DigestSignFinal(mdctx, kdk, &md_len) != 1 ||
# 5693|           md_len != kdklen) {
# 5694|->         TRACE_ERROR("EVP_DigestSignFinal failed\n");
# 5695|           rc = CKR_FUNCTION_FAILED;
# 5696|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def501]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5694:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_exp'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5592:8: branch_false: following 'false' branch (when 'kdklen == 32')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5597:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5599:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5604:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5605:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5610:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5618:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5626:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5628:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:37: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5657:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5658:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5664:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5665:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5671:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5677:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5685:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5691:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5694:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5694:9: danger: 'priv_exp' leaks here; was allocated at [(5)](sarif:/runs/0/results/93/codeFlows/0/threadFlows/0/locations/4)
# 5692|       if (EVP_DigestSignFinal(mdctx, kdk, &md_len) != 1 ||
# 5693|           md_len != kdklen) {
# 5694|->         TRACE_ERROR("EVP_DigestSignFinal failed\n");
# 5695|           rc = CKR_FUNCTION_FAILED;
# 5696|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def502]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5899:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_key'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5908:7: enter_function: entry to 'openssl_specific_pqc_generate_keypair'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5932:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5937:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5937:16: call_function: calling 'openssl_get_pqc_oid_name' from 'openssl_specific_pqc_generate_keypair'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5937:16: return_function: returning to 'openssl_specific_pqc_generate_keypair' from 'openssl_get_pqc_oid_name'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5938:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5947:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5950:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5956:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5956:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5962:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5962:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5969:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5969:10: call_function: calling 'openssl_get_key_from_pkey' from 'openssl_specific_pqc_generate_keypair'
# 5897|       }
# 5898|   
# 5899|->     if (EVP_PKEY_get_octet_string_param(pkey, param,
# 5900|                                           *key, *key_len, key_len) != 1) {
# 5901|           TRACE_ERROR("EVP_PKEY_get_octet_string_param failed for '%s'\n", param);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def503]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5899:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_seed'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5908:7: enter_function: entry to 'openssl_specific_pqc_generate_keypair'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5932:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5937:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5937:16: call_function: calling 'openssl_get_pqc_oid_name' from 'openssl_specific_pqc_generate_keypair'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5937:16: return_function: returning to 'openssl_specific_pqc_generate_keypair' from 'openssl_get_pqc_oid_name'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5938:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5947:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5950:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5956:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5956:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5962:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5962:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5969:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5969:10: call_function: calling 'openssl_get_key_from_pkey' from 'openssl_specific_pqc_generate_keypair'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5969:10: return_function: returning to 'openssl_specific_pqc_generate_keypair' from 'openssl_get_key_from_pkey'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5971:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5976:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5976:10: call_function: calling 'openssl_get_key_from_pkey' from 'openssl_specific_pqc_generate_keypair'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5976:10: return_function: returning to 'openssl_specific_pqc_generate_keypair' from 'openssl_get_key_from_pkey'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5978:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5984:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5986:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5991:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5993:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5998:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6014:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6015:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6015:14: call_function: calling 'openssl_get_key_from_pkey' from 'openssl_specific_pqc_generate_keypair'
# 5897|       }
# 5898|   
# 5899|->     if (EVP_PKEY_get_octet_string_param(pkey, param,
# 5900|                                           *key, *key_len, key_len) != 1) {
# 5901|           TRACE_ERROR("EVP_PKEY_get_octet_string_param failed for '%s'\n", param);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def504]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5899:9: warning[-Wanalyzer-malloc-leak]: leak of 'pub_key'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5908:7: enter_function: entry to 'openssl_specific_pqc_generate_keypair'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5932:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5937:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5937:16: call_function: calling 'openssl_get_pqc_oid_name' from 'openssl_specific_pqc_generate_keypair'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5937:16: return_function: returning to 'openssl_specific_pqc_generate_keypair' from 'openssl_get_pqc_oid_name'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5938:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5947:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5950:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5956:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5956:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5962:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5962:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5969:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5969:10: call_function: calling 'openssl_get_key_from_pkey' from 'openssl_specific_pqc_generate_keypair'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5969:10: return_function: returning to 'openssl_specific_pqc_generate_keypair' from 'openssl_get_key_from_pkey'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5971:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5976:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:5976:10: call_function: calling 'openssl_get_key_from_pkey' from 'openssl_specific_pqc_generate_keypair'
# 5897|       }
# 5898|   
# 5899|->     if (EVP_PKEY_get_octet_string_param(pkey, param,
# 5900|                                           *key, *key_len, key_len) != 1) {
# 5901|           TRACE_ERROR("EVP_PKEY_get_octet_string_param failed for '%s'\n", param);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def505]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6168:14: warning[-Wanalyzer-malloc-leak]: leak of 'priv_key'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6154:8: branch_true: following 'true' branch (when 'private_key != 0')...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6155:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6156:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6161:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6161:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6162:12: branch_false: following 'false' branch (when 'priv_key' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6168:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6168:14: throw: if 'pqc_pack_priv_key' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6168:14: danger: 'priv_key' leaks here; was allocated at [(5)](sarif:/runs/0/results/97/codeFlows/0/threadFlows/0/locations/4)
# 6166|           }
# 6167|   
# 6168|->         rc = pqc_pack_priv_key(tmpl, oid, mech, priv_key, &priv_len);
# 6169|           if (rc != CKR_OK) {
# 6170|               if (rc == CKR_ATTRIBUTE_VALUE_INVALID) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def506]
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6193:10: warning[-Wanalyzer-malloc-leak]: leak of 'pub_key'
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6181:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6186:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6186:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6187:8: branch_false: following 'false' branch (when 'pub_key' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6193:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6193:10: throw: if 'pqc_pack_pub_key' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_openssl.c:6193:10: danger: 'pub_key' leaks here; was allocated at [(3)](sarif:/runs/0/results/98/codeFlows/0/threadFlows/0/locations/2)
# 6191|       }
# 6192|   
# 6193|->     rc = pqc_pack_pub_key(tmpl, oid, mech, pub_key, &pub_len);
# 6194|       if (rc != CKR_OK) {
# 6195|           if (rc == CKR_ATTRIBUTE_VALUE_INVALID) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def507]
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:49:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'ranfd'
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:42:13: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:43:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:45:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:45:8: branch_true: following 'true' branch (when 'ranfd >= 0')...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:45:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:49:17: throw: if 'close' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:49:17: danger: 'ranfd' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   47|               rlen = read(ranfd, output + totallen, bytes - totallen);
#   48|               if (rlen <= 0) {
#   49|->                 close(ranfd);
#   50|                   return CKR_FUNCTION_FAILED;
#   51|               }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def508]
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:49:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ranfd’
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:42:13: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:43:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:45:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:45:8: branch_true: following ‘true’ branch (when ‘ranfd >= 0’)...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:45:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:49:17: throw: if ‘close’ throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:49:17: danger: ‘ranfd’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   47|               rlen = read(ranfd, output + totallen, bytes - totallen);
#   48|               if (rlen <= 0) {
#   49|->                 close(ranfd);
#   50|                   return CKR_FUNCTION_FAILED;
#   51|               }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def509]
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:54:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'ranfd'
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:42:13: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:43:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:45:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:45:8: branch_true: following 'true' branch (when 'ranfd >= 0')...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:45:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:48:16: branch_false: following 'false' branch (when 'rlen > 0')...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:52:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:54:9: throw: if 'close' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:54:9: danger: 'ranfd' leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   52|               totallen += rlen;
#   53|           } while (totallen < bytes);
#   54|->         close(ranfd);
#   55|           return CKR_OK;
#   56|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def510]
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:54:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ranfd’
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:42:13: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:43:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:45:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:45:8: branch_true: following ‘true’ branch (when ‘ranfd >= 0’)...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:45:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:48:16: branch_false: following ‘false’ branch (when ‘rlen > 0’)...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:52:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:54:9: throw: if ‘close’ throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_rng.c:54:9: danger: ‘ranfd’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   52|               totallen += rlen;
#   53|           } while (totallen < bytes);
#   54|->         close(ranfd);
#   55|           return CKR_OK;
#   56|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def511]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:365:10: warning[-Wanalyzer-malloc-leak]: leak of 'synthetic'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:321:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:353:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:353:8: branch_false: following 'false' branch (when 'in_data_len > 10')...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:359:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:359:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:360:8: branch_false: following 'false' branch (when 'synthetic' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:365:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:365:10: throw: if 'openssl_specific_rsa_prf' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:365:10: danger: 'synthetic' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  363|       }
#  364|   
#  365|->     rc = openssl_specific_rsa_prf(synthetic, in_data_len, "message", 7,
#  366|                                     kdk, kdklen, in_data_len * 8);
#  367|       if (rc != CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def512]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2476:10: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2853:7: enter_function: entry to 'emsa_pss_verify'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2874:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2878:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2879:23: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2880:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2882:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2885:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2891:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2894:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2900:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2900:10: call_function: calling 'mgf1' from 'emsa_pss_verify'
# 2474|           return CKR_FUNCTION_FAILED;
# 2475|   
# 2476|->     rc = get_mgf_mech(mgf, &mech);
# 2477|       if (rc != CKR_OK)
# 2478|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def513]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2476:10: warning[-Wanalyzer-malloc-leak]: leak of 'db'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2614:7: enter_function: entry to 'decode_eme_oaep'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2649:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2654:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2655:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2656:8: branch_false: following 'false' branch (when 'db' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2666:32: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2671:9: call_function: calling 'mgf1' from 'decode_eme_oaep'
# 2474|           return CKR_FUNCTION_FAILED;
# 2475|   
# 2476|->     rc = get_mgf_mech(mgf, &mech);
# 2477|       if (rc != CKR_OK)
# 2478|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def514]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2476:10: warning[-Wanalyzer-malloc-leak]: leak of 'dbMask'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2529:7: enter_function: entry to 'encode_eme_oaep'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2539:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2549:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2571:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2577:18: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2578:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2579:8: branch_false: following 'false' branch (when 'dbMask' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2584:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2584:10: call_function: calling 'mgf1' from 'encode_eme_oaep'
# 2474|           return CKR_FUNCTION_FAILED;
# 2475|   
# 2476|->     rc = get_mgf_mech(mgf, &mech);
# 2477|       if (rc != CKR_OK)
# 2478|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def515]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2480:10: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2853:7: enter_function: entry to 'emsa_pss_verify'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2874:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2878:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2879:23: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2880:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2882:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2885:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2891:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2894:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2900:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2900:10: call_function: calling 'mgf1' from 'emsa_pss_verify'
# 2478|           return CKR_FUNCTION_FAILED;
# 2479|   
# 2480|->     rc = get_sha_size(mech, &hlen);
# 2481|       if (rc != CKR_OK)
# 2482|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def516]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2480:10: warning[-Wanalyzer-malloc-leak]: leak of 'db'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2614:7: enter_function: entry to 'decode_eme_oaep'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2649:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2654:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2655:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2656:8: branch_false: following 'false' branch (when 'db' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2666:32: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2671:9: call_function: calling 'mgf1' from 'decode_eme_oaep'
# 2478|           return CKR_FUNCTION_FAILED;
# 2479|   
# 2480|->     rc = get_sha_size(mech, &hlen);
# 2481|       if (rc != CKR_OK)
# 2482|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def517]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2480:10: warning[-Wanalyzer-malloc-leak]: leak of 'dbMask'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2529:7: enter_function: entry to 'encode_eme_oaep'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2539:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2549:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2571:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2577:18: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2578:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2579:8: branch_false: following 'false' branch (when 'dbMask' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2584:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2584:10: call_function: calling 'mgf1' from 'encode_eme_oaep'
# 2478|           return CKR_FUNCTION_FAILED;
# 2479|   
# 2480|->     rc = get_sha_size(mech, &hlen);
# 2481|       if (rc != CKR_OK)
# 2482|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def518]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2499:9: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2614:7: enter_function: entry to 'decode_eme_oaep'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2649:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2654:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2656:8: branch_false: following 'false' branch (when 'db' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2666:32: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2671:9: call_function: calling 'mgf1' from 'decode_eme_oaep'
# 2497|           /* concatenate seed and octet string */
# 2498|           memset(seed_buffer, 0, seedlen + 4);
# 2499|->         memcpy(seed_buffer, seed, seedlen);
# 2500|           memcpy(seed_buffer + seedlen, counter, 4);
# 2501|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def519]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2503:14: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2853:7: enter_function: entry to 'emsa_pss_verify'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2874:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2878:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2879:23: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2880:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2882:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2885:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2891:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2894:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2900:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2900:10: call_function: calling 'mgf1' from 'emsa_pss_verify'
# 2501|   
# 2502|           /* compute hash of concatenated seed and octet string */
# 2503|->         rc = compute_sha(tokdata, (CK_BYTE *)seed_buffer, seedlen + 4, hash,
# 2504|                            mech);
# 2505|           if (rc != CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def520]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2503:14: warning[-Wanalyzer-malloc-leak]: leak of 'db'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2614:7: enter_function: entry to 'decode_eme_oaep'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2649:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2654:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2655:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2656:8: branch_false: following 'false' branch (when 'db' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2666:32: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2671:9: call_function: calling 'mgf1' from 'decode_eme_oaep'
# 2501|   
# 2502|           /* compute hash of concatenated seed and octet string */
# 2503|->         rc = compute_sha(tokdata, (CK_BYTE *)seed_buffer, seedlen + 4, hash,
# 2504|                            mech);
# 2505|           if (rc != CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def521]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2503:14: warning[-Wanalyzer-malloc-leak]: leak of 'dbMask'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2529:7: enter_function: entry to 'encode_eme_oaep'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2539:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2549:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2571:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2577:18: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2578:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2579:8: branch_false: following 'false' branch (when 'dbMask' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2584:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2584:10: call_function: calling 'mgf1' from 'encode_eme_oaep'
# 2501|   
# 2502|           /* compute hash of concatenated seed and octet string */
# 2503|->         rc = compute_sha(tokdata, (CK_BYTE *)seed_buffer, seedlen + 4, hash,
# 2504|                            mech);
# 2505|           if (rc != CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def522]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2503:14: warning[-Wanalyzer-malloc-leak]: leak of 'seed_buffer'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2477:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2480:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2481:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2485:26: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2485:19: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2486:8: branch_false: following 'false' branch (when 'seed_buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2486:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2490:17: branch_true: following 'true' branch (when 'T_len != 0')...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2492:39: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2503:14: throw: if 'compute_sha' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2503:14: danger: 'seed_buffer' leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
# 2501|   
# 2502|           /* compute hash of concatenated seed and octet string */
# 2503|->         rc = compute_sha(tokdata, (CK_BYTE *)seed_buffer, seedlen + 4, hash,
# 2504|                            mech);
# 2505|           if (rc != CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def523]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2740:5: warning[-Wanalyzer-malloc-leak]: leak of 'db'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2614:7: enter_function: entry to 'decode_eme_oaep'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2649:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2654:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2655:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2656:8: branch_false: following 'false' branch (when 'db' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2666:32: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2671:9: call_function: calling 'mgf1' from 'decode_eme_oaep'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2671:9: return_function: returning to 'decode_eme_oaep' from 'mgf1'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2671:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2672:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2740:5: throw: if 'OPENSSL_cleanse' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2740:5: danger: 'db' leaks here; was allocated at [(4)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/3)
# 2738|   
# 2739|   done:
# 2740|->     OPENSSL_cleanse(seed, sizeof(seed));
# 2741|       if (db) {
# 2742|           OPENSSL_cleanse(db, dblen);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def524]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2742:9: warning[-Wanalyzer-malloc-leak]: leak of 'db'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2614:7: enter_function: entry to 'decode_eme_oaep'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2649:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2654:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2655:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2656:8: branch_false: following 'false' branch (when 'db' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2666:32: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2671:9: call_function: calling 'mgf1' from 'decode_eme_oaep'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2671:9: return_function: returning to 'decode_eme_oaep' from 'mgf1'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2671:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2672:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2742:9: throw: if 'OPENSSL_cleanse' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2742:9: danger: 'db' leaks here; was allocated at [(4)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/3)
# 2740|       OPENSSL_cleanse(seed, sizeof(seed));
# 2741|       if (db) {
# 2742|->         OPENSSL_cleanse(db, dblen);
# 2743|           free(db);
# 2744|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def525]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2807:14: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2784:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2787:23: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2788:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2791:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2799:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2805:18: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2806:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2807:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2807:14: throw: if 'rng_generate' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2807:14: danger: 'buf' leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
# 2805|       salt = buf + (8 + in_data_len);
# 2806|       if (pssParms->sLen > 0) {
# 2807|->         rc = rng_generate(tokdata, salt, pssParms->sLen);
# 2808|           if (rc != CKR_OK)
# 2809|               goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def526]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2817:10: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2780:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2784:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2787:23: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2788:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2791:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2799:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2805:18: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2806:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2813:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2813:8: branch_false: following 'false' branch (when 'in_data_len == 0')...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2818:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2817:10: throw: if 'compute_sha' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2817:10: danger: 'buf' leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
# 2815|   
# 2816|       /* pkcs1v2.2, Step 6: Compute Hash(M') */
# 2817|->     rc = compute_sha(tokdata, buf, 8 + hlen + pssParms->sLen, H,
# 2818|                        pssParms->hashAlg);
# 2819|       if (rc != CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def527]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:750:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: danger: 'class_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  756|       if (!value_attr || !value_len_attr || !key_type_attr ||
#  757|           !class_attr || !local_attr || !derive_attr) {
#  758|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  759|           rc = CKR_HOST_MEMORY;
#  760|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def528]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: warning[-Wanalyzer-malloc-leak]: leak of 'derive_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:754:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: danger: 'derive_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  756|       if (!value_attr || !value_len_attr || !key_type_attr ||
#  757|           !class_attr || !local_attr || !derive_attr) {
#  758|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  759|           rc = CKR_HOST_MEMORY;
#  760|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def529]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:748:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: danger: 'key_type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  756|       if (!value_attr || !value_len_attr || !key_type_attr ||
#  757|           !class_attr || !local_attr || !derive_attr) {
#  758|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  759|           rc = CKR_HOST_MEMORY;
#  760|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def530]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:752:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: danger: 'local_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  756|       if (!value_attr || !value_len_attr || !key_type_attr ||
#  757|           !class_attr || !local_attr || !derive_attr) {
#  758|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  759|           rc = CKR_HOST_MEMORY;
#  760|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def531]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: danger: 'value_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  756|       if (!value_attr || !value_len_attr || !key_type_attr ||
#  757|           !class_attr || !local_attr || !derive_attr) {
#  758|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  759|           rc = CKR_HOST_MEMORY;
#  760|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def532]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: warning[-Wanalyzer-malloc-leak]: leak of 'value_len_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:746:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:758:9: danger: 'value_len_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  756|       if (!value_attr || !value_len_attr || !key_type_attr ||
#  757|           !class_attr || !local_attr || !derive_attr) {
#  758|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  759|           rc = CKR_HOST_MEMORY;
#  760|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def533]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:750:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:43: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:757:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: danger: 'class_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
#  795|       *(CK_BBOOL *) derive_attr->pValue = TRUE;
#  796|   
#  797|->     rc = template_update_attribute(tmpl, value_attr);
#  798|       if (rc != CKR_OK) {
#  799|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def534]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: warning[-Wanalyzer-malloc-leak]: leak of 'derive_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:754:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: danger: 'derive_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
#  795|       *(CK_BBOOL *) derive_attr->pValue = TRUE;
#  796|   
#  797|->     rc = template_update_attribute(tmpl, value_attr);
#  798|       if (rc != CKR_OK) {
#  799|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def535]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:748:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:43: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:757:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: danger: 'key_type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
#  795|       *(CK_BBOOL *) derive_attr->pValue = TRUE;
#  796|   
#  797|->     rc = template_update_attribute(tmpl, value_attr);
#  798|       if (rc != CKR_OK) {
#  799|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def536]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:752:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: danger: 'local_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
#  795|       *(CK_BBOOL *) derive_attr->pValue = TRUE;
#  796|   
#  797|->     rc = template_update_attribute(tmpl, value_attr);
#  798|       if (rc != CKR_OK) {
#  799|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def537]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: danger: 'value_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
#  795|       *(CK_BBOOL *) derive_attr->pValue = TRUE;
#  796|   
#  797|->     rc = template_update_attribute(tmpl, value_attr);
#  798|       if (rc != CKR_OK) {
#  799|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def538]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: warning[-Wanalyzer-malloc-leak]: leak of 'value_len_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:746:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:797:10: danger: 'value_len_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  795|       *(CK_BBOOL *) derive_attr->pValue = TRUE;
#  796|   
#  797|->     rc = template_update_attribute(tmpl, value_attr);
#  798|       if (rc != CKR_OK) {
#  799|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def539]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:750:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:43: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:757:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: danger: 'class_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/2)
#  797|       rc = template_update_attribute(tmpl, value_attr);
#  798|       if (rc != CKR_OK) {
#  799|->         TRACE_ERROR("template_update_attribute failed\n");
#  800|           goto error;
#  801|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def540]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: warning[-Wanalyzer-malloc-leak]: leak of 'derive_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:754:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: danger: 'derive_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
#  797|       rc = template_update_attribute(tmpl, value_attr);
#  798|       if (rc != CKR_OK) {
#  799|->         TRACE_ERROR("template_update_attribute failed\n");
#  800|           goto error;
#  801|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def541]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:748:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:43: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:757:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: danger: 'key_type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/2)
#  797|       rc = template_update_attribute(tmpl, value_attr);
#  798|       if (rc != CKR_OK) {
#  799|->         TRACE_ERROR("template_update_attribute failed\n");
#  800|           goto error;
#  801|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def542]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:752:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: danger: 'local_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/2)
#  797|       rc = template_update_attribute(tmpl, value_attr);
#  798|       if (rc != CKR_OK) {
#  799|->         TRACE_ERROR("template_update_attribute failed\n");
#  800|           goto error;
#  801|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def543]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: warning[-Wanalyzer-malloc-leak]: leak of 'value_len_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:746:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:799:9: danger: 'value_len_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/2)
#  797|       rc = template_update_attribute(tmpl, value_attr);
#  798|       if (rc != CKR_OK) {
#  799|->         TRACE_ERROR("template_update_attribute failed\n");
#  800|           goto error;
#  801|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def544]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:750:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:43: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:757:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: danger: 'class_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/2)
#  801|       }
#  802|       value_attr = NULL;
#  803|->     rc = template_update_attribute(tmpl, value_len_attr);
#  804|       if (rc != CKR_OK) {
#  805|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def545]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: warning[-Wanalyzer-malloc-leak]: leak of 'derive_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:754:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: danger: 'derive_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/2)
#  801|       }
#  802|       value_attr = NULL;
#  803|->     rc = template_update_attribute(tmpl, value_len_attr);
#  804|       if (rc != CKR_OK) {
#  805|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def546]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:748:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:43: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:757:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: danger: 'key_type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/2)
#  801|       }
#  802|       value_attr = NULL;
#  803|->     rc = template_update_attribute(tmpl, value_len_attr);
#  804|       if (rc != CKR_OK) {
#  805|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def547]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:752:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: danger: 'local_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/2)
#  801|       }
#  802|       value_attr = NULL;
#  803|->     rc = template_update_attribute(tmpl, value_len_attr);
#  804|       if (rc != CKR_OK) {
#  805|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def548]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: warning[-Wanalyzer-malloc-leak]: leak of 'value_len_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:746:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: danger: 'value_len_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/2)
#  801|       }
#  802|       value_attr = NULL;
#  803|->     rc = template_update_attribute(tmpl, value_len_attr);
#  804|       if (rc != CKR_OK) {
#  805|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def549]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:750:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:43: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:757:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: danger: 'class_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/2)
#  803|       rc = template_update_attribute(tmpl, value_len_attr);
#  804|       if (rc != CKR_OK) {
#  805|->         TRACE_ERROR("template_update_attribute failed\n");
#  806|           goto error;
#  807|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def550]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: warning[-Wanalyzer-malloc-leak]: leak of 'derive_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:754:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: danger: 'derive_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/2)
#  803|       rc = template_update_attribute(tmpl, value_len_attr);
#  804|       if (rc != CKR_OK) {
#  805|->         TRACE_ERROR("template_update_attribute failed\n");
#  806|           goto error;
#  807|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def551]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:748:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:43: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:757:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: danger: 'key_type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/2)
#  803|       rc = template_update_attribute(tmpl, value_len_attr);
#  804|       if (rc != CKR_OK) {
#  805|->         TRACE_ERROR("template_update_attribute failed\n");
#  806|           goto error;
#  807|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def552]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:752:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:805:9: danger: 'local_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/2)
#  803|       rc = template_update_attribute(tmpl, value_len_attr);
#  804|       if (rc != CKR_OK) {
#  805|->         TRACE_ERROR("template_update_attribute failed\n");
#  806|           goto error;
#  807|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def553]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:750:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:43: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:757:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: danger: 'class_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/2)
#  807|       }
#  808|       value_len_attr = NULL;
#  809|->     rc = template_update_attribute(tmpl, key_type_attr);
#  810|       if (rc != CKR_OK) {
#  811|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def554]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: warning[-Wanalyzer-malloc-leak]: leak of 'derive_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:754:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: danger: 'derive_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/2)
#  807|       }
#  808|       value_len_attr = NULL;
#  809|->     rc = template_update_attribute(tmpl, key_type_attr);
#  810|       if (rc != CKR_OK) {
#  811|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def555]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: warning[-Wanalyzer-malloc-leak]: leak of 'key_type_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:748:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:43: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:757:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: danger: 'key_type_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/2)
#  807|       }
#  808|       value_len_attr = NULL;
#  809|->     rc = template_update_attribute(tmpl, key_type_attr);
#  810|       if (rc != CKR_OK) {
#  811|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def556]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:752:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: danger: 'local_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/2)
#  807|       }
#  808|       value_len_attr = NULL;
#  809|->     rc = template_update_attribute(tmpl, key_type_attr);
#  810|       if (rc != CKR_OK) {
#  811|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def557]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:811:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:750:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:43: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:757:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:810:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:811:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:811:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:811:9: danger: 'class_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/2)
#  809|       rc = template_update_attribute(tmpl, key_type_attr);
#  810|       if (rc != CKR_OK) {
#  811|->         TRACE_ERROR("template_update_attribute failed\n");
#  812|           goto error;
#  813|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def558]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:811:9: warning[-Wanalyzer-malloc-leak]: leak of 'derive_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:754:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:810:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:811:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:811:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:811:9: danger: 'derive_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/2)
#  809|       rc = template_update_attribute(tmpl, key_type_attr);
#  810|       if (rc != CKR_OK) {
#  811|->         TRACE_ERROR("template_update_attribute failed\n");
#  812|           goto error;
#  813|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def559]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:811:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:752:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:810:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:811:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:811:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:811:9: danger: 'local_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/2)
#  809|       rc = template_update_attribute(tmpl, key_type_attr);
#  810|       if (rc != CKR_OK) {
#  811|->         TRACE_ERROR("template_update_attribute failed\n");
#  812|           goto error;
#  813|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def560]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:750:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:43: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:757:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:810:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: danger: 'class_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/2)
#  813|       }
#  814|       key_type_attr = NULL;
#  815|->     rc = template_update_attribute(tmpl, class_attr);
#  816|       if (rc != CKR_OK) {
#  817|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def561]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: warning[-Wanalyzer-malloc-leak]: leak of 'derive_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:754:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:810:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: danger: 'derive_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/2)
#  813|       }
#  814|       key_type_attr = NULL;
#  815|->     rc = template_update_attribute(tmpl, class_attr);
#  816|       if (rc != CKR_OK) {
#  817|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def562]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:752:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:810:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: danger: 'local_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/2)
#  813|       }
#  814|       key_type_attr = NULL;
#  815|->     rc = template_update_attribute(tmpl, class_attr);
#  816|       if (rc != CKR_OK) {
#  817|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def563]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:817:9: warning[-Wanalyzer-malloc-leak]: leak of 'derive_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:754:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:810:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:816:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:817:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:817:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:817:9: danger: 'derive_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/2)
#  815|       rc = template_update_attribute(tmpl, class_attr);
#  816|       if (rc != CKR_OK) {
#  817|->         TRACE_ERROR("template_update_attribute failed\n");
#  818|           goto error;
#  819|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def564]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:817:9: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:752:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:810:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:816:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:817:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:817:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:817:9: danger: 'local_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/2)
#  815|       rc = template_update_attribute(tmpl, class_attr);
#  816|       if (rc != CKR_OK) {
#  817|->         TRACE_ERROR("template_update_attribute failed\n");
#  818|           goto error;
#  819|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def565]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:821:10: warning[-Wanalyzer-malloc-leak]: leak of 'derive_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:754:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:810:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:816:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:821:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:821:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:821:10: danger: 'derive_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/2)
#  819|       }
#  820|       class_attr = NULL;
#  821|->     rc = template_update_attribute(tmpl, local_attr);
#  822|       if (rc != CKR_OK) {
#  823|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def566]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:821:10: warning[-Wanalyzer-malloc-leak]: leak of 'local_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:752:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:810:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:816:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:821:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:821:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:821:10: danger: 'local_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/2)
#  819|       }
#  820|       class_attr = NULL;
#  821|->     rc = template_update_attribute(tmpl, local_attr);
#  822|       if (rc != CKR_OK) {
#  823|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def567]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:823:9: warning[-Wanalyzer-malloc-leak]: leak of 'derive_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:754:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:810:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:816:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:821:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:822:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:823:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:823:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:823:9: danger: 'derive_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/2)
#  821|       rc = template_update_attribute(tmpl, local_attr);
#  822|       if (rc != CKR_OK) {
#  823|->         TRACE_ERROR("template_update_attribute failed\n");
#  824|           goto error;
#  825|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def568]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:827:10: warning[-Wanalyzer-malloc-leak]: leak of 'derive_attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:744:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:754:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:756:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:763:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:798:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:803:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:804:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:809:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:810:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:815:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:816:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:821:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:822:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:827:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:827:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:827:10: danger: 'derive_attr' leaks here; was allocated at [(3)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/2)
#  825|       }
#  826|       local_attr = NULL;
#  827|->     rc = template_update_attribute(tmpl, derive_attr);
#  828|       if (rc != CKR_OK) {
#  829|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def569]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1596:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/4)
# 1597|           if (!attr->pValue) {
# 1598|               rc = CKR_HOST_MEMORY;
# 1599|->             TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1600|               goto error;
# 1601|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def570]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: warning[-Wanalyzer-malloc-leak]: leak of 'attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1581:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: danger: 'attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/0)
# 1597|           if (!attr->pValue) {
# 1598|               rc = CKR_HOST_MEMORY;
# 1599|->             TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1600|               goto error;
# 1601|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def571]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: warning[-Wanalyzer-malloc-leak]: leak of 'new_attrs'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1581:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: danger: 'new_attrs' leaks here; was allocated at [(1)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/0)
# 1597|           if (!attr->pValue) {
# 1598|               rc = CKR_HOST_MEMORY;
# 1599|->             TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1600|               goto error;
# 1601|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def572]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1611:13: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1596:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1611:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1611:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1611:13: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/62/codeFlows/0/threadFlows/0/locations/4)
# 1609|           if (!attr->pValue) {
# 1610|               rc = CKR_HOST_MEMORY;
# 1611|->             TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1612|               goto error;
# 1613|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def573]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1611:13: warning[-Wanalyzer-malloc-leak]: leak of 'new_attrs'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1581:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1611:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1611:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1611:13: danger: 'new_attrs' leaks here; was allocated at [(1)](sarif:/runs/0/results/63/codeFlows/0/threadFlows/0/locations/0)
# 1609|           if (!attr->pValue) {
# 1610|               rc = CKR_HOST_MEMORY;
# 1611|->             TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1612|               goto error;
# 1613|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def574]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1626:21: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1596:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_false: following 'false' branch (when 'i == 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1617:26: branch_true: following 'true' branch (when 'i < ulCount')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1621:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1623:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1624:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1624:20: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1626:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1626:21: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1626:21: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/4)
# 1624|                   if (pTemplate[i].pValue == NULL) {
# 1625|                       rc = CKR_ATTRIBUTE_VALUE_INVALID;
# 1626|->                     TRACE_ERROR("%s\n", ock_err(ERR_ATTRIBUTE_VALUE_INVALID));
# 1627|                       goto error;
# 1628|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def575]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1626:21: warning[-Wanalyzer-malloc-leak]: leak of 'new_attrs'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1581:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_false: following 'false' branch (when 'i == 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1617:26: branch_true: following 'true' branch (when 'i < ulCount')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1621:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1623:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1624:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1624:20: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1626:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1626:21: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1626:21: danger: 'new_attrs' leaks here; was allocated at [(1)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/0)
# 1624|                   if (pTemplate[i].pValue == NULL) {
# 1625|                       rc = CKR_ATTRIBUTE_VALUE_INVALID;
# 1626|->                     TRACE_ERROR("%s\n", ock_err(ERR_ATTRIBUTE_VALUE_INVALID));
# 1627|                       goto error;
# 1628|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def576]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1632:21: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1596:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_false: following 'false' branch (when 'i == 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1617:26: branch_true: following 'true' branch (when 'i < ulCount')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1621:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1623:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1624:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1624:20: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1629:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1630:20: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1632:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1632:21: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1632:21: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/4)
# 1630|                   if (!attr->pValue) {
# 1631|                       rc = CKR_HOST_MEMORY;
# 1632|->                     TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1633|                       goto error;
# 1634|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def577]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1632:21: warning[-Wanalyzer-malloc-leak]: leak of 'new_attrs'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1581:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_false: following 'false' branch (when 'i == 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1617:26: branch_true: following 'true' branch (when 'i < ulCount')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1618:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1621:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1623:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1624:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1624:20: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1629:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1630:20: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1632:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1632:21: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1632:21: danger: 'new_attrs' leaks here; was allocated at [(1)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/0)
# 1630|                   if (!attr->pValue) {
# 1631|                       rc = CKR_HOST_MEMORY;
# 1632|->                     TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1633|                       goto error;
# 1634|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def578]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1648:10: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1596:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_false: following 'false' branch (when 'i == 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1617:26: branch_false: following 'false' branch (when 'i >= ulCount')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1644:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1648:10: throw: if 'object_mgr_create_skel' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1648:10: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/74/codeFlows/0/threadFlows/0/locations/4)
# 1646|       // create the key skeletons
# 1647|       //
# 1648|->     rc = object_mgr_create_skel(tokdata, sess,
# 1649|                                   new_attrs, ulCount,
# 1650|                                   MODE_DERIVE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def579]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1648:10: warning[-Wanalyzer-malloc-leak]: leak of 'new_attrs'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1581:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1606:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1609:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1614:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_false: following 'false' branch (when 'i == 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1605:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1617:26: branch_false: following 'false' branch (when 'i >= ulCount')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1644:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1648:10: throw: if 'object_mgr_create_skel' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1648:10: danger: 'new_attrs' leaks here; was allocated at [(1)](sarif:/runs/0/results/75/codeFlows/0/threadFlows/0/locations/0)
# 1646|       // create the key skeletons
# 1647|       //
# 1648|->     rc = object_mgr_create_skel(tokdata, sess,
# 1649|                                   new_attrs, ulCount,
# 1650|                                   MODE_DERIVE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def580]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1761:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1596:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1743:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1743:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1746:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1746:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1748:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1748:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1750:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1750:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1752:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1752:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1755:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1755:8: branch_true: following 'true' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1755:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1756:21: branch_false: following 'false' branch (when 'ulCount <= i')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1761:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1761:9: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/76/codeFlows/0/threadFlows/0/locations/4)
# 1759|           }
# 1760|   
# 1761|->         free(new_attrs);
# 1762|       }
# 1763|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def581]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1814:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/79/codeFlows/0/threadFlows/0/locations/4)
# 1814|           attr->pValue = (CK_BBOOL *) malloc(sizeof(CK_BBOOL));
# 1815|           if (!attr->pValue) {
# 1816|->             TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1817|               goto error;
# 1818|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def582]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: warning[-Wanalyzer-malloc-leak]: leak of 'attr'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1799:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: danger: 'attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/77/codeFlows/0/threadFlows/0/locations/0)
# 1814|           attr->pValue = (CK_BBOOL *) malloc(sizeof(CK_BBOOL));
# 1815|           if (!attr->pValue) {
# 1816|->             TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1817|               goto error;
# 1818|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def583]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: warning[-Wanalyzer-malloc-leak]: leak of 'new_attrs'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1799:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: danger: 'new_attrs' leaks here; was allocated at [(1)](sarif:/runs/0/results/80/codeFlows/0/threadFlows/0/locations/0)
# 1814|           attr->pValue = (CK_BBOOL *) malloc(sizeof(CK_BBOOL));
# 1815|           if (!attr->pValue) {
# 1816|->             TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1817|               goto error;
# 1818|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def584]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1827:13: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1814:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1827:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1827:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1827:13: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/83/codeFlows/0/threadFlows/0/locations/4)
# 1825|           attr->pValue = (CK_BBOOL *) malloc(sizeof(CK_BBOOL));
# 1826|           if (!attr->pValue) {
# 1827|->             TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1828|               goto error;
# 1829|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def585]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1827:13: warning[-Wanalyzer-malloc-leak]: leak of 'new_attrs'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1799:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1827:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1827:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1827:13: danger: 'new_attrs' leaks here; was allocated at [(1)](sarif:/runs/0/results/84/codeFlows/0/threadFlows/0/locations/0)
# 1825|           attr->pValue = (CK_BBOOL *) malloc(sizeof(CK_BBOOL));
# 1826|           if (!attr->pValue) {
# 1827|->             TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1828|               goto error;
# 1829|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def586]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1842:21: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1814:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_false: following 'false' branch (when 'i == 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1833:26: branch_true: following 'true' branch (when 'i < ulCount')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1837:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1839:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1840:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1840:20: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1842:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1842:21: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1842:21: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/87/codeFlows/0/threadFlows/0/locations/4)
# 1840|                   if (pTemplate[i].pValue == NULL) {
# 1841|                       rc = CKR_ATTRIBUTE_VALUE_INVALID;
# 1842|->                     TRACE_ERROR("%s\n", ock_err(ERR_ATTRIBUTE_VALUE_INVALID));
# 1843|                       goto error;
# 1844|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def587]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1842:21: warning[-Wanalyzer-malloc-leak]: leak of 'new_attrs'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1799:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_false: following 'false' branch (when 'i == 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1833:26: branch_true: following 'true' branch (when 'i < ulCount')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1837:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1839:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1840:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1840:20: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1842:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1842:21: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1842:21: danger: 'new_attrs' leaks here; was allocated at [(1)](sarif:/runs/0/results/88/codeFlows/0/threadFlows/0/locations/0)
# 1840|                   if (pTemplate[i].pValue == NULL) {
# 1841|                       rc = CKR_ATTRIBUTE_VALUE_INVALID;
# 1842|->                     TRACE_ERROR("%s\n", ock_err(ERR_ATTRIBUTE_VALUE_INVALID));
# 1843|                       goto error;
# 1844|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def588]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1847:21: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1814:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_false: following 'false' branch (when 'i == 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1833:26: branch_true: following 'true' branch (when 'i < ulCount')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1837:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1839:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1840:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1840:20: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1845:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1846:20: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1847:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1847:21: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1847:21: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/91/codeFlows/0/threadFlows/0/locations/4)
# 1845|                   attr->pValue = (char *) malloc(attr->ulValueLen);
# 1846|                   if (!attr->pValue) {
# 1847|->                     TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1848|                       goto error;
# 1849|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def589]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1847:21: warning[-Wanalyzer-malloc-leak]: leak of 'new_attrs'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1799:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_false: following 'false' branch (when 'i == 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1833:26: branch_true: following 'true' branch (when 'i < ulCount')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1834:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1837:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1839:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1840:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1840:20: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1845:41: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1846:20: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1847:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1847:21: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1847:21: danger: 'new_attrs' leaks here; was allocated at [(1)](sarif:/runs/0/results/92/codeFlows/0/threadFlows/0/locations/0)
# 1845|                   attr->pValue = (char *) malloc(attr->ulValueLen);
# 1846|                   if (!attr->pValue) {
# 1847|->                     TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1848|                       goto error;
# 1849|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def590]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1861:10: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1814:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_false: following 'false' branch (when 'i == 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1833:26: branch_false: following 'false' branch (when 'i >= ulCount')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1859:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1861:10: throw: if 'object_mgr_create_skel' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1861:10: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/95/codeFlows/0/threadFlows/0/locations/4)
# 1859|       ulCount = 7 + cnt;
# 1860|   
# 1861|->     rc = object_mgr_create_skel(tokdata, sess,
# 1862|                                   new_attrs, ulCount,
# 1863|                                   MODE_DERIVE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def591]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1861:10: warning[-Wanalyzer-malloc-leak]: leak of 'new_attrs'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1799:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: following 'false' branch (when 'i == 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_true: following 'true' branch (when 'i != 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1823:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1826:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1830:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_false: following 'false' branch (when 'i == 4')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1822:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1833:26: branch_false: following 'false' branch (when 'i >= ulCount')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1859:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1861:10: throw: if 'object_mgr_create_skel' throws an exception...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1861:10: danger: 'new_attrs' leaks here; was allocated at [(1)](sarif:/runs/0/results/96/codeFlows/0/threadFlows/0/locations/0)
# 1859|       ulCount = 7 + cnt;
# 1860|   
# 1861|->     rc = object_mgr_create_skel(tokdata, sess,
# 1862|                                   new_attrs, ulCount,
# 1863|                                   MODE_DERIVE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def592]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2026:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1814:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2002:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2005:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2005:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2011:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2011:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2013:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2013:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2015:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2015:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2017:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2017:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2020:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2020:8: branch_true: following 'true' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2020:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2021:21: branch_false: following 'false' branch (when 'ulCount <= i')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2026:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2026:9: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/97/codeFlows/0/threadFlows/0/locations/4)
# 2024|           }
# 2025|   
# 2026|->         free(new_attrs);
# 2027|       }
# 2028|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def593]
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:277:28: warning[-Wanalyzer-malloc-leak]: leak of 'map_node'
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:256:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:265:31: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:266:8: branch_false: following 'false' branch (when 'map_node' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:270:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:277:28: throw: if 'object_is_private' throws an exception...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:277:28: danger: 'map_node' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  275|           map_node->is_session_obj = FALSE;
#  276|   
#  277|->     map_node->is_private = object_is_private(obj);
#  278|   
#  279|       // map_node->obj_handle will store the index of the btree node in one of

Error: GCC_ANALYZER_WARNING (CWE-401): [#def594]
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:289:19: warning[-Wanalyzer-malloc-leak]: leak of 'map_node'
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:256:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:265:31: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:266:8: branch_false: following 'false' branch (when 'map_node' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:270:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:289:19: throw: if 'bt_node_add' throws an exception...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:289:19: danger: 'map_node' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  287|       //
#  288|       map_node->obj_handle = obj_handle;
#  289|->     *map_handle = bt_node_add(&tokdata->object_map_btree, map_node);
#  290|   
#  291|       if (*map_handle == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def595]
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2225:18: warning[-Wanalyzer-malloc-leak]: leak of 'new_obj'
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2208:21: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2211:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2219:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2220:34: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2220:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2221:16: branch_false: following 'false' branch (when 'new_obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2223:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2225:18: throw: if 'object_init_lock' throws an exception...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2225:18: danger: 'new_obj' leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 2223|               memset(new_obj, 0x0, sizeof(OBJECT));
# 2224|   
# 2225|->             rc = object_init_lock(new_obj);
# 2226|               if (rc != CKR_OK) {
# 2227|                   free(new_obj);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def596]
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2289:18: warning[-Wanalyzer-malloc-leak]: leak of 'new_obj'
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2273:21: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2276:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2283:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2284:34: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2284:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2285:16: branch_false: following 'false' branch (when 'new_obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2287:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2289:18: throw: if 'object_init_lock' throws an exception...
opencryptoki-3.26.0/usr/lib/common/obj_mgr.c:2289:18: danger: 'new_obj' leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 2287|               memset(new_obj, 0x0, sizeof(OBJECT));
# 2288|   
# 2289|->             rc = object_init_lock(new_obj);
# 2290|               if (rc != CKR_OK) {
# 2291|                   free(new_obj);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def597]
opencryptoki-3.26.0/usr/lib/common/object.c:164:9: warning[-Wanalyzer-malloc-leak]: leak of 'new_tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:154:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:160:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:162:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:164:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:164:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:164:9: danger: 'new_tmpl' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  162|       if (!o || !tmpl || !new_tmpl) {
#  163|           rc = CKR_HOST_MEMORY;
#  164|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  165|           if (o)
#  166|               free(o);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def598]
opencryptoki-3.26.0/usr/lib/common/object.c:164:9: warning[-Wanalyzer-malloc-leak]: leak of 'o'
opencryptoki-3.26.0/usr/lib/common/object.c:154:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:158:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:162:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:164:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:164:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:164:9: danger: 'o' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  162|       if (!o || !tmpl || !new_tmpl) {
#  163|           rc = CKR_HOST_MEMORY;
#  164|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  165|           if (o)
#  166|               free(o);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def599]
opencryptoki-3.26.0/usr/lib/common/object.c:164:9: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:154:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:159:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:162:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:164:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:164:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:164:9: danger: 'tmpl' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  162|       if (!o || !tmpl || !new_tmpl) {
#  163|           rc = CKR_HOST_MEMORY;
#  164|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  165|           if (o)
#  166|               free(o);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def600]
opencryptoki-3.26.0/usr/lib/common/object.c:190:10: warning[-Wanalyzer-malloc-leak]: leak of 'new_tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:143:7: enter_function: entry to 'object_copy'
opencryptoki-3.26.0/usr/lib/common/object.c:154:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:160:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:162:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:162:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:162:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:175:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:180:10: call_function: calling 'object_init_lock' from 'object_copy'
opencryptoki-3.26.0/usr/lib/common/object.c:180:10: return_function: returning to 'object_copy' from 'object_init_lock'
opencryptoki-3.26.0/usr/lib/common/object.c:181:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:184:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:184:10: call_function: calling 'object_init_ex_data_lock' from 'object_copy'
opencryptoki-3.26.0/usr/lib/common/object.c:184:10: return_function: returning to 'object_copy' from 'object_init_ex_data_lock'
opencryptoki-3.26.0/usr/lib/common/object.c:185:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:190:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:190:10: throw: if 'template_copy' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:190:10: danger: 'new_tmpl' leaks here; was allocated at [(4)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/3)
#  188|       // copy the original object's attribute template
#  189|       //
#  190|->     rc = template_copy(o->template, old_obj->template);
#  191|       if (rc != CKR_OK) {
#  192|           TRACE_DEVEL("Failed to copy template.\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def601]
opencryptoki-3.26.0/usr/lib/common/object.c:192:9: warning[-Wanalyzer-malloc-leak]: leak of 'new_tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:143:7: enter_function: entry to 'object_copy'
opencryptoki-3.26.0/usr/lib/common/object.c:154:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:160:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:162:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:162:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:162:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:175:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:180:10: call_function: calling 'object_init_lock' from 'object_copy'
opencryptoki-3.26.0/usr/lib/common/object.c:180:10: return_function: returning to 'object_copy' from 'object_init_lock'
opencryptoki-3.26.0/usr/lib/common/object.c:181:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:184:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:184:10: call_function: calling 'object_init_ex_data_lock' from 'object_copy'
opencryptoki-3.26.0/usr/lib/common/object.c:184:10: return_function: returning to 'object_copy' from 'object_init_ex_data_lock'
opencryptoki-3.26.0/usr/lib/common/object.c:185:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:190:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:191:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:192:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:192:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:192:9: danger: 'new_tmpl' leaks here; was allocated at [(4)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/3)
#  190|       rc = template_copy(o->template, old_obj->template);
#  191|       if (rc != CKR_OK) {
#  192|->         TRACE_DEVEL("Failed to copy template.\n");
#  193|           goto error;
#  194|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def602]
opencryptoki-3.26.0/usr/lib/common/object.c:196:10: warning[-Wanalyzer-malloc-leak]: leak of 'new_tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:143:7: enter_function: entry to 'object_copy'
opencryptoki-3.26.0/usr/lib/common/object.c:154:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:160:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:162:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:162:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:162:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:175:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:180:10: call_function: calling 'object_init_lock' from 'object_copy'
opencryptoki-3.26.0/usr/lib/common/object.c:180:10: return_function: returning to 'object_copy' from 'object_init_lock'
opencryptoki-3.26.0/usr/lib/common/object.c:181:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:184:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:184:10: call_function: calling 'object_init_ex_data_lock' from 'object_copy'
opencryptoki-3.26.0/usr/lib/common/object.c:184:10: return_function: returning to 'object_copy' from 'object_init_ex_data_lock'
opencryptoki-3.26.0/usr/lib/common/object.c:185:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:190:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:191:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:196:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:196:10: throw: if 'template_add_attributes' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:196:10: danger: 'new_tmpl' leaks here; was allocated at [(4)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/3)
#  194|       }
#  195|   
#  196|->     rc = template_add_attributes(new_tmpl, pTemplate, ulCount);
#  197|       if (rc != CKR_OK) {
#  198|           TRACE_DEVEL("template_add_attributes failed.\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def603]
opencryptoki-3.26.0/usr/lib/common/object.c:315:10: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
opencryptoki-3.26.0/usr/lib/common/object.c:287:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:291:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:296:23: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:297:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:302:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:315:10: throw: if 'template_flatten' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:315:10: danger: 'buf' leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  313|       memcpy(buf + offset, &obj->name, sizeof(CK_BYTE) * 8);
#  314|       offset += 8;
#  315|->     rc = template_flatten(obj->template, buf + offset);
#  316|       if (rc != CKR_OK) {
#  317|           free(buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def604]
opencryptoki-3.26.0/usr/lib/common/object.c:663:10: warning[-Wanalyzer-malloc-leak]: leak of 'new_tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:644:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:649:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:650:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:656:29: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:656:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:657:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:661:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:663:10: throw: if 'template_add_attributes' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:663:10: danger: 'new_tmpl' leaks here; was allocated at [(5)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/4)
#  661|       memset(new_tmpl, 0x0, sizeof(TEMPLATE));
#  662|   
#  663|->     rc = template_add_attributes(new_tmpl, pTemplate, ulCount);
#  664|       if (rc != CKR_OK) {
#  665|           TRACE_DEVEL("template_add_attributes failed.\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def605]
opencryptoki-3.26.0/usr/lib/common/object.c:756:13: warning[-Wanalyzer-malloc-leak]: leak of 'obj'
opencryptoki-3.26.0/usr/lib/common/object.c:729:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:734:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:740:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:752:8: branch_true: following 'true' branch (when 'fname' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:754:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:755:12: branch_true: following 'true' branch (when 'obj_name' is NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:756:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:756:13: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:756:13: danger: 'obj' leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#  754|           obj_name = strrchr(fname, '/');
#  755|           if (obj_name == NULL) {
#  756|->             TRACE_ERROR("File name has invalid format: '%s'\n", fname);
#  757|               rc = CKR_FUNCTION_FAILED;
#  758|               goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def606]
opencryptoki-3.26.0/usr/lib/common/object.c:763:13: warning[-Wanalyzer-malloc-leak]: leak of 'obj'
opencryptoki-3.26.0/usr/lib/common/object.c:729:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:734:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:740:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:752:8: branch_true: following 'true' branch (when 'fname' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:754:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:755:12: branch_false: following 'false' branch (when 'obj_name' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:761:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:762:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:763:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:763:13: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:763:13: danger: 'obj' leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#  761|           obj_name++;
#  762|           if (strlen(obj_name) != 8) {
#  763|->             TRACE_ERROR("File name has invalid format: '%s'\n", fname);
#  764|               rc = CKR_FUNCTION_FAILED;
#  765|               goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def607]
opencryptoki-3.26.0/usr/lib/common/object.c:769:13: warning[-Wanalyzer-malloc-leak]: leak of 'obj'
opencryptoki-3.26.0/usr/lib/common/object.c:729:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:734:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:740:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:752:8: branch_true: following 'true' branch (when 'fname' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:754:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:755:12: branch_false: following 'false' branch (when 'obj_name' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:761:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:762:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:768:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:768:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:769:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:769:13: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:769:13: danger: 'obj' leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#  767|   
#  768|           if (memcmp(obj->name, obj_name, 8) != 0) {
#  769|->             TRACE_ERROR("Object name '%.8s' does not match the file name it was loaded from: '%s'\n",
#  770|                           obj->name, fname);
#  771|               rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def608]
opencryptoki-3.26.0/usr/lib/common/object.c:776:10: warning[-Wanalyzer-malloc-leak]: leak of 'obj'
opencryptoki-3.26.0/usr/lib/common/object.c:729:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:734:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:740:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:776:10: throw: if 'template_unflatten_withSize' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:776:10: danger: 'obj' leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
#  774|       }
#  775|   
#  776|->     rc = template_unflatten_withSize(&tmpl, data + offset, count, data_size);
#  777|       if (rc != CKR_OK) {
#  778|           TRACE_DEVEL("template_unflatten_withSize failed.\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def609]
opencryptoki-3.26.0/usr/lib/common/object.c:778:9: warning[-Wanalyzer-malloc-leak]: leak of 'obj'
opencryptoki-3.26.0/usr/lib/common/object.c:729:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:734:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:740:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:777:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:778:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:778:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:778:9: danger: 'obj' leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
#  776|       rc = template_unflatten_withSize(&tmpl, data + offset, count, data_size);
#  777|       if (rc != CKR_OK) {
#  778|->         TRACE_DEVEL("template_unflatten_withSize failed.\n");
#  779|           goto error;
#  780|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def610]
opencryptoki-3.26.0/usr/lib/common/object.c:787:9: warning[-Wanalyzer-malloc-leak]: leak of 'obj'
opencryptoki-3.26.0/usr/lib/common/object.c:729:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:734:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:740:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:777:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:783:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:783:8: branch_true: following 'true' branch (when 'policy' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:787:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:787:9: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:787:9: danger: 'obj' leaks here; was allocated at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
#  785|              correct strength classification for the usage scenario
#  786|              which will then allow or block key usage. */
#  787|->         policy->store_object_strength(policy, &obj->strength,
#  788|                                         policy_get_attr_from_template,
#  789|                                         tmpl, NULL, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def611]
opencryptoki-3.26.0/usr/lib/common/object.c:809:9: warning[-Wanalyzer-malloc-leak]: leak of 'obj'
opencryptoki-3.26.0/usr/lib/common/object.c:729:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:733:22: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:734:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:740:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:777:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:783:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:783:8: branch_false: following 'false' branch (when 'policy' is NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:792:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:795:8: branch_false: following 'false' branch (when 'replace != 0')...
opencryptoki-3.26.0/usr/lib/common/object.c:809:23: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:809:9: throw: if 'template_free' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:809:9: danger: 'obj' leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  807|       } else {
#  808|           /* Reload of existing object only changes the template */
#  809|->         template_free((*new_obj)->template);
#  810|           (*new_obj)->template = obj->template;
#  811|           (*new_obj)->strength.strength = obj->strength.strength;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def612]
opencryptoki-3.26.0/usr/lib/common/object.c:856:9: warning[-Wanalyzer-malloc-leak]: leak of 'o'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:856:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:856:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:856:9: danger: 'o' leaks here; was allocated at [(5)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/4)
#  854|   
#  855|       if (!o || !tmpl || !tmpl2) {
#  856|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  857|           rc = CKR_HOST_MEMORY;
#  858|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def613]
opencryptoki-3.26.0/usr/lib/common/object.c:856:9: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:852:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:856:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:856:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:856:9: danger: 'tmpl' leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4)
#  854|   
#  855|       if (!o || !tmpl || !tmpl2) {
#  856|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  857|           rc = CKR_HOST_MEMORY;
#  858|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def614]
opencryptoki-3.26.0/usr/lib/common/object.c:856:9: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl2'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:853:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:856:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:856:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:856:9: danger: 'tmpl2' leaks here; was allocated at [(5)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/4)
#  854|   
#  855|       if (!o || !tmpl || !tmpl2) {
#  856|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#  857|           rc = CKR_HOST_MEMORY;
#  858|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def615]
opencryptoki-3.26.0/usr/lib/common/object.c:861:10: warning[-Wanalyzer-malloc-leak]: leak of 'o'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:861:10: throw: if 'template_add_attributes' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:861:10: danger: 'o' leaks here; was allocated at [(5)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/4)
#  859|       }
#  860|   
#  861|->     rc = template_add_attributes(tmpl2, pTemplate, ulCount);
#  862|       if (rc != CKR_OK)
#  863|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def616]
opencryptoki-3.26.0/usr/lib/common/object.c:861:10: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:852:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:861:10: throw: if 'template_add_attributes' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:861:10: danger: 'tmpl' leaks here; was allocated at [(5)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/4)
#  859|       }
#  860|   
#  861|->     rc = template_add_attributes(tmpl2, pTemplate, ulCount);
#  862|       if (rc != CKR_OK)
#  863|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def617]
opencryptoki-3.26.0/usr/lib/common/object.c:861:10: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl2'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:853:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:855:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:855:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:861:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:861:10: throw: if 'template_add_attributes' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:861:10: danger: 'tmpl2' leaks here; was allocated at [(5)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/4)
#  859|       }
#  860|   
#  861|->     rc = template_add_attributes(tmpl2, pTemplate, ulCount);
#  862|       if (rc != CKR_OK)
#  863|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def618]
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: warning[-Wanalyzer-malloc-leak]: leak of 'o'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: throw: if 'template_validate_attributes' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: danger: 'o' leaks here; was allocated at [(5)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/4)
#  872|       //
#  873|   
#  874|->     rc = template_validate_attributes(tokdata, tmpl2, class, subclass, mode);
#  875|       if (rc != CKR_OK) {
#  876|           TRACE_DEVEL("template_validate_attributes failed.\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def619]
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:852:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: throw: if 'template_validate_attributes' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: danger: 'tmpl' leaks here; was allocated at [(5)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/4)
#  872|       //
#  873|   
#  874|->     rc = template_validate_attributes(tokdata, tmpl2, class, subclass, mode);
#  875|       if (rc != CKR_OK) {
#  876|           TRACE_DEVEL("template_validate_attributes failed.\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def620]
opencryptoki-3.26.0/usr/lib/common/object.c:876:9: warning[-Wanalyzer-malloc-leak]: leak of 'o'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:875:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:876:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:876:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:876:9: danger: 'o' leaks here; was allocated at [(5)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/4)
#  874|       rc = template_validate_attributes(tokdata, tmpl2, class, subclass, mode);
#  875|       if (rc != CKR_OK) {
#  876|->         TRACE_DEVEL("template_validate_attributes failed.\n");
#  877|           goto done;
#  878|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def621]
opencryptoki-3.26.0/usr/lib/common/object.c:876:9: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:852:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:875:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:876:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:876:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:876:9: danger: 'tmpl' leaks here; was allocated at [(5)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/4)
#  874|       rc = template_validate_attributes(tokdata, tmpl2, class, subclass, mode);
#  875|       if (rc != CKR_OK) {
#  876|->         TRACE_DEVEL("template_validate_attributes failed.\n");
#  877|           goto done;
#  878|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def622]
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: warning[-Wanalyzer-malloc-leak]: leak of 'o'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:875:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: throw: if 'template_check_required_attributes' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: danger: 'o' leaks here; was allocated at [(5)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/4)
#  878|       }
#  879|   
#  880|->     rc = template_check_required_attributes(tmpl2, class, subclass, mode);
#  881|       if (rc != CKR_OK) {
#  882|           TRACE_DEVEL("template_check_required_attributes failed.\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def623]
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:852:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:875:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: throw: if 'template_check_required_attributes' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: danger: 'tmpl' leaks here; was allocated at [(5)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/4)
#  878|       }
#  879|   
#  880|->     rc = template_check_required_attributes(tmpl2, class, subclass, mode);
#  881|       if (rc != CKR_OK) {
#  882|           TRACE_DEVEL("template_check_required_attributes failed.\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def624]
opencryptoki-3.26.0/usr/lib/common/object.c:882:9: warning[-Wanalyzer-malloc-leak]: leak of 'o'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:875:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:881:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:882:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:882:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:882:9: danger: 'o' leaks here; was allocated at [(5)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/4)
#  880|       rc = template_check_required_attributes(tmpl2, class, subclass, mode);
#  881|       if (rc != CKR_OK) {
#  882|->         TRACE_DEVEL("template_check_required_attributes failed.\n");
#  883|           goto done;
#  884|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def625]
opencryptoki-3.26.0/usr/lib/common/object.c:882:9: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:852:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:875:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:881:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:882:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:882:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:882:9: danger: 'tmpl' leaks here; was allocated at [(5)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/4)
#  880|       rc = template_check_required_attributes(tmpl2, class, subclass, mode);
#  881|       if (rc != CKR_OK) {
#  882|->         TRACE_DEVEL("template_check_required_attributes failed.\n");
#  883|           goto done;
#  884|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def626]
opencryptoki-3.26.0/usr/lib/common/object.c:886:10: warning[-Wanalyzer-malloc-leak]: leak of 'o'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:875:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:881:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:886:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:886:10: throw: if 'template_add_default_attributes' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:886:10: danger: 'o' leaks here; was allocated at [(5)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/4)
#  884|       }
#  885|   
#  886|->     rc = template_add_default_attributes(tmpl, tmpl2, class, subclass, mode);
#  887|       if (rc != CKR_OK)
#  888|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def627]
opencryptoki-3.26.0/usr/lib/common/object.c:886:10: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:852:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:875:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:881:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:886:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:886:10: throw: if 'template_add_default_attributes' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:886:10: danger: 'tmpl' leaks here; was allocated at [(5)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/4)
#  884|       }
#  885|   
#  886|->     rc = template_add_default_attributes(tmpl, tmpl2, class, subclass, mode);
#  887|       if (rc != CKR_OK)
#  888|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def628]
opencryptoki-3.26.0/usr/lib/common/object.c:891:14: warning[-Wanalyzer-malloc-leak]: leak of 'o'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:875:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:881:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:886:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:887:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:890:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:890:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:891:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:891:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:891:14: danger: 'o' leaks here; was allocated at [(5)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/4)
#  889|   
#  890|       if (token_specific.t_set_attrs_for_new_object != NULL) {
#  891|->         rc = token_specific.t_set_attrs_for_new_object(tokdata, class,
#  892|                                                          mode, tmpl2);
#  893|           if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def629]
opencryptoki-3.26.0/usr/lib/common/object.c:894:13: warning[-Wanalyzer-malloc-leak]: leak of 'o'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:875:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:881:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:886:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:887:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:890:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:890:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:891:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:893:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:894:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:894:13: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:894:13: danger: 'o' leaks here; was allocated at [(5)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/4)
#  892|                                                          mode, tmpl2);
#  893|           if (rc != CKR_OK) {
#  894|->             TRACE_ERROR("token_specific.t_set_pkey_attr failed with rc=%lx\n",rc);
#  895|               goto done;
#  896|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def630]
opencryptoki-3.26.0/usr/lib/common/object.c:899:10: warning[-Wanalyzer-malloc-leak]: leak of 'o'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:875:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:881:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:886:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:887:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:890:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:890:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:899:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:899:10: throw: if 'template_merge' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:899:10: danger: 'o' leaks here; was allocated at [(5)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/4)
#  897|       }
#  898|   
#  899|->     rc = template_merge(tmpl, &tmpl2);
#  900|       if (rc != CKR_OK) {
#  901|           TRACE_DEVEL("template_merge failed.\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def631]
opencryptoki-3.26.0/usr/lib/common/object.c:901:9: warning[-Wanalyzer-malloc-leak]: leak of 'o'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:874:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:875:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:880:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:881:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:886:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:887:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:890:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:900:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:901:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:901:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:901:9: danger: 'o' leaks here; was allocated at [(5)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/4)
#  899|       rc = template_merge(tmpl, &tmpl2);
#  900|       if (rc != CKR_OK) {
#  901|->         TRACE_DEVEL("template_merge failed.\n");
#  902|           goto done;
#  903|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def632]
opencryptoki-3.26.0/usr/lib/common/object.c:930:9: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:852:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:862:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:863:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:924:8: branch_true: following 'true' branch (when 'o' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:925:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:925:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:927:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:929:8: branch_true: following 'true' branch (when 'tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:930:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:930:9: throw: if 'template_free' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:930:9: danger: 'tmpl' leaks here; was allocated at [(5)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/4)
#  928|       }
#  929|       if (tmpl)
#  930|->         template_free(tmpl);
#  931|       if (tmpl2)
#  932|           template_free(tmpl2);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def633]
opencryptoki-3.26.0/usr/lib/common/object.c:932:9: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl2'
opencryptoki-3.26.0/usr/lib/common/object.c:843:8: branch_false: following 'false' branch (when 'obj' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:847:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:847:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:851:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:853:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:855:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:856:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:929:8: branch_false: following 'false' branch (when 'tmpl' is NULL)...
opencryptoki-3.26.0/usr/lib/common/object.c:931:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:931:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:932:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:932:9: throw: if 'template_free' throws an exception...
opencryptoki-3.26.0/usr/lib/common/object.c:932:9: danger: 'tmpl2' leaks here; was allocated at [(5)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/4)
#  930|           template_free(tmpl);
#  931|       if (tmpl2)
#  932|->         template_free(tmpl2);
#  933|   
#  934|       return rc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def634]
opencryptoki-3.26.0/usr/lib/common/object.c:940:9: warning[-Wanalyzer-malloc-leak]: leak of 'new_tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:143:7: enter_function: entry to 'object_copy'
opencryptoki-3.26.0/usr/lib/common/object.c:154:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:160:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:162:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:162:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:162:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:175:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:180:10: call_function: calling 'object_init_lock' from 'object_copy'
#  938|   {
#  939|       if (pthread_rwlock_init(&obj->template_rwlock, NULL) != 0) {
#  940|->         TRACE_DEVEL("Object Lock init failed.\n");
#  941|           return CKR_CANT_LOCK;
#  942|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def635]
opencryptoki-3.26.0/usr/lib/common/object.c:997:9: warning[-Wanalyzer-malloc-leak]: leak of 'new_tmpl'
opencryptoki-3.26.0/usr/lib/common/object.c:143:7: enter_function: entry to 'object_copy'
opencryptoki-3.26.0/usr/lib/common/object.c:154:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:160:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/object.c:162:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:162:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:162:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:175:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:180:10: call_function: calling 'object_init_lock' from 'object_copy'
opencryptoki-3.26.0/usr/lib/common/object.c:180:10: return_function: returning to 'object_copy' from 'object_init_lock'
opencryptoki-3.26.0/usr/lib/common/object.c:181:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/object.c:184:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/object.c:184:10: call_function: calling 'object_init_ex_data_lock' from 'object_copy'
#  995|   {
#  996|       if (pthread_rwlock_init(&obj->ex_data_rwlock, NULL) != 0) {
#  997|->         TRACE_DEVEL("Ex_data Lock init failed.\n");
#  998|           return CKR_CANT_LOCK;
#  999|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def636]
opencryptoki-3.26.0/usr/lib/common/ock_syslog.h:34:26: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen("/etc/opencryptoki/strength.conf", "r")'
opencryptoki-3.26.0/usr/lib/api/policy.c:2152:7: enter_function: entry to 'policy_load'
opencryptoki-3.26.0/usr/lib/api/policy.c:2162:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/api/policy.c:2163:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/api/policy.c:2172:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/api/policy.c:2172:10: call_function: calling 'policy_check_cfg_file' from 'policy_load'
#   32|   
#   33|       va_start(ap, fmt);
#   34|->     vsnprintf(buf + off, sizeof(buf) - off, fmt, ap);
#   35|       va_end(ap);
#   36|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def637]
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:189:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ranfd’
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:182:13: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:183:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:185:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:185:8: branch_true: following ‘true’ branch (when ‘ranfd >= 0’)...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:185:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:189:17: throw: if ‘close’ throws an exception...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:189:17: danger: ‘ranfd’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  187|               rlen = read(ranfd, output + totallen, bytes - totallen);
#  188|               if (rlen <= 0) {
#  189|->                 close(ranfd);
#  190|                   return CKR_FUNCTION_FAILED;
#  191|               }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def638]
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:194:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ranfd’
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:182:13: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:183:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:185:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:185:8: branch_true: following ‘true’ branch (when ‘ranfd >= 0’)...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:185:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:188:16: branch_false: following ‘false’ branch (when ‘rlen > 0’)...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:192:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:194:9: throw: if ‘close’ throws an exception...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:194:9: danger: ‘ranfd’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  192|               totallen += rlen;
#  193|           } while (totallen < bytes);
#  194|->         close(ranfd);
#  195|           return CKR_OK;
#  196|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def639]
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:330:39: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:323:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:324:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:329:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:330:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:339:15: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:350:11: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:351:8: branch_false: following ‘false’ branch (when ‘ret == 1’)...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:357:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:357:8: branch_false: following ‘false’ branch (when ‘tdnew != 0’)...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:391:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:391:12: branch_true: following ‘true’ branch (when ‘sopin’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:394:19: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:394:19: throw: if ‘EVP_sha512’ throws an exception...
opencryptoki-3.26.0/usr/lib/common/pkcs_utils.c:330:39: danger: ‘fopen(&fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  328|   
#  329|       fd = fileno(fp);
#  330|->     if ((fstat(fd, &stbuf) != 0) || (!S_ISREG(stbuf.st_mode))) {
#  331|           ret = -1;
#  332|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def640]
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:41:9: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:36:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:40:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:41:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:41:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:41:9: danger: 'class_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   39|   
#   40|       if (!class_attr || !profile_id_attr) {
#   41|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#   42|           rc = CKR_HOST_MEMORY;
#   43|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def641]
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:41:9: warning[-Wanalyzer-malloc-leak]: leak of 'profile_id_attr'
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:38:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:40:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:41:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:41:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:41:9: danger: 'profile_id_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   39|   
#   40|       if (!class_attr || !profile_id_attr) {
#   41|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
#   42|           rc = CKR_HOST_MEMORY;
#   43|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def642]
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:56:10: warning[-Wanalyzer-malloc-leak]: leak of 'class_attr'
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:36:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:40:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:46:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:56:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:56:10: danger: 'class_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   54|       *(CK_PROFILE_ID *)profile_id_attr->pValue = CKP_INVALID_ID;
#   55|   
#   56|->     rc = template_update_attribute(tmpl, class_attr);
#   57|       if (rc != CKR_OK) {
#   58|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def643]
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:56:10: warning[-Wanalyzer-malloc-leak]: leak of 'profile_id_attr'
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:38:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:40:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:46:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:56:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:56:10: danger: 'profile_id_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#   54|       *(CK_PROFILE_ID *)profile_id_attr->pValue = CKP_INVALID_ID;
#   55|   
#   56|->     rc = template_update_attribute(tmpl, class_attr);
#   57|       if (rc != CKR_OK) {
#   58|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def644]
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:58:9: warning[-Wanalyzer-malloc-leak]: leak of 'profile_id_attr'
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:38:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:40:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:46:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:57:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:58:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:58:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:58:9: danger: 'profile_id_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#   56|       rc = template_update_attribute(tmpl, class_attr);
#   57|       if (rc != CKR_OK) {
#   58|->         TRACE_ERROR("template_update_attribute failed\n");
#   59|           goto error;
#   60|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def645]
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:62:10: warning[-Wanalyzer-malloc-leak]: leak of 'profile_id_attr'
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:38:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:40:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:46:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:57:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:62:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:62:10: throw: if 'template_update_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/common/profile_obj.c:62:10: danger: 'profile_id_attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#   60|       }
#   61|       class_attr = NULL;
#   62|->     rc = template_update_attribute(tmpl, profile_id_attr);
#   63|       if (rc != CKR_OK) {
#   64|           TRACE_ERROR("template_update_attribute failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def646]
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:119:9: warning[-Wanalyzer-malloc-leak]: leak of 'new_session'
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:95:31: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:96:8: branch_false: following 'false' branch (when 'new_session' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:118:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:119:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:119:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:119:9: danger: 'new_session' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  117|   
#  118|       if (pthread_rwlock_wrlock(&tokdata->sess_list_rwlock)) {
#  119|->         TRACE_ERROR("Write Lock failed.\n");
#  120|           rc = CKR_CANT_LOCK;
#  121|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def647]
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:147:18: warning[-Wanalyzer-malloc-leak]: leak of 'new_session'
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:95:31: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:96:8: branch_false: following 'false' branch (when 'new_session' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:118:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:127:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:147:18: throw: if 'bt_node_add' throws an exception...
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:147:18: danger: 'new_session' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  145|       pthread_rwlock_unlock(&tokdata->sess_list_rwlock);
#  146|   
#  147|->     *phSession = bt_node_add(&tokdata->sess_btree, new_session);
#  148|       if (*phSession == 0) {
#  149|           rc = CKR_HOST_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def648]
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:155:9: warning[-Wanalyzer-malloc-leak]: leak of 'new_session'
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:95:31: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:96:8: branch_false: following 'false' branch (when 'new_session' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:118:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:119:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:154:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:155:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:155:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:155:9: danger: 'new_session' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  153|   done:
#  154|       if (rc != CKR_OK && new_session != NULL) {
#  155|->         TRACE_ERROR("Failed to add session to the btree.\n");
#  156|           free(new_session);
#  157|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def649]
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:176:9: warning[-Wanalyzer-malloc-leak]: leak of 'new_session'
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:86:7: enter_function: entry to 'session_mgr_new'
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:95:31: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:96:8: branch_false: following 'false' branch (when 'new_session' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:115:18: call_function: calling 'session_mgr_so_session_exists' from 'session_mgr_new'
#  174|        * global_login_state */
#  175|       if (pthread_rwlock_rdlock(&tokdata->sess_list_rwlock)) {
#  176|->         TRACE_ERROR("Read Lock failed.\n");
#  177|           return FALSE;
#  178|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def650]
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:199:9: warning[-Wanalyzer-malloc-leak]: leak of 'new_session'
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:86:7: enter_function: entry to 'session_mgr_new'
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:95:31: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:96:8: branch_false: following 'false' branch (when 'new_session' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:102:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:115:18: call_function: calling 'session_mgr_so_session_exists' from 'session_mgr_new'
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:115:18: return_function: returning to 'session_mgr_new' from 'session_mgr_so_session_exists'
opencryptoki-3.26.0/usr/lib/common/sess_mgr.c:116:20: call_function: calling 'session_mgr_user_session_exists' from 'session_mgr_new'
#  197|        * glogal_login_state */
#  198|       if (pthread_rwlock_rdlock(&tokdata->sess_list_rwlock)) {
#  199|->         TRACE_ERROR("Read Lock failed.\n");
#  200|           return FALSE;
#  201|       }

Error: CPPCHECK_WARNING (CWE-682): [#def651]
opencryptoki-3.26.0/usr/lib/common/shared_memory.c:129: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  127|   
#  128|       i = 0;
#  129|->     *it++ = '/';
#  130|       if (file_path[0] == '/')
#  131|           i++;

Error: CPPCHECK_WARNING (CWE-476): [#def652]
opencryptoki-3.26.0/usr/lib/common/shared_memory.c:129: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: it++
#  127|   
#  128|       i = 0;
#  129|->     *it++ = '/';
#  130|       if (file_path[0] == '/')
#  131|           i++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def653]
opencryptoki-3.26.0/usr/lib/common/shared_memory.c:141:5: warning[-Wanalyzer-malloc-leak]: leak of 'name'
opencryptoki-3.26.0/usr/lib/common/shared_memory.c:116:8: branch_false: following 'false' branch (when 'len <= 255')...
opencryptoki-3.26.0/usr/lib/common/shared_memory.c:121:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/shared_memory.c:121:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/shared_memory.c:122:8: branch_false: following 'false' branch (when 'name' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/shared_memory.c:129:6: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/shared_memory.c:141:5: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/common/shared_memory.c:141:5: danger: 'name' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  139|       *it = '\0';
#  140|   
#  141|->     TRACE_DEVEL("File path \"%s\" converted to \"%s\".\n", file_path, name);
#  142|   
#  143|       return name;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def654]
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:909:18: warning[-Wanalyzer-malloc-leak]: leak of 'ptr'
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:49:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:53:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:53:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:59:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:60:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:67:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:92:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:107:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:107:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:113:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:113:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:123:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:141:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:148:50: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:150:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:155:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:155:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:163:50: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:165:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:173:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:173:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:180:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:896:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:897:27: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:898:12: branch_false: following 'false' branch (when 'ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:903:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:906:9: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:908:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:909:18: throw: if 'ibm_ml_dsa_dup_param' throws an exception...
opencryptoki-3.26.0/usr/lib/common/sign_mgr.c:909:18: danger: 'ptr' leaks here; was allocated at [(27)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/26)
#  907|           {
#  908|           case CKM_IBM_ML_DSA:
#  909|->             rc = ibm_ml_dsa_dup_param(mech->pParameter, ptr,
#  910|                                         mech->ulParameterLen);
#  911|               if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def655]
opencryptoki-3.26.0/usr/lib/common/template.c:924:14: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:987:7: enter_function: entry to 'template_unflatten'
opencryptoki-3.26.0/usr/lib/common/template.c:989:12: call_function: calling 'template_unflatten_withSize' from 'template_unflatten'
#  922|           ptr += sizeof(CK_ATTRIBUTE_32);
#  923|   
#  924|->         if (!is_attribute_attr_array(a1_32.type))
#  925|               return CKR_ATTRIBUTE_TYPE_INVALID;
#  926|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def656]
opencryptoki-3.26.0/usr/lib/common/template.c:930:17: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:987:7: enter_function: entry to 'template_unflatten'
opencryptoki-3.26.0/usr/lib/common/template.c:989:12: call_function: calling 'template_unflatten_withSize' from 'template_unflatten'
#  928|               memcpy(&a2_32, ptr, sizeof(a2_32));
#  929|   
#  930|->             if (is_attribute_attr_array(a2_32.type)) {
#  931|                   rc = attribute_array_unflatten(&ptr, &elements, &num_elements);
#  932|                   if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def657]
opencryptoki-3.26.0/usr/lib/common/template.c:954:26: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:987:7: enter_function: entry to 'template_unflatten'
opencryptoki-3.26.0/usr/lib/common/template.c:989:12: call_function: calling 'template_unflatten_withSize' from 'template_unflatten'
#  952|                                              sizeof(attr_ulong_32));
#  953|                       attr_ulong = attr_ulong_32;
#  954|->                     rc = add_to_attribute_array(attrs, num_attrs, a2_32.type,
#  955|                                                   (CK_BYTE *)&attr_ulong,
#  956|                                                   sizeof(attr_ulong));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def658]
opencryptoki-3.26.0/usr/lib/common/template.c:958:26: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:996:7: enter_function: entry to 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1012:8: branch_false: following 'false' branch (when 'new_tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1017:8: branch_false: following 'false' branch (when 'tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1021:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: following 'true' branch (when 'buf_size >= 0')...
opencryptoki-3.26.0/usr/lib/common/template.c:1099:18: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1098:17: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1104:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1107:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1107:20: branch_true: following 'true' branch (when 'buf_size >= 0')...
opencryptoki-3.26.0/usr/lib/common/template.c:1108:54: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1107:21: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1113:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1113:22: call_function: calling 'attribute_array_unflatten' from 'template_unflatten_withSize'
#  956|                                                   sizeof(attr_ulong));
#  957|                   } else {
#  958|->                     rc = add_to_attribute_array(attrs, num_attrs, a2_32.type,
#  959|                                                   ptr + sizeof(CK_ATTRIBUTE_32),
#  960|                                                   a2_32.ulValueLen);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def659]
opencryptoki-3.26.0/usr/lib/common/template.c:963:21: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:996:7: enter_function: entry to 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1012:8: branch_false: following 'false' branch (when 'new_tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1017:8: branch_false: following 'false' branch (when 'tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1021:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: following 'true' branch (when 'buf_size >= 0')...
opencryptoki-3.26.0/usr/lib/common/template.c:1099:18: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1098:17: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1104:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1107:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1107:20: branch_true: following 'true' branch (when 'buf_size >= 0')...
opencryptoki-3.26.0/usr/lib/common/template.c:1108:54: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1107:21: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1113:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1113:22: call_function: calling 'attribute_array_unflatten' from 'template_unflatten_withSize'
#  961|                   }
#  962|                   if (rc != CKR_OK) {
#  963|->                     TRACE_ERROR("attribute_array_unflatten failed\n");
#  964|                       goto error;
#  965|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def660]
opencryptoki-3.26.0/usr/lib/common/template.c:1106:17: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:1012:8: branch_false: following 'false' branch (when 'new_tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1017:8: branch_false: following 'false' branch (when 'tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1021:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_false: following 'false' branch (when 'buf_size < 0')...
opencryptoki-3.26.0/usr/lib/common/template.c:1104:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:17: throw: if 'is_attribute_attr_array' throws an exception...
opencryptoki-3.26.0/usr/lib/common/template.c:1106:17: danger: 'tmpl' leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 1104|               memcpy(&a1_32, ptr, sizeof(a1_32));
# 1105|   
# 1106|->             if (is_attribute_attr_array(a1_32.type)) {
# 1107|                   if (buf_size >= 0 &&
# 1108|                       (ptr + sizeof(CK_ATTRIBUTE_32) + a1_32.ulValueLen ) >

Error: GCC_ANALYZER_WARNING (CWE-401): [#def661]
opencryptoki-3.26.0/usr/lib/common/template.c:1195:17: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:996:7: enter_function: entry to 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1012:8: branch_false: following 'false' branch (when 'new_tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1017:8: branch_false: following 'false' branch (when 'tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1021:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1142:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1150:16: branch_false: following 'false' branch (when 'a2' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1155:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1158:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1159:30: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1163:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1166:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: call_function: calling 'template_update_attribute' from 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: return_function: returning to 'template_unflatten_withSize' from 'template_update_attribute'
opencryptoki-3.26.0/usr/lib/common/template.c:1194:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1195:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1195:17: throw: if 'is_attribute_attr_array' throws an exception...
opencryptoki-3.26.0/usr/lib/common/template.c:1195:17: danger: 'tmpl' leaks here; was allocated at [(4)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/3)
# 1193|           rc = template_update_attribute(tmpl, a2);
# 1194|           if (rc != CKR_OK) {
# 1195|->             if (is_attribute_attr_array(a2->type))
# 1196|                   cleanse_and_free_attribute_array2((CK_ATTRIBUTE_PTR)a2->pValue,
# 1197|                                       a2->ulValueLen / sizeof(CK_ATTRIBUTE),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def662]
opencryptoki-3.26.0/usr/lib/common/template.c:1196:17: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:996:7: enter_function: entry to 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1012:8: branch_false: following 'false' branch (when 'new_tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1017:8: branch_false: following 'false' branch (when 'tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1021:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1142:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1150:16: branch_false: following 'false' branch (when 'a2' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1155:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1158:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1159:30: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1163:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1166:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: call_function: calling 'template_update_attribute' from 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: return_function: returning to 'template_unflatten_withSize' from 'template_update_attribute'
opencryptoki-3.26.0/usr/lib/common/template.c:1194:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1195:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1195:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1197:37: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1196:17: throw: if 'cleanse_and_free_attribute_array2' throws an exception...
opencryptoki-3.26.0/usr/lib/common/template.c:1196:17: danger: 'tmpl' leaks here; was allocated at [(4)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/3)
# 1194|           if (rc != CKR_OK) {
# 1195|               if (is_attribute_attr_array(a2->type))
# 1196|->                 cleanse_and_free_attribute_array2((CK_ATTRIBUTE_PTR)a2->pValue,
# 1197|                                       a2->ulValueLen / sizeof(CK_ATTRIBUTE),
# 1198|                                       FALSE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def663]
opencryptoki-3.26.0/usr/lib/common/template.c:1221:17: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:996:7: enter_function: entry to 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1012:8: branch_false: following 'false' branch (when 'new_tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1017:8: branch_false: following 'false' branch (when 'tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1021:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1142:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1150:16: branch_false: following 'false' branch (when 'a2' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1155:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1158:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1159:30: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1163:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1166:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: call_function: calling 'template_update_attribute' from 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: return_function: returning to 'template_unflatten_withSize' from 'template_update_attribute'
opencryptoki-3.26.0/usr/lib/common/template.c:1194:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1024:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1142:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1150:16: branch_true: following 'true' branch (when 'a2' is NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1151:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1151:17: call_function: calling 'template_free' from 'template_unflatten_withSize'
# 1219|   
# 1220|           if (attr) {
# 1221|->             if (is_attribute_attr_array(attr->type)) {
# 1222|                   cleanse_and_free_attribute_array2(
# 1223|                                       (CK_ATTRIBUTE_PTR)attr->pValue,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def664]
opencryptoki-3.26.0/usr/lib/common/template.c:1222:17: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:996:7: enter_function: entry to 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1012:8: branch_false: following 'false' branch (when 'new_tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1017:8: branch_false: following 'false' branch (when 'tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1021:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1142:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1150:16: branch_false: following 'false' branch (when 'a2' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1155:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1158:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1159:30: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1163:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1166:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: call_function: calling 'template_update_attribute' from 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: return_function: returning to 'template_unflatten_withSize' from 'template_update_attribute'
opencryptoki-3.26.0/usr/lib/common/template.c:1194:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1024:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1142:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1150:16: branch_true: following 'true' branch (when 'a2' is NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1151:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1151:17: call_function: calling 'template_free' from 'template_unflatten_withSize'
# 1220|           if (attr) {
# 1221|               if (is_attribute_attr_array(attr->type)) {
# 1222|->                 cleanse_and_free_attribute_array2(
# 1223|                                       (CK_ATTRIBUTE_PTR)attr->pValue,
# 1224|                                       attr->ulValueLen / sizeof(CK_ATTRIBUTE),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def665]
opencryptoki-3.26.0/usr/lib/common/template.c:1228:17: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:996:7: enter_function: entry to 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1012:8: branch_false: following 'false' branch (when 'new_tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1017:8: branch_false: following 'false' branch (when 'tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1021:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1142:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1150:16: branch_false: following 'false' branch (when 'a2' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1155:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1158:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1159:30: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1163:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1166:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: call_function: calling 'template_update_attribute' from 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: return_function: returning to 'template_unflatten_withSize' from 'template_update_attribute'
opencryptoki-3.26.0/usr/lib/common/template.c:1194:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1024:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1142:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1150:16: branch_true: following 'true' branch (when 'a2' is NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1151:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1151:17: call_function: calling 'template_free' from 'template_unflatten_withSize'
# 1226|               }
# 1227|               if (attr->pValue != NULL)
# 1228|->                 OPENSSL_cleanse(attr->pValue, attr->ulValueLen);
# 1229|               free(attr);
# 1230|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def666]
opencryptoki-3.26.0/usr/lib/common/template.c:1232:32: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:996:7: enter_function: entry to 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1012:8: branch_false: following 'false' branch (when 'new_tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1017:8: branch_false: following 'false' branch (when 'tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1021:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1142:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1150:16: branch_false: following 'false' branch (when 'a2' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1155:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1158:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1159:30: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1163:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1166:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: call_function: calling 'template_update_attribute' from 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: return_function: returning to 'template_unflatten_withSize' from 'template_update_attribute'
opencryptoki-3.26.0/usr/lib/common/template.c:1194:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1024:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1142:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1150:16: branch_true: following 'true' branch (when 'a2' is NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1151:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1151:17: call_function: calling 'template_free' from 'template_unflatten_withSize'
# 1230|           }
# 1231|   
# 1232|->         tmpl->attribute_list = dlist_remove_node(tmpl->attribute_list,
# 1233|                                                    tmpl->attribute_list);
# 1234|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def667]
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: warning[-Wanalyzer-malloc-leak]: leak of 'copy_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1524:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: danger: 'copy_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/8)
# 1529|       if (!token_attr || !priv_attr || !mod_attr || !label_attr ||
# 1530|           !unique_id_attr || !copy_attr || !destr_attr) {
# 1531|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1532|           rc = CKR_HOST_MEMORY;
# 1533|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def668]
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: warning[-Wanalyzer-malloc-leak]: leak of 'destr_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1526:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: danger: 'destr_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/8)
# 1529|       if (!token_attr || !priv_attr || !mod_attr || !label_attr ||
# 1530|           !unique_id_attr || !copy_attr || !destr_attr) {
# 1531|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1532|           rc = CKR_HOST_MEMORY;
# 1533|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def669]
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: warning[-Wanalyzer-malloc-leak]: leak of 'label_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1522:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: danger: 'label_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/8)
# 1529|       if (!token_attr || !priv_attr || !mod_attr || !label_attr ||
# 1530|           !unique_id_attr || !copy_attr || !destr_attr) {
# 1531|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1532|           rc = CKR_HOST_MEMORY;
# 1533|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def670]
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: warning[-Wanalyzer-malloc-leak]: leak of 'mod_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1520:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: danger: 'mod_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/8)
# 1529|       if (!token_attr || !priv_attr || !mod_attr || !label_attr ||
# 1530|           !unique_id_attr || !copy_attr || !destr_attr) {
# 1531|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1532|           rc = CKR_HOST_MEMORY;
# 1533|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def671]
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1518:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: danger: 'priv_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/8)
# 1529|       if (!token_attr || !priv_attr || !mod_attr || !label_attr ||
# 1530|           !unique_id_attr || !copy_attr || !destr_attr) {
# 1531|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1532|           rc = CKR_HOST_MEMORY;
# 1533|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def672]
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: warning[-Wanalyzer-malloc-leak]: leak of 'token_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: danger: 'token_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/8)
# 1529|       if (!token_attr || !priv_attr || !mod_attr || !label_attr ||
# 1530|           !unique_id_attr || !copy_attr || !destr_attr) {
# 1531|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1532|           rc = CKR_HOST_MEMORY;
# 1533|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def673]
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: warning[-Wanalyzer-malloc-leak]: leak of 'unique_id_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1523:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/common/template.c:1531:9: danger: 'unique_id_attr' leaks here; was allocated at [(9)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/8)
# 1529|       if (!token_attr || !priv_attr || !mod_attr || !label_attr ||
# 1530|           !unique_id_attr || !copy_attr || !destr_attr) {
# 1531|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1532|           rc = CKR_HOST_MEMORY;
# 1533|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def674]
opencryptoki-3.26.0/usr/lib/common/template.c:1660:17: warning[-Wanalyzer-malloc-leak]: leak of 'copy_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1524:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1658|           if (type == attr->type) {
# 1659|               found = TRUE;
# 1660|->             if (is_attribute_attr_array(attr->type)) {
# 1661|                    cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def675]
opencryptoki-3.26.0/usr/lib/common/template.c:1660:17: warning[-Wanalyzer-malloc-leak]: leak of 'destr_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1526:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch (when 'destr_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1536:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1658|           if (type == attr->type) {
# 1659|               found = TRUE;
# 1660|->             if (is_attribute_attr_array(attr->type)) {
# 1661|                    cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def676]
opencryptoki-3.26.0/usr/lib/common/template.c:1660:17: warning[-Wanalyzer-malloc-leak]: leak of 'label_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1522:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1530:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1658|           if (type == attr->type) {
# 1659|               found = TRUE;
# 1660|->             if (is_attribute_attr_array(attr->type)) {
# 1661|                    cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def677]
opencryptoki-3.26.0/usr/lib/common/template.c:1660:17: warning[-Wanalyzer-malloc-leak]: leak of 'mod_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1520:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1530:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1658|           if (type == attr->type) {
# 1659|               found = TRUE;
# 1660|->             if (is_attribute_attr_array(attr->type)) {
# 1661|                    cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def678]
opencryptoki-3.26.0/usr/lib/common/template.c:1660:17: warning[-Wanalyzer-malloc-leak]: leak of 'priv_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1518:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1658|           if (type == attr->type) {
# 1659|               found = TRUE;
# 1660|->             if (is_attribute_attr_array(attr->type)) {
# 1661|                    cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def679]
opencryptoki-3.26.0/usr/lib/common/template.c:1660:17: warning[-Wanalyzer-malloc-leak]: leak of 'token_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1658|           if (type == attr->type) {
# 1659|               found = TRUE;
# 1660|->             if (is_attribute_attr_array(attr->type)) {
# 1661|                    cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def680]
opencryptoki-3.26.0/usr/lib/common/template.c:1660:17: warning[-Wanalyzer-malloc-leak]: leak of 'unique_id_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1523:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1658|           if (type == attr->type) {
# 1659|               found = TRUE;
# 1660|->             if (is_attribute_attr_array(attr->type)) {
# 1661|                    cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def681]
opencryptoki-3.26.0/usr/lib/common/template.c:1661:18: warning[-Wanalyzer-malloc-leak]: leak of 'copy_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1524:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1659|               found = TRUE;
# 1660|               if (is_attribute_attr_array(attr->type)) {
# 1661|->                  cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,
# 1663|                                        attr->ulValueLen / sizeof(CK_ATTRIBUTE),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def682]
opencryptoki-3.26.0/usr/lib/common/template.c:1661:18: warning[-Wanalyzer-malloc-leak]: leak of 'destr_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1526:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch (when 'destr_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1536:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1659|               found = TRUE;
# 1660|               if (is_attribute_attr_array(attr->type)) {
# 1661|->                  cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,
# 1663|                                        attr->ulValueLen / sizeof(CK_ATTRIBUTE),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def683]
opencryptoki-3.26.0/usr/lib/common/template.c:1661:18: warning[-Wanalyzer-malloc-leak]: leak of 'label_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1522:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1530:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1659|               found = TRUE;
# 1660|               if (is_attribute_attr_array(attr->type)) {
# 1661|->                  cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,
# 1663|                                        attr->ulValueLen / sizeof(CK_ATTRIBUTE),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def684]
opencryptoki-3.26.0/usr/lib/common/template.c:1661:18: warning[-Wanalyzer-malloc-leak]: leak of 'mod_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1520:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1530:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1659|               found = TRUE;
# 1660|               if (is_attribute_attr_array(attr->type)) {
# 1661|->                  cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,
# 1663|                                        attr->ulValueLen / sizeof(CK_ATTRIBUTE),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def685]
opencryptoki-3.26.0/usr/lib/common/template.c:1661:18: warning[-Wanalyzer-malloc-leak]: leak of 'priv_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1518:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1659|               found = TRUE;
# 1660|               if (is_attribute_attr_array(attr->type)) {
# 1661|->                  cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,
# 1663|                                        attr->ulValueLen / sizeof(CK_ATTRIBUTE),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def686]
opencryptoki-3.26.0/usr/lib/common/template.c:1661:18: warning[-Wanalyzer-malloc-leak]: leak of 'token_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1659|               found = TRUE;
# 1660|               if (is_attribute_attr_array(attr->type)) {
# 1661|->                  cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,
# 1663|                                        attr->ulValueLen / sizeof(CK_ATTRIBUTE),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def687]
opencryptoki-3.26.0/usr/lib/common/template.c:1661:18: warning[-Wanalyzer-malloc-leak]: leak of 'unique_id_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1523:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1659|               found = TRUE;
# 1660|               if (is_attribute_attr_array(attr->type)) {
# 1661|->                  cleanse_and_free_attribute_array2(
# 1662|                                        (CK_ATTRIBUTE_PTR)attr->pValue,
# 1663|                                        attr->ulValueLen / sizeof(CK_ATTRIBUTE),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def688]
opencryptoki-3.26.0/usr/lib/common/template.c:1667:17: warning[-Wanalyzer-malloc-leak]: leak of 'copy_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1524:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1665|               }
# 1666|               if (attr->pValue != NULL)
# 1667|->                 OPENSSL_cleanse(attr->pValue, attr->ulValueLen);
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def689]
opencryptoki-3.26.0/usr/lib/common/template.c:1667:17: warning[-Wanalyzer-malloc-leak]: leak of 'destr_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1526:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch (when 'destr_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1536:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1665|               }
# 1666|               if (attr->pValue != NULL)
# 1667|->                 OPENSSL_cleanse(attr->pValue, attr->ulValueLen);
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def690]
opencryptoki-3.26.0/usr/lib/common/template.c:1667:17: warning[-Wanalyzer-malloc-leak]: leak of 'label_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1522:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1530:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1665|               }
# 1666|               if (attr->pValue != NULL)
# 1667|->                 OPENSSL_cleanse(attr->pValue, attr->ulValueLen);
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def691]
opencryptoki-3.26.0/usr/lib/common/template.c:1667:17: warning[-Wanalyzer-malloc-leak]: leak of 'mod_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1520:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1530:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1665|               }
# 1666|               if (attr->pValue != NULL)
# 1667|->                 OPENSSL_cleanse(attr->pValue, attr->ulValueLen);
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def692]
opencryptoki-3.26.0/usr/lib/common/template.c:1667:17: warning[-Wanalyzer-malloc-leak]: leak of 'priv_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1518:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1665|               }
# 1666|               if (attr->pValue != NULL)
# 1667|->                 OPENSSL_cleanse(attr->pValue, attr->ulValueLen);
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def693]
opencryptoki-3.26.0/usr/lib/common/template.c:1667:17: warning[-Wanalyzer-malloc-leak]: leak of 'token_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1665|               }
# 1666|               if (attr->pValue != NULL)
# 1667|->                 OPENSSL_cleanse(attr->pValue, attr->ulValueLen);
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def694]
opencryptoki-3.26.0/usr/lib/common/template.c:1667:17: warning[-Wanalyzer-malloc-leak]: leak of 'unique_id_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1523:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1665|               }
# 1666|               if (attr->pValue != NULL)
# 1667|->                 OPENSSL_cleanse(attr->pValue, attr->ulValueLen);
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def695]
opencryptoki-3.26.0/usr/lib/common/template.c:1670:17: warning[-Wanalyzer-malloc-leak]: leak of 'copy_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1524:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =
# 1670|->                 dlist_remove_node(tmpl->attribute_list, node);
# 1671|               break;
# 1672|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def696]
opencryptoki-3.26.0/usr/lib/common/template.c:1670:17: warning[-Wanalyzer-malloc-leak]: leak of 'destr_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1526:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch (when 'destr_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1536:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =
# 1670|->                 dlist_remove_node(tmpl->attribute_list, node);
# 1671|               break;
# 1672|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def697]
opencryptoki-3.26.0/usr/lib/common/template.c:1670:17: warning[-Wanalyzer-malloc-leak]: leak of 'label_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1522:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1530:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =
# 1670|->                 dlist_remove_node(tmpl->attribute_list, node);
# 1671|               break;
# 1672|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def698]
opencryptoki-3.26.0/usr/lib/common/template.c:1670:17: warning[-Wanalyzer-malloc-leak]: leak of 'mod_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1520:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1530:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =
# 1670|->                 dlist_remove_node(tmpl->attribute_list, node);
# 1671|               break;
# 1672|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def699]
opencryptoki-3.26.0/usr/lib/common/template.c:1670:17: warning[-Wanalyzer-malloc-leak]: leak of 'priv_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1518:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =
# 1670|->                 dlist_remove_node(tmpl->attribute_list, node);
# 1671|               break;
# 1672|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def700]
opencryptoki-3.26.0/usr/lib/common/template.c:1670:17: warning[-Wanalyzer-malloc-leak]: leak of 'token_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =
# 1670|->                 dlist_remove_node(tmpl->attribute_list, node);
# 1671|               break;
# 1672|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def701]
opencryptoki-3.26.0/usr/lib/common/template.c:1670:17: warning[-Wanalyzer-malloc-leak]: leak of 'unique_id_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1523:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1668|               free(attr);
# 1669|               tmpl->attribute_list =
# 1670|->                 dlist_remove_node(tmpl->attribute_list, node);
# 1671|               break;
# 1672|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def702]
opencryptoki-3.26.0/usr/lib/common/template.c:1692:9: warning[-Wanalyzer-malloc-leak]: leak of 'copy_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1524:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1690|   
# 1691|       if (!tmpl || !new_attr) {
# 1692|->         TRACE_ERROR("Invalid function arguments.\n");
# 1693|           return CKR_ARGUMENTS_BAD;
# 1694|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def703]
opencryptoki-3.26.0/usr/lib/common/template.c:1692:9: warning[-Wanalyzer-malloc-leak]: leak of 'destr_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1526:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch (when 'destr_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1536:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1690|   
# 1691|       if (!tmpl || !new_attr) {
# 1692|->         TRACE_ERROR("Invalid function arguments.\n");
# 1693|           return CKR_ARGUMENTS_BAD;
# 1694|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def704]
opencryptoki-3.26.0/usr/lib/common/template.c:1692:9: warning[-Wanalyzer-malloc-leak]: leak of 'label_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1522:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1530:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1690|   
# 1691|       if (!tmpl || !new_attr) {
# 1692|->         TRACE_ERROR("Invalid function arguments.\n");
# 1693|           return CKR_ARGUMENTS_BAD;
# 1694|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def705]
opencryptoki-3.26.0/usr/lib/common/template.c:1692:9: warning[-Wanalyzer-malloc-leak]: leak of 'mod_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1520:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1530:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1690|   
# 1691|       if (!tmpl || !new_attr) {
# 1692|->         TRACE_ERROR("Invalid function arguments.\n");
# 1693|           return CKR_ARGUMENTS_BAD;
# 1694|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def706]
opencryptoki-3.26.0/usr/lib/common/template.c:1692:9: warning[-Wanalyzer-malloc-leak]: leak of 'priv_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1518:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1690|   
# 1691|       if (!tmpl || !new_attr) {
# 1692|->         TRACE_ERROR("Invalid function arguments.\n");
# 1693|           return CKR_ARGUMENTS_BAD;
# 1694|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def707]
opencryptoki-3.26.0/usr/lib/common/template.c:1692:9: warning[-Wanalyzer-malloc-leak]: leak of 'token_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1690|   
# 1691|       if (!tmpl || !new_attr) {
# 1692|->         TRACE_ERROR("Invalid function arguments.\n");
# 1693|           return CKR_ARGUMENTS_BAD;
# 1694|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def708]
opencryptoki-3.26.0/usr/lib/common/template.c:1692:9: warning[-Wanalyzer-malloc-leak]: leak of 'unique_id_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1523:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1690|   
# 1691|       if (!tmpl || !new_attr) {
# 1692|->         TRACE_ERROR("Invalid function arguments.\n");
# 1693|           return CKR_ARGUMENTS_BAD;
# 1694|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def709]
opencryptoki-3.26.0/usr/lib/common/template.c:1705:12: warning[-Wanalyzer-malloc-leak]: leak of 'a2'
opencryptoki-3.26.0/usr/lib/common/template.c:996:7: enter_function: entry to 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1012:8: branch_false: following 'false' branch (when 'new_tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1017:8: branch_false: following 'false' branch (when 'tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1021:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1142:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1149:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1150:16: branch_false: following 'false' branch (when 'a2' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1155:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1158:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1158:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1173:23: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1189:46: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: call_function: calling 'template_update_attribute' from 'template_unflatten_withSize'
# 1703|   
# 1704|       /* add the new attribute */
# 1705|->     list = dlist_add_as_first(tmpl->attribute_list, new_attr);
# 1706|       if (list == NULL) {
# 1707|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def710]
opencryptoki-3.26.0/usr/lib/common/template.c:1705:12: warning[-Wanalyzer-malloc-leak]: leak of 'copy_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1524:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1703|   
# 1704|       /* add the new attribute */
# 1705|->     list = dlist_add_as_first(tmpl->attribute_list, new_attr);
# 1706|       if (list == NULL) {
# 1707|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def711]
opencryptoki-3.26.0/usr/lib/common/template.c:1705:12: warning[-Wanalyzer-malloc-leak]: leak of 'destr_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1526:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch (when 'destr_attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1536:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1703|   
# 1704|       /* add the new attribute */
# 1705|->     list = dlist_add_as_first(tmpl->attribute_list, new_attr);
# 1706|       if (list == NULL) {
# 1707|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def712]
opencryptoki-3.26.0/usr/lib/common/template.c:1705:12: warning[-Wanalyzer-malloc-leak]: leak of 'label_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1522:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1530:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1703|   
# 1704|       /* add the new attribute */
# 1705|->     list = dlist_add_as_first(tmpl->attribute_list, new_attr);
# 1706|       if (list == NULL) {
# 1707|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def713]
opencryptoki-3.26.0/usr/lib/common/template.c:1705:12: warning[-Wanalyzer-malloc-leak]: leak of 'mod_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1520:33: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:38: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1530:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1703|   
# 1704|       /* add the new attribute */
# 1705|->     list = dlist_add_as_first(tmpl->attribute_list, new_attr);
# 1706|       if (list == NULL) {
# 1707|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def714]
opencryptoki-3.26.0/usr/lib/common/template.c:1705:12: warning[-Wanalyzer-malloc-leak]: leak of 'priv_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1518:34: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1703|   
# 1704|       /* add the new attribute */
# 1705|->     list = dlist_add_as_first(tmpl->attribute_list, new_attr);
# 1706|       if (list == NULL) {
# 1707|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def715]
opencryptoki-3.26.0/usr/lib/common/template.c:1705:12: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:996:7: enter_function: entry to 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1012:8: branch_false: following 'false' branch (when 'new_tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1017:8: branch_false: following 'false' branch (when 'tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1021:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1142:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1150:16: branch_false: following 'false' branch (when 'a2' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1155:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1158:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1158:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1173:23: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1189:46: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: call_function: calling 'template_update_attribute' from 'template_unflatten_withSize'
# 1703|   
# 1704|       /* add the new attribute */
# 1705|->     list = dlist_add_as_first(tmpl->attribute_list, new_attr);
# 1706|       if (list == NULL) {
# 1707|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def716]
opencryptoki-3.26.0/usr/lib/common/template.c:1705:12: warning[-Wanalyzer-malloc-leak]: leak of 'token_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1703|   
# 1704|       /* add the new attribute */
# 1705|->     list = dlist_add_as_first(tmpl->attribute_list, new_attr);
# 1706|       if (list == NULL) {
# 1707|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def717]
opencryptoki-3.26.0/usr/lib/common/template.c:1705:12: warning[-Wanalyzer-malloc-leak]: leak of 'unique_id_attr'
opencryptoki-3.26.0/usr/lib/common/template.c:1500:7: enter_function: entry to 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: call_function: calling 'get_unique_id_str' from 'template_set_default_common_attributes'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:9: return_function: returning to 'template_set_default_common_attributes' from 'get_unique_id_str'
opencryptoki-3.26.0/usr/lib/common/template.c:1512:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1516:35: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1523:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1529:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1529:9: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1570:10: call_function: calling 'template_update_attribute' from 'template_set_default_common_attributes'
# 1703|   
# 1704|       /* add the new attribute */
# 1705|->     list = dlist_add_as_first(tmpl->attribute_list, new_attr);
# 1706|       if (list == NULL) {
# 1707|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def718]
opencryptoki-3.26.0/usr/lib/common/template.c:1707:9: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
opencryptoki-3.26.0/usr/lib/common/template.c:996:7: enter_function: entry to 'template_unflatten_withSize'
opencryptoki-3.26.0/usr/lib/common/template.c:1012:8: branch_false: following 'false' branch (when 'new_tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1016:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/template.c:1017:8: branch_false: following 'false' branch (when 'tmpl' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1021:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1024:17: branch_true: following 'true' branch (when 'i < count')...
opencryptoki-3.26.0/usr/lib/common/template.c:1098:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1106:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1142:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1150:16: branch_false: following 'false' branch (when 'a2' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/template.c:1155:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1158:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1158:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1173:23: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/template.c:1189:46: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/template.c:1193:14: call_function: calling 'template_update_attribute' from 'template_unflatten_withSize'
# 1705|       list = dlist_add_as_first(tmpl->attribute_list, new_attr);
# 1706|       if (list == NULL) {
# 1707|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1708|           return CKR_HOST_MEMORY;
# 1709|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def719]
opencryptoki-3.26.0/usr/lib/common/utility.c:484:13: warning[-Wanalyzer-malloc-leak]: leak of 'attr'
opencryptoki-3.26.0/usr/lib/common/utility.c:474:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/utility.c:475:8: branch_false: following 'false' branch (when 'attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/utility.c:479:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/utility.c:482:8: branch_true: following 'true' branch (when 'data_len != 0')...
opencryptoki-3.26.0/usr/lib/common/utility.c:483:24: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/utility.c:484:13: throw: if 'is_attribute_attr_array' throws an exception...
opencryptoki-3.26.0/usr/lib/common/utility.c:484:13: danger: 'attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  482|       if (data_len > 0) {
#  483|           attr->pValue = (CK_BYTE *) attr + sizeof(CK_ATTRIBUTE);
#  484|->         if (is_attribute_attr_array(type)) {
#  485|               rc = dup_attribute_array_no_alloc((CK_ATTRIBUTE_PTR)data,
#  486|                                                  data_len / sizeof(CK_ATTRIBUTE),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def720]
opencryptoki-3.26.0/usr/lib/common/utility.c:485:18: warning[-Wanalyzer-malloc-leak]: leak of 'attr'
opencryptoki-3.26.0/usr/lib/common/utility.c:474:29: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/utility.c:475:8: branch_false: following 'false' branch (when 'attr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/utility.c:479:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/utility.c:482:8: branch_true: following 'true' branch (when 'data_len != 0')...
opencryptoki-3.26.0/usr/lib/common/utility.c:483:24: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/utility.c:484:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/utility.c:487:66: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/utility.c:485:18: throw: if 'dup_attribute_array_no_alloc' throws an exception...
opencryptoki-3.26.0/usr/lib/common/utility.c:485:18: danger: 'attr' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  483|           attr->pValue = (CK_BYTE *) attr + sizeof(CK_ATTRIBUTE);
#  484|           if (is_attribute_attr_array(type)) {
#  485|->             rc = dup_attribute_array_no_alloc((CK_ATTRIBUTE_PTR)data,
#  486|                                                  data_len / sizeof(CK_ATTRIBUTE),
#  487|                                                  (CK_ATTRIBUTE_PTR)attr->pValue);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def721]
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:889:18: warning[-Wanalyzer-malloc-leak]: leak of 'ptr'
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:49:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:53:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:53:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:59:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:60:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:67:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:82:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:97:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:97:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:103:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:103:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:113:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:423:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:429:50: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:431:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:436:14: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:438:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:443:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:458:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:876:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:876:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:877:27: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:878:12: branch_false: following 'false' branch (when 'ptr' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:883:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:886:9: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:888:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:889:18: throw: if 'ibm_ml_dsa_dup_param' throws an exception...
opencryptoki-3.26.0/usr/lib/common/verify_mgr.c:889:18: danger: 'ptr' leaks here; was allocated at [(23)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/22)
#  887|           {
#  888|           case CKM_IBM_ML_DSA:
#  889|->             rc = ibm_ml_dsa_dup_param(mech->pParameter, ptr,
#  890|                                         mech->ulParameterLen);
#  891|               if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def722]
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1755:54: warning[-Wanalyzer-malloc-leak]: leak of 'configalloc(64, yyscanner)'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1742:21: enter_function: entry to 'config_create_buffer'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1746:24: call_function: calling 'configalloc' from 'config_create_buffer'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1746:24: return_function: returning to 'config_create_buffer' from 'configalloc'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1747:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1750:2: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1755:54: danger: 'configalloc(64, yyscanner)' leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
# 1753|   	/* yy_ch_buf has to be 2 characters longer than the size given because
# 1754|   	 * we need to put in 2 end-of-buffer characters.
# 1755|-> 	 */
# 1756|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 1757|   	if ( ! b->yy_ch_buf )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def723]
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1755:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1742:21: enter_function: entry to ‘config_create_buffer’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1746:24: call_function: inlined call to ‘configalloc’ from ‘config_create_buffer’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1747:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1750:2: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1755:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1753|   	/* yy_ch_buf has to be 2 characters longer than the size given because
# 1754|   	 * we need to put in 2 end-of-buffer characters.
# 1755|-> 	 */
# 1756|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 1757|   	if ( ! b->yy_ch_buf )

Error: GCC_ANALYZER_WARNING (CWE-476): [#def724]
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1798:2: warning[-Wanalyzer-null-dereference]: dereference of NULL 'b'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1677:10: enter_function: entry to 'configrestart'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1682:16: call_function: calling 'configensure_buffer_stack' from 'configrestart'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1682:16: return_function: returning to 'configrestart' from 'configensure_buffer_stack'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1684:27: call_function: calling 'config_create_buffer' from 'configrestart'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1684:27: return_function: returning to 'configrestart' from 'config_create_buffer'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1687:2: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1687:2: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1687:2: call_function: calling 'config_init_buffer' from 'configrestart'
# 1796|   
# 1797|   	yy_flush_buffer( b , yyscanner);
# 1798|-> 
# 1799|   	b->yy_input_file = file;
# 1800|   	b->yy_fill_buffer = 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def725]
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1798:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1677:10: enter_function: entry to ‘configrestart’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1682:16: call_function: calling ‘configensure_buffer_stack’ from ‘configrestart’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1682:16: return_function: returning to ‘configrestart’ from ‘configensure_buffer_stack’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1684:27: call_function: calling ‘config_create_buffer’ from ‘configrestart’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1684:27: return_function: returning to ‘configrestart’ from ‘config_create_buffer’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1687:2: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1687:2: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1687:2: call_function: calling ‘config_init_buffer’ from ‘configrestart’
# 1796|   
# 1797|   	yy_flush_buffer( b , yyscanner);
# 1798|-> 
# 1799|   	b->yy_input_file = file;
# 1800|   	b->yy_fill_buffer = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def726]
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2016:26: warning[-Wanalyzer-malloc-leak]: leak of 'configalloc(n,  yyscanner)'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2000:17: enter_function: entry to 'config_scan_bytes'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2009:24: call_function: calling 'configalloc' from 'config_scan_bytes'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2009:24: return_function: returning to 'config_scan_bytes' from 'configalloc'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2010:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2010:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2018:6: call_function: calling 'config_scan_buffer' from 'config_scan_bytes'
# 2014|   	for ( i = 0; i < _yybytes_len; ++i )
# 2015|   		buf[i] = yybytes[i];
# 2016|-> 
# 2017|   	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 2018|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def727]
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2016:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2000:17: enter_function: entry to ‘config_scan_bytes’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2009:24: call_function: inlined call to ‘configalloc’ from ‘config_scan_bytes’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2010:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2010:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2018:6: call_function: calling ‘config_scan_buffer’ from ‘config_scan_bytes’
# 2014|   	for ( i = 0; i < _yybytes_len; ++i )
# 2015|   		buf[i] = yybytes[i];
# 2016|-> 
# 2017|   	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 2018|   

Error: COMPILER_WARNING: [#def728]
opencryptoki-3.26.0/usr/lib/config/cfgparse.c: scope_hint: In function 'configparse'
opencryptoki-3.26.0/usr/lib/config/cfgparse.c:74:25: warning[-Wunused-but-set-variable=]: variable 'confignerrs' set but not used
#   74 | #define yynerrs         confignerrs
#      |                         ^~~~~~~~~~~
opencryptoki-3.26.0/usr/lib/config/cfgparse.c:1558:9: note: in expansion of macro 'yynerrs'
# 1558 |     int yynerrs = 0;
#      |         ^~~~~~~
#   72|   #define yyerror         configerror
#   73|   #define yydebug         configdebug
#   74|-> #define yynerrs         confignerrs
#   75|   
#   76|   /* First part of user prologue.  */

Error: COMPILER_WARNING: [#def729]
opencryptoki-3.26.0/usr/lib/config/cfgparse.c: scope_hint: In function ‘configparse’
opencryptoki-3.26.0/usr/lib/config/cfgparse.c:74:25: warning[-Wunused-but-set-variable=]: variable ‘confignerrs’ set but not used
#   74 | #define yynerrs         confignerrs
#      |                         ^~~~~~~~~~~
opencryptoki-3.26.0/usr/lib/config/cfgparse.c:1558:9: note: in expansion of macro ‘yynerrs’
# 1558 |     int yynerrs = 0;
#      |         ^~~~~~~
#   72|   #define yyerror         configerror
#   73|   #define yydebug         configdebug
#   74|-> #define yynerrs         confignerrs
#   75|   
#   76|   /* First part of user prologue.  */

Error: GCC_ANALYZER_WARNING (CWE-457): [#def730]
opencryptoki-3.26.0/usr/lib/config/cfgparse.c:1688:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'yyss'
opencryptoki-3.26.0/usr/lib/config/cfgparse.y:333:5: enter_function: entry to 'parse_configlib_file'
opencryptoki-3.26.0/usr/lib/config/cfgparse.y:341:11: call_function: calling 'configparse' from 'parse_configlib_file'
# 1686|           if (! yyptr)
# 1687|             YYNOMEM;
# 1688|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1689|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1690|           YYSTACK_RELOCATE (yyls_alloc, yyls);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def731]
opencryptoki-3.26.0/usr/lib/config/cfgparse.c:1688:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
opencryptoki-3.26.0/usr/lib/config/cfgparse.y:333:5: enter_function: entry to ‘parse_configlib_file’
opencryptoki-3.26.0/usr/lib/config/cfgparse.y:341:11: call_function: calling ‘configparse’ from ‘parse_configlib_file’
# 1686|           if (! yyptr)
# 1687|             YYNOMEM;
# 1688|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1689|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1690|           YYSTACK_RELOCATE (yyls_alloc, yyls);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def732]
opencryptoki-3.26.0/usr/lib/config/configuration.h:577:43: warning[-Wanalyzer-malloc-leak]: leak of 'confignode_alloceoc(cmt,  line)'
opencryptoki-3.26.0/usr/lib/config/configuration.c:793:1: enter_function: entry to 'confignode_allocbarestringconstdumpable'
opencryptoki-3.26.0/usr/lib/config/configuration.c:799:8: branch_false: following 'false' branch (when 'comment' is NULL)...
opencryptoki-3.26.0/usr/lib/config/configuration.c:804:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/configuration.c:804:11: call_function: calling 'confignode_allocbarestringconst' from 'confignode_allocbarestringconstdumpable'
opencryptoki-3.26.0/usr/lib/config/configuration.c:804:11: return_function: returning to 'confignode_allocbarestringconstdumpable' from 'confignode_allocbarestringconst'
opencryptoki-3.26.0/usr/lib/config/configuration.c:805:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/config/configuration.c:806:15: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/config/configuration.c:806:15: call_function: calling 'confignode_alloceoc' from 'confignode_allocbarestringconstdumpable'
opencryptoki-3.26.0/usr/lib/config/configuration.c:806:15: return_function: returning to 'confignode_allocbarestringconstdumpable' from 'confignode_alloceoc'
opencryptoki-3.26.0/usr/lib/config/configuration.c:807:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/config/configuration.c:808:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/config/configuration.h:577:43: danger: 'confignode_alloceoc(cmt,  line)' leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  575|   
#  576|       if (res) {
#  577|->         res->base.next = res->base.prev = &(res->base);
#  578|           res->base.key = comment;
#  579|           res->base.type = CT_EOC;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def733]
opencryptoki-3.26.0/usr/lib/config/configuration.h:577:43: warning[-Wanalyzer-malloc-leak]: leak of ‘confignode_alloceoc(0, 0)’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:139:12: enter_function: entry to ‘add_token_config’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:146:12: call_function: calling ‘confignode_alloceoc’ from ‘add_token_config’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:146:12: return_function: returning to ‘add_token_config’ from ‘confignode_alloceoc’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:147:12: call_function: calling ‘confignode_alloceoc’ from ‘add_token_config’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:147:12: return_function: returning to ‘add_token_config’ from ‘confignode_alloceoc’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:148:9: throw: if ‘confignode_allocidxstructdumpable’ throws an exception...
opencryptoki-3.26.0/usr/lib/config/configuration.h:577:43: danger: ‘confignode_alloceoc(0, 0)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  575|   
#  576|       if (res) {
#  577|->         res->base.next = res->base.prev = &(res->base);
#  578|           res->base.key = comment;
#  579|           res->base.type = CT_EOC;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def734]
opencryptoki-3.26.0/usr/lib/config/configuration.h:577:43: warning[-Wanalyzer-malloc-leak]: leak of ‘confignode_alloceoc(cmt,  line)’
opencryptoki-3.26.0/usr/lib/config/configuration.c:793:1: enter_function: entry to ‘confignode_allocbarestringconstdumpable’
opencryptoki-3.26.0/usr/lib/config/configuration.c:799:8: branch_false: following ‘false’ branch (when ‘comment’ is NULL)...
opencryptoki-3.26.0/usr/lib/config/configuration.c:804:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/configuration.c:804:11: call_function: calling ‘confignode_allocbarestringconst’ from ‘confignode_allocbarestringconstdumpable’
opencryptoki-3.26.0/usr/lib/config/configuration.c:804:11: return_function: returning to ‘confignode_allocbarestringconstdumpable’ from ‘confignode_allocbarestringconst’
opencryptoki-3.26.0/usr/lib/config/configuration.c:805:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/config/configuration.c:806:15: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/config/configuration.c:806:15: call_function: calling ‘confignode_alloceoc’ from ‘confignode_allocbarestringconstdumpable’
opencryptoki-3.26.0/usr/lib/config/configuration.c:806:15: return_function: returning to ‘confignode_allocbarestringconstdumpable’ from ‘confignode_alloceoc’
opencryptoki-3.26.0/usr/lib/config/configuration.c:807:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/config/configuration.c:808:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/config/configuration.h:577:43: danger: ‘confignode_alloceoc(cmt,  line)’ leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  575|   
#  576|       if (res) {
#  577|->         res->base.next = res->base.prev = &(res->base);
#  578|           res->base.key = comment;
#  579|           res->base.type = CT_EOC;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def735]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:160:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:635:7: enter_function: entry to ‘hsm_mk_change_op_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:643:10: call_function: calling ‘hsm_mk_change_info_flatten’ from ‘hsm_mk_change_op_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:643:10: return_function: returning to ‘hsm_mk_change_op_save’ from ‘hsm_mk_change_info_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:644:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:647:49: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:654:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:655:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:660:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:666:10: call_function: calling ‘hsm_mk_change_info_flatten’ from ‘hsm_mk_change_op_save’
#  158|       *buff_len = len;
#  159|   
#  160|->     TRACE_DEBUG("Num APQNs: %u\n", num_apqns);
#  161|   
#  162|       *((uint32_t *)buff) = htobe32(num_apqns);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def736]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:166:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:635:7: enter_function: entry to ‘hsm_mk_change_op_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:643:10: call_function: calling ‘hsm_mk_change_info_flatten’ from ‘hsm_mk_change_op_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:643:10: return_function: returning to ‘hsm_mk_change_op_save’ from ‘hsm_mk_change_info_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:644:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:647:49: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:654:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:655:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:660:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:666:10: call_function: calling ‘hsm_mk_change_info_flatten’ from ‘hsm_mk_change_op_save’
#  164|   
#  165|       for (i = 0; i < num_apqns; i++) {
#  166|->         TRACE_DEBUG("APQN %d: %02x.%04x\n", i, apqns[i].card, apqns[i].domain);
#  167|   
#  168|           apqn = (struct apqn *)buff;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def737]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:186:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:698:7: enter_function: entry to ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: return_function: returning to ‘hsm_mk_change_op_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:710:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:719:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:720:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:721:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:734:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:741:10: call_function: calling ‘hsm_mk_change_info_unflatten’ from ‘hsm_mk_change_op_load’
#  184|   
#  185|       if (buff_len < sizeof(uint32_t)) {
#  186|->         TRACE_ERROR("buffer too small\n");
#  187|           return CKR_BUFFER_TOO_SMALL;
#  188|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def738]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:194:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:698:7: enter_function: entry to ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: return_function: returning to ‘hsm_mk_change_op_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:710:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:719:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:720:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:721:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:734:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:741:10: call_function: calling ‘hsm_mk_change_info_unflatten’ from ‘hsm_mk_change_op_load’
#  192|       *bytes_read = sizeof(uint32_t);
#  193|   
#  194|->     TRACE_DEBUG("Num APQNs: %u\n", *num_apqns);
#  195|   
#  196|       if (*num_apqns > 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def739]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:199:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:698:7: enter_function: entry to ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: return_function: returning to ‘hsm_mk_change_op_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:710:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:719:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:720:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:721:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:734:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:741:10: call_function: calling ‘hsm_mk_change_info_unflatten’ from ‘hsm_mk_change_op_load’
#  197|           *apqns = calloc(*num_apqns, sizeof(struct apqn));
#  198|           if (*apqns == NULL) {
#  199|->             TRACE_ERROR("malloc failed\n");
#  200|               *num_apqns = 0;
#  201|               return CKR_HOST_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def740]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:206:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:698:7: enter_function: entry to ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: return_function: returning to ‘hsm_mk_change_op_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:710:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:719:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:720:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:721:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:734:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:741:10: call_function: calling ‘hsm_mk_change_info_unflatten’ from ‘hsm_mk_change_op_load’
#  204|   
#  205|       if (buff_len < sizeof(uint32_t) + *num_apqns * sizeof(struct apqn)) {
#  206|->         TRACE_ERROR("buffer too small\n");
#  207|           rc = CKR_BUFFER_TOO_SMALL;
#  208|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def741]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:214:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:941:7: enter_function: entry to 'hsm_mk_change_op_iterate'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:952:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:952:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:958:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:959:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:964:14: call_function: calling 'hsm_mk_change_op_load' from 'hsm_mk_change_op_iterate'
#  212|           apqn = (struct apqn *)buff;
#  213|   
#  214|->         (*apqns)[i].card = be16toh(apqn->card);
#  215|           (*apqns)[i].domain = be16toh(apqn->domain);
#  216|           buff += sizeof(struct apqn);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def742]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:219:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:698:7: enter_function: entry to ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: return_function: returning to ‘hsm_mk_change_op_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:710:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:719:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:720:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:721:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:734:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:741:10: call_function: calling ‘hsm_mk_change_info_unflatten’ from ‘hsm_mk_change_op_load’
#  217|           *bytes_read += sizeof(struct apqn);
#  218|   
#  219|->         TRACE_DEBUG("APQN %d: %02x.%04x\n", i, (*apqns)[i].card,
#  220|                       (*apqns)[i].domain);
#  221|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def743]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:275:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:635:7: enter_function: entry to ‘hsm_mk_change_op_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:643:10: call_function: calling ‘hsm_mk_change_info_flatten’ from ‘hsm_mk_change_op_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:643:10: return_function: returning to ‘hsm_mk_change_op_save’ from ‘hsm_mk_change_info_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:644:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:647:49: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:654:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:655:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:660:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:666:10: call_function: calling ‘hsm_mk_change_info_flatten’ from ‘hsm_mk_change_op_save’
#  273|   
#  274|       if (*buff_len < len) {
#  275|->         TRACE_ERROR("buffer too small\n");
#  276|           return CKR_BUFFER_TOO_SMALL;
#  277|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def744]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:281:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:800:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:810:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:814:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
#  279|       *buff_len = len;
#  280|   
#  281|->     TRACE_DEBUG("Num MKVPs: %u\n", num_mkvps);
#  282|   
#  283|       *((uint32_t *)buff) = htobe32(num_mkvps);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def745]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:287:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:800:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:810:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:814:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
#  285|   
#  286|       for (i = 0; i < num_mkvps; i++) {
#  287|->         TRACE_DEBUG("MKVP %d: type: %d len %u\n", i, mkvps[i].type,
#  288|                       mkvps[i].mkvp_len);
#  289|           TRACE_DEBUG_DUMP("MKVP: ", mkvps[i].mkvp, mkvps[i].mkvp_len);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def746]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:312:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:844:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: return_function: returning to ‘hsm_mk_change_token_mkvps_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:855:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:864:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:865:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:866:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:872:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:872:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:878:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:878:10: call_function: calling ‘hsm_mk_change_mkvps_unflatten’ from ‘hsm_mk_change_token_mkvps_load’
#  310|   
#  311|       if (buff_len < sizeof(uint32_t)) {
#  312|->         TRACE_ERROR("buffer too small\n");
#  313|           return CKR_BUFFER_TOO_SMALL;
#  314|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def747]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:321:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:844:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: return_function: returning to ‘hsm_mk_change_token_mkvps_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:855:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:864:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:865:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:866:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:872:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:872:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:878:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:878:10: call_function: calling ‘hsm_mk_change_mkvps_unflatten’ from ‘hsm_mk_change_token_mkvps_load’
#  319|       *bytes_read = sizeof(uint32_t);
#  320|   
#  321|->     TRACE_DEBUG("Num MKVPs: %u\n", *num_mkvps);
#  322|   
#  323|       if (*num_mkvps > 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def748]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:326:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:844:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: return_function: returning to ‘hsm_mk_change_token_mkvps_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:855:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:864:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:865:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:866:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:872:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:872:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:878:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:878:10: call_function: calling ‘hsm_mk_change_mkvps_unflatten’ from ‘hsm_mk_change_token_mkvps_load’
#  324|           *mkvps = calloc(*num_mkvps, sizeof(struct hsm_mkvp));
#  325|           if (*mkvps == NULL) {
#  326|->             TRACE_ERROR("malloc failed\n");
#  327|               *num_mkvps = 0;
#  328|               return CKR_HOST_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def749]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:334:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:844:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: return_function: returning to ‘hsm_mk_change_token_mkvps_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:855:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:864:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:865:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:866:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:872:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:872:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:878:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:878:10: call_function: calling ‘hsm_mk_change_mkvps_unflatten’ from ‘hsm_mk_change_token_mkvps_load’
#  332|       for (i = 0; i < *num_mkvps; i++) {
#  333|           if (buff_len < sizeof(struct hsm_mkvp_hdr)) {
#  334|->             TRACE_ERROR("buffer too small\n");
#  335|               rc = CKR_BUFFER_TOO_SMALL;
#  336|               goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def750]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:364:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:844:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: return_function: returning to ‘hsm_mk_change_token_mkvps_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:855:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:864:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:865:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:866:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:872:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:872:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:878:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:878:10: call_function: calling ‘hsm_mk_change_mkvps_unflatten’ from ‘hsm_mk_change_token_mkvps_load’
#  362|           *bytes_read += (*mkvps)[i].mkvp_len;
#  363|   
#  364|->         TRACE_DEBUG("MKVP %d: type: %d len %u\n", i, (*mkvps)[i].type,
#  365|                       (*mkvps)[i].mkvp_len);
#  366|           TRACE_DEBUG_DUMP("MKVP: ", (*mkvps)[i].mkvp, (*mkvps)[i].mkvp_len);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def751]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:436:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:635:7: enter_function: entry to ‘hsm_mk_change_op_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:643:10: call_function: calling ‘hsm_mk_change_info_flatten’ from ‘hsm_mk_change_op_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:643:10: return_function: returning to ‘hsm_mk_change_op_save’ from ‘hsm_mk_change_info_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:644:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:647:49: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:654:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:655:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:660:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:666:10: call_function: calling ‘hsm_mk_change_info_flatten’ from ‘hsm_mk_change_op_save’
#  434|   
#  435|       if (*buff_len < apqns_len + mkvps_len) {
#  436|->         TRACE_ERROR("buffer too small\n");
#  437|           return CKR_BUFFER_TOO_SMALL;
#  438|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def752]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:588:11: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:800:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:810:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:814:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:820:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:824:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:829:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:829:5: call_function: calling ‘hsm_mk_change_op_set_perm’ from ‘hsm_mk_change_token_mkvps_save’
#  586|       fchmod(file, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
#  587|   
#  588|->     grp = getgrnam(PKCS_GROUP); // Obtain the group id
#  589|       if (grp) {
#  590|           // set ownership to pkcs11 group

Error: GCC_ANALYZER_WARNING (CWE-401): [#def753]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:601:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:800:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:810:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:814:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:820:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:824:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:829:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:829:5: call_function: calling ‘hsm_mk_change_op_set_perm’ from ‘hsm_mk_change_token_mkvps_save’
#  599|   
#  600|   error:
#  601|->     TRACE_DEVEL("Unable to set permissions on file.\n");
#  602|   }
#  603|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def754]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:613:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:800:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:810:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:814:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:820:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_save’
#  611|           if (ock_snprintf(hsm_mk_change_file, PATH_MAX, "%s/%s-%lu",
#  612|                            OCK_HSM_MK_CHANGE_PATH, id, slot_id) != 0) {
#  613|->             TRACE_ERROR("HSM_MK_CHANGE directory path buffer overflow\n");
#  614|               return NULL;
#  615|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def755]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:619:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:800:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:810:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:814:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:820:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_save’
#  617|           if (ock_snprintf(hsm_mk_change_file, PATH_MAX, "%s/%s",
#  618|                            OCK_HSM_MK_CHANGE_PATH, id) != 0) {
#  619|->             TRACE_ERROR("HSM_MK_CHANGE directory path buffer overflow\n");
#  620|               return NULL;
#  621|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def756]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:624:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:800:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:810:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:814:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:820:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_save’
#  622|       }
#  623|   
#  624|->     TRACE_DEVEL("file to open: %s mode: %s\n", hsm_mk_change_file, mode);
#  625|   
#  626|       fp = fopen(hsm_mk_change_file, mode);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def757]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:628:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:800:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:810:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:814:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:820:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_save’
#  626|       fp = fopen(hsm_mk_change_file, mode);
#  627|       if (fp == NULL) {
#  628|->         TRACE_ERROR("%s fopen(%s, %s): %s\n", __func__,
#  629|                           hsm_mk_change_file, mode, strerror(errno));
#  630|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def758]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:660:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:635:7: enter_function: entry to ‘hsm_mk_change_op_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:643:10: call_function: calling ‘hsm_mk_change_info_flatten’ from ‘hsm_mk_change_op_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:643:10: return_function: returning to ‘hsm_mk_change_op_save’ from ‘hsm_mk_change_info_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:644:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:647:49: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:654:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:655:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:660:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:660:5: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:660:5: danger: ‘buff’ leaks here; was allocated at [(16)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/15)
#  658|       }
#  659|   
#  660|->     TRACE_DEBUG("Id: %s\n", op->id);
#  661|       TRACE_DEBUG("State: %d\n", op->state);
#  662|       op_hdr = (struct hsm_mk_change_op_hdr *)buff;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def759]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:661:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:635:7: enter_function: entry to ‘hsm_mk_change_op_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:643:10: call_function: calling ‘hsm_mk_change_info_flatten’ from ‘hsm_mk_change_op_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:643:10: return_function: returning to ‘hsm_mk_change_op_save’ from ‘hsm_mk_change_info_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:644:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:647:49: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:654:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:655:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:660:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:661:5: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:661:5: danger: ‘buff’ leaks here; was allocated at [(16)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/15)
#  659|   
#  660|       TRACE_DEBUG("Id: %s\n", op->id);
#  661|->     TRACE_DEBUG("State: %d\n", op->state);
#  662|       op_hdr = (struct hsm_mk_change_op_hdr *)buff;
#  663|       memcpy(op_hdr->id, op->id, sizeof(op_hdr->id));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def760]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:728:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:698:7: enter_function: entry to ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: return_function: returning to ‘hsm_mk_change_op_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:710:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:719:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:720:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:721:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:728:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:728:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:728:9: danger: ‘buff’ leaks here; was allocated at [(15)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/14)
#  726|   
#  727|       if (fread(buff, len, 1, fp) != 1) {
#  728|->         TRACE_ERROR("fread(%s): %s\n", op->id, strerror(errno));
#  729|           rc = CKR_FUNCTION_FAILED;
#  730|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def761]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:738:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:698:7: enter_function: entry to ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: return_function: returning to ‘hsm_mk_change_op_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:710:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:719:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:720:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:721:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:734:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:738:5: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:738:5: danger: ‘buff’ leaks here; was allocated at [(15)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/14)
#  736|       len -= sizeof(*op_hdr);
#  737|   
#  738|->     TRACE_DEBUG("Id: %s\n", op->id);
#  739|       TRACE_DEBUG("State: %d\n", op->state);
#  740|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def762]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:739:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:698:7: enter_function: entry to ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_op_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:709:10: return_function: returning to ‘hsm_mk_change_op_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:710:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:713:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:719:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:720:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:721:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:727:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:734:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:739:5: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:739:5: danger: ‘buff’ leaks here; was allocated at [(15)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/14)
#  737|   
#  738|       TRACE_DEBUG("Id: %s\n", op->id);
#  739|->     TRACE_DEBUG("State: %d\n", op->state);
#  740|   
#  741|       rc = hsm_mk_change_info_unflatten(buff + sizeof(*op_hdr), len, &info_read,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def763]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:832:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:800:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:809:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:810:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:813:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:814:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: call_function: calling ‘hsm_mk_change_mkvps_flatten’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:819:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_mkvps_flatten’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:820:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_save’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:823:10: return_function: returning to ‘hsm_mk_change_token_mkvps_save’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:824:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:829:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:831:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:832:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:832:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:832:9: danger: ‘buff’ leaks here; was allocated at [(9)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/8)
#  830|   
#  831|       if (fwrite(buff, len, 1, fp) != 1) {
#  832|->         TRACE_ERROR("fwrite(%s-%lu): %s\n", id, slot_id, strerror(errno));
#  833|           rc = CKR_FUNCTION_FAILED;
#  834|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def764]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:873:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buff’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:844:7: enter_function: entry to ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: call_function: calling ‘hsm_mk_change_op_open’ from ‘hsm_mk_change_token_mkvps_load’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:854:10: return_function: returning to ‘hsm_mk_change_token_mkvps_load’ from ‘hsm_mk_change_op_open’
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:855:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:858:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:864:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:865:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:866:8: branch_false: following ‘false’ branch (when ‘buff’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:872:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:872:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:873:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:873:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:873:9: danger: ‘buff’ leaks here; was allocated at [(13)](sarif:/runs/0/results/72/codeFlows/0/threadFlows/0/locations/12)
#  871|   
#  872|       if (fread(buff, len, 1, fp) != 1) {
#  873|->         TRACE_ERROR("fread(%s-%lu): %s\n", id, slot_id, strerror(errno));
#  874|           rc = CKR_FUNCTION_FAILED;
#  875|           goto out;

Error: CPPCHECK_WARNING (CWE-476): [#def765]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:143: error[ctunullpointer]: Null pointer dereference: orig
#  141|   static void strpad(char *dest, const char *orig, size_t len, int padding_char)
#  142|   {
#  143|->     size_t str_len = strlen(orig);
#  144|   
#  145|       UNUSED(padding_char);

Error: CPPCHECK_WARNING (CWE-476): [#def766]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:143: warning[nullPointer]: Possible null pointer dereference: orig
#  141|   static void strpad(char *dest, const char *orig, size_t len, int padding_char)
#  142|   {
#  143|->     size_t str_len = strlen(orig);
#  144|   
#  145|       UNUSED(padding_char);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def767]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: warning[-Wanalyzer-malloc-leak]: leak of 'attr_set'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following 'false' branch (when 'attr_set' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: throw: if 'ber_scanf' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: danger: 'attr_set' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 2173|       }
# 2174|   
# 2175|->     if (ber_scanf(berbuf, "{{") == LBER_ERROR)
# 2176|           goto decode_error;
# 2177|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def768]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attr_set’
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following ‘false’ branch (when ‘attr_set’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: throw: if ‘ber_scanf’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: danger: ‘attr_set’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 2173|       }
# 2174|   
# 2175|->     if (ber_scanf(berbuf, "{{") == LBER_ERROR)
# 2176|           goto decode_error;
# 2177|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def769]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:13: warning[-Wanalyzer-malloc-leak]: leak of 'attr_set'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following 'false' branch (when 'attr_set' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:13: throw: if 'ber_scanf' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:13: danger: 'attr_set' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 2179|   
# 2180|           /* get tag preceding sequence */
# 2181|->         if (ber_scanf(berbuf, "t", &tag) == LBER_ERROR)
# 2182|               goto decode_error;
# 2183|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def770]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:13: warning[-Wanalyzer-malloc-leak]: leak of ‘attr_set’
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following ‘false’ branch (when ‘attr_set’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:13: throw: if ‘ber_scanf’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:13: danger: ‘attr_set’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 2179|   
# 2180|           /* get tag preceding sequence */
# 2181|->         if (ber_scanf(berbuf, "t", &tag) == LBER_ERROR)
# 2182|               goto decode_error;
# 2183|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def771]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: warning[-Wanalyzer-malloc-leak]: leak of 'attr_set'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following 'false' branch (when 'attr_set' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: throw: if 'ber_scanf' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: danger: 'attr_set' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 2187|   
# 2188|           /* sequence, so get attribute info */
# 2189|->         if (ber_scanf(berbuf, "{it", &attrtype, &tag) == LBER_ERROR)
# 2190|               goto decode_error;
# 2191|           if ((tag & LBER_BIG_TAG_MASK) == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def772]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: warning[-Wanalyzer-malloc-leak]: leak of ‘attr_set’
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following ‘false’ branch (when ‘attr_set’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: throw: if ‘ber_scanf’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: danger: ‘attr_set’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 2187|   
# 2188|           /* sequence, so get attribute info */
# 2189|->         if (ber_scanf(berbuf, "{it", &attrtype, &tag) == LBER_ERROR)
# 2190|               goto decode_error;
# 2191|           if ((tag & LBER_BIG_TAG_MASK) == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def773]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: warning[-Wanalyzer-malloc-leak]: leak of 'attr_set'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following 'false' branch (when 'attr_set' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: throw: if 'ber_scanf' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: danger: 'attr_set' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 2190|               goto decode_error;
# 2191|           if ((tag & LBER_BIG_TAG_MASK) == 0) {
# 2192|->             if (ber_scanf(berbuf, "o}", &attrbval) == LBER_ERROR)
# 2193|                   goto decode_error;
# 2194|           } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def774]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: warning[-Wanalyzer-malloc-leak]: leak of ‘attr_set’
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following ‘false’ branch (when ‘attr_set’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: throw: if ‘ber_scanf’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: danger: ‘attr_set’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 2190|               goto decode_error;
# 2191|           if ((tag & LBER_BIG_TAG_MASK) == 0) {
# 2192|->             if (ber_scanf(berbuf, "o}", &attrbval) == LBER_ERROR)
# 2193|                   goto decode_error;
# 2194|           } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def775]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:17: warning[-Wanalyzer-malloc-leak]: leak of 'attr_set'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following 'false' branch (when 'attr_set' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:17: throw: if 'ber_scanf' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:17: danger: 'attr_set' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 2193|                   goto decode_error;
# 2194|           } else {
# 2195|->             if (ber_scanf(berbuf, "i}", &intval) == LBER_ERROR)
# 2196|                   goto decode_error;
# 2197|               attrbval.bv_len = sizeof(CK_ULONG);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def776]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:17: warning[-Wanalyzer-malloc-leak]: leak of ‘attr_set’
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following ‘false’ branch (when ‘attr_set’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:17: throw: if ‘ber_scanf’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:17: danger: ‘attr_set’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 2193|                   goto decode_error;
# 2194|           } else {
# 2195|->             if (ber_scanf(berbuf, "i}", &intval) == LBER_ERROR)
# 2196|                   goto decode_error;
# 2197|               attrbval.bv_len = sizeof(CK_ULONG);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def777]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:21: warning[-Wanalyzer-null-argument]: use of NULL 'attrbval.bv_val' where non-null expected
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2161:19: release_memory: 'attrbval.bv_val' is NULL
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following 'false' branch (when 'attr_set' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2197:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2205:21: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2206:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2206:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:23: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:20: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:45: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:45: release_memory: 'attrbval.bv_val' is NULL
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:21: danger: argument 2 ('attrbval.bv_val') NULL where non-null expected
# 2212|               } else if (attrs[i].ulValueLen >= attrbval.bv_len) {
# 2213|                   if ((tag & LBER_BIG_TAG_MASK) == 0) {
# 2214|->                     memcpy(attrs[i].pValue, attrbval.bv_val, attrbval.bv_len);
# 2215|                   } else {
# 2216|                       *((CK_ULONG *) attrs[i].pValue) = intval;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def778]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:21: warning[-Wanalyzer-null-argument]: use of NULL ‘attrbval.bv_val’ where non-null expected
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2161:19: release_memory: ‘attrbval.bv_val’ is NULL
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following ‘false’ branch (when ‘attr_set’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2197:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2205:21: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2206:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2206:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:23: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:20: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:45: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:45: release_memory: ‘attrbval.bv_val’ is NULL
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:21: danger: argument 2 (‘attrbval.bv_val’) NULL where non-null expected
# 2212|               } else if (attrs[i].ulValueLen >= attrbval.bv_len) {
# 2213|                   if ((tag & LBER_BIG_TAG_MASK) == 0) {
# 2214|->                     memcpy(attrs[i].pValue, attrbval.bv_val, attrbval.bv_len);
# 2215|                   } else {
# 2216|                       *((CK_ULONG *) attrs[i].pValue) = intval;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def779]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2216:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'intval'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following 'false' branch (when 'attr_set' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2205:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2206:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:23: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:20: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2216:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2216:21: danger: use of uninitialized value 'intval' here
# 2214|                       memcpy(attrs[i].pValue, attrbval.bv_val, attrbval.bv_len);
# 2215|                   } else {
# 2216|->                     *((CK_ULONG *) attrs[i].pValue) = intval;
# 2217|                   }
# 2218|                   attrs[i].ulValueLen = attrbval.bv_len;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def780]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2216:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘intval’
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following ‘false’ branch (when ‘attr_set’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2205:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2206:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:23: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:20: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2216:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2216:21: danger: use of uninitialized value ‘intval’ here
# 2214|                       memcpy(attrs[i].pValue, attrbval.bv_val, attrbval.bv_len);
# 2215|                   } else {
# 2216|->                     *((CK_ULONG *) attrs[i].pValue) = intval;
# 2217|                   }
# 2218|                   attrs[i].ulValueLen = attrbval.bv_len;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def781]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2233:13: warning[-Wanalyzer-malloc-leak]: leak of 'attr_set'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following 'false' branch (when 'attr_set' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2205:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2205:21: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2232:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2232:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2233:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2233:13: throw: if 'ber_memfree' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2233:13: danger: 'attr_set' leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 2231|   
# 2232|           if (attrbval.bv_val != NULL)
# 2233|->             ber_memfree(attrbval.bv_val);
# 2234|           attrbval.bv_val = NULL;
# 2235|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def782]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2233:13: warning[-Wanalyzer-malloc-leak]: leak of ‘attr_set’
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following ‘false’ branch (when ‘attr_set’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2205:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2205:21: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2232:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2232:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2233:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2233:13: throw: if ‘ber_memfree’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2233:13: danger: ‘attr_set’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 2231|   
# 2232|           if (attrbval.bv_val != NULL)
# 2233|->             ber_memfree(attrbval.bv_val);
# 2234|           attrbval.bv_val = NULL;
# 2235|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def783]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2247:9: warning[-Wanalyzer-malloc-leak]: leak of 'attr_set'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following 'false' branch (when 'attr_set' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2246:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2246:8: branch_true: following 'true' branch (when 'found < attrs_len')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2247:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2247:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2247:9: danger: 'attr_set' leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 2245|        */
# 2246|       if (found < attrs_len) {
# 2247|->         TRACE_ERROR("%s\n", ock_err(ERR_ATTRIBUTE_TYPE_INVALID));
# 2248|           rc = 8;
# 2249|           *reason = 3029; /* CKR_ATTRIBUTE_TYPE_INVALID */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def784]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2247:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attr_set’
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following ‘false’ branch (when ‘attr_set’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2246:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2246:8: branch_true: following ‘true’ branch (when ‘found < attrs_len’)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2247:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2247:9: throw: if ‘ock_err’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2247:9: danger: ‘attr_set’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 2245|        */
# 2246|       if (found < attrs_len) {
# 2247|->         TRACE_ERROR("%s\n", ock_err(ERR_ATTRIBUTE_TYPE_INVALID));
# 2248|           rc = 8;
# 2249|           *reason = 3029; /* CKR_ATTRIBUTE_TYPE_INVALID */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def785]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2263:5: warning[-Wanalyzer-malloc-leak]: leak of 'attr_set'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following 'false' branch (when 'attr_set' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2263:5: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2263:5: danger: 'attr_set' leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
# 2261|   
# 2262|   decode_error:
# 2263|->     TRACE_ERROR("Failed to decode message.\n");
# 2264|   
# 2265|       if (attrbval.bv_val != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def786]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2263:5: warning[-Wanalyzer-malloc-leak]: leak of ‘attr_set’
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following ‘false’ branch (when ‘attr_set’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2263:5: throw: if ‘ock_traceit’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2263:5: danger: ‘attr_set’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
# 2261|   
# 2262|   decode_error:
# 2263|->     TRACE_ERROR("Failed to decode message.\n");
# 2264|   
# 2265|       if (attrbval.bv_val != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def787]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2266:9: warning[-Wanalyzer-malloc-leak]: leak of 'attr_set'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following 'false' branch (when 'attr_set' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2265:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2266:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2266:9: throw: if 'ber_memfree' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2266:9: danger: 'attr_set' leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 2264|   
# 2265|       if (attrbval.bv_val != NULL)
# 2266|->         ber_memfree(attrbval.bv_val);
# 2267|   
# 2268|       if (attr_set != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def788]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2266:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attr_set’
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2169:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following ‘false’ branch (when ‘attr_set’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2265:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2266:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2266:9: throw: if ‘ber_memfree’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2266:9: danger: ‘attr_set’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 2264|   
# 2265|       if (attrbval.bv_val != NULL)
# 2266|->         ber_memfree(attrbval.bv_val);
# 2267|   
# 2268|       if (attr_set != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def789]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:222:10: warning[-Wanalyzer-malloc-leak]: leak of 'a'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:198:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:204:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:204:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:211:33: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:211:26: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:212:8: branch_false: following 'false' branch (when 'a' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:218:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:222:10: throw: if 'icsf_get_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:222:10: danger: 'a' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  220|       a->pValue = (CK_BYTE *) a + sizeof(CK_ATTRIBUTE);
#  221|   
#  222|->     rc = icsf_get_attribute(d->ld, &reason, &d->get_attrs_result,
#  223|                               d->icsf_object, a, 1);
#  224|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def790]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:560:11: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(conf_name, "r")'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:553:12: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:554:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:560:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:560:11: throw: if 'parse_configlib_file' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:560:11: danger: 'fopen(conf_name, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  558|       }
#  559|   
#  560|->     ret = parse_configlib_file(file, &config, config_parse_error, 0);
#  561|       fclose(file);
#  562|       if (ret != 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def791]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:560:11: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(conf_name, "r")'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:553:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:554:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:560:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:560:11: throw: if 'parse_configlib_file' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:560:11: danger: 'fopen(conf_name, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  558|       }
#  559|   
#  560|->     ret = parse_configlib_file(file, &config, config_parse_error, 0);
#  561|       fclose(file);
#  562|       if (ret != 0) {

Error: GCC_ANALYZER_WARNING (CWE-121): [#def792]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:886:13: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:846:8: branch_false: following 'false' branch (when 'slot_id <= 1023')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:851:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:852:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:858:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:867:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:872:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:872:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:875:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:880:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:885:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:885:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:886:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:886:13: danger: out-of-bounds write on 'fname'
#  884|           
#  885|           if (PATH_MAX - strlen(fname) > strlen("/MK_SO")) {
#  886|->             strcat(fname, "/MK_SO");
#  887|           } else {
#  888|               TRACE_ERROR("MK_SO buffer overflow\n");

Error: GCC_ANALYZER_WARNING (CWE-121): [#def793]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1213:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1180:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1186:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1186:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1192:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1192:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1197:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1197:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1201:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1200:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1207:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1207:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1208:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1208:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1212:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1212:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1213:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1213:17: danger: out-of-bounds write on 'fname'
# 1211|               }
# 1212|               if (PATH_MAX - strlen(fname) > strlen("/MK_USER")) {
# 1213|->                 strcat(fname, "/MK_USER");
# 1214|               } else {
# 1215|                   TRACE_ERROR("MK_USER buffer overflow\n");

Error: GCC_ANALYZER_WARNING (CWE-121): [#def794]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1269:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1180:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1186:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1186:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1192:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1192:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1197:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1197:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1244:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1244:15: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1248:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1247:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1255:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1255:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1260:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1260:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1264:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1264:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1268:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1268:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1269:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1269:17: danger: out-of-bounds write on 'fname'
# 1267|               }
# 1268|               if (PATH_MAX - strlen(fname) > strlen("/MK_SO")) {
# 1269|->                 strcat(fname, "/MK_SO");
# 1270|               } else {
# 1271|                   TRACE_ERROR("MK_SO buffer overflow\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def795]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1322:9: warning[-Wanalyzer-malloc-leak]: leak of 'session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1384:7: enter_function: entry to 'icsftok_open_session'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1392:8: branch_false: following 'false' branch (when 'sess' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1399:8: branch_false: following 'false' branch (when 'session_state' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1403:33: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1406:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: call_function: calling 'getLDAPhandle' from 'icsftok_open_session'
# 1320|   
# 1321|       if (slot_data[slot_id] == NULL) {
# 1322|->         TRACE_ERROR("ICSF slot data not initialized.\n");
# 1323|           return NULL;
# 1324|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def796]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1327:9: warning[-Wanalyzer-malloc-leak]: leak of 'session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1384:7: enter_function: entry to 'icsftok_open_session'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1392:8: branch_false: following 'false' branch (when 'sess' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1399:8: branch_false: following 'false' branch (when 'session_state' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1403:33: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1406:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: call_function: calling 'getLDAPhandle' from 'icsftok_open_session'
# 1325|       /* Check if using sasl or simple auth */
# 1326|       if (slot_data[slot_id]->mech == ICSF_CFG_MECH_SIMPLE) {
# 1327|->         TRACE_INFO("Using SIMPLE auth with slot ID: %lu\n", slot_id);
# 1328|           /* get racf passwd */
# 1329|           rc = get_racf(tokdata, tokdata->master_key, AES_KEY_SIZE_256,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def797]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1329:14: warning[-Wanalyzer-malloc-leak]: leak of 'session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1384:7: enter_function: entry to 'icsftok_open_session'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1392:8: branch_false: following 'false' branch (when 'sess' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1399:8: branch_false: following 'false' branch (when 'session_state' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1403:33: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1406:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: call_function: calling 'getLDAPhandle' from 'icsftok_open_session'
# 1327|           TRACE_INFO("Using SIMPLE auth with slot ID: %lu\n", slot_id);
# 1328|           /* get racf passwd */
# 1329|->         rc = get_racf(tokdata, tokdata->master_key, AES_KEY_SIZE_256,
# 1330|                         racfpwd, &racflen);
# 1331|           if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def798]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1332:13: warning[-Wanalyzer-malloc-leak]: leak of 'session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1384:7: enter_function: entry to 'icsftok_open_session'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1392:8: branch_false: following 'false' branch (when 'sess' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1399:8: branch_false: following 'false' branch (when 'session_state' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1403:33: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1406:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: call_function: calling 'getLDAPhandle' from 'icsftok_open_session'
# 1330|                         racfpwd, &racflen);
# 1331|           if (rc != CKR_OK) {
# 1332|->             TRACE_DEVEL("Failed to get racf passwd.\n");
# 1333|               return NULL;
# 1334|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def799]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1337:14: warning[-Wanalyzer-malloc-leak]: leak of 'session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1384:7: enter_function: entry to 'icsftok_open_session'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1392:8: branch_false: following 'false' branch (when 'sess' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1399:8: branch_false: following 'false' branch (when 'session_state' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1403:33: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1406:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: call_function: calling 'getLDAPhandle' from 'icsftok_open_session'
# 1335|   
# 1336|           /* ok got the passwd, perform simple ldap bind call */
# 1337|->         rc = icsf_login(&new_ld, slot_data[slot_id]->uri,
# 1338|                           slot_data[slot_id]->dn, (char *)racfpwd);
# 1339|           if (rc != 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def800]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1340:13: warning[-Wanalyzer-malloc-leak]: leak of 'session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1384:7: enter_function: entry to 'icsftok_open_session'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1392:8: branch_false: following 'false' branch (when 'sess' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1399:8: branch_false: following 'false' branch (when 'session_state' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1403:33: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1406:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: call_function: calling 'getLDAPhandle' from 'icsftok_open_session'
# 1338|                           slot_data[slot_id]->dn, (char *)racfpwd);
# 1339|           if (rc != 0) {
# 1340|->             TRACE_DEVEL("Failed to bind to ldap server.\n");
# 1341|               return NULL;
# 1342|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def801]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1344:9: warning[-Wanalyzer-malloc-leak]: leak of 'session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1384:7: enter_function: entry to 'icsftok_open_session'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1392:8: branch_false: following 'false' branch (when 'sess' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1399:8: branch_false: following 'false' branch (when 'session_state' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1403:33: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1406:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: call_function: calling 'getLDAPhandle' from 'icsftok_open_session'
# 1342|           }
# 1343|       } else {
# 1344|->         TRACE_INFO("Using SASL auth with slot ID: %lu\n", slot_id);
# 1345|           rc = icsf_sasl_login(&new_ld, slot_data[slot_id]->uri,
# 1346|                                slot_data[slot_id]->cert_file,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def802]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1345:14: warning[-Wanalyzer-malloc-leak]: leak of 'session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1384:7: enter_function: entry to 'icsftok_open_session'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1392:8: branch_false: following 'false' branch (when 'sess' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1399:8: branch_false: following 'false' branch (when 'session_state' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1403:33: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1406:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1416:14: call_function: calling 'getLDAPhandle' from 'icsftok_open_session'
# 1343|       } else {
# 1344|           TRACE_INFO("Using SASL auth with slot ID: %lu\n", slot_id);
# 1345|->         rc = icsf_sasl_login(&new_ld, slot_data[slot_id]->uri,
# 1346|                                slot_data[slot_id]->cert_file,
# 1347|                                slot_data[slot_id]->key_file,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def803]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1407:9: warning[-Wanalyzer-malloc-leak]: leak of 'session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1392:8: branch_false: following 'false' branch (when 'sess' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1399:8: branch_false: following 'false' branch (when 'session_state' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1403:33: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1406:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1407:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1407:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1407:9: danger: 'session_state' leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
# 1405|   
# 1406|       if (pthread_mutex_lock(&icsf_data->sess_list_mutex)) {
# 1407|->         TRACE_ERROR("Failed to lock mutex.\n");
# 1408|           free(session_state);
# 1409|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def804]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:9: warning[-Wanalyzer-malloc-leak]: leak of 'session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1392:8: branch_false: following 'false' branch (when 'sess' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1398:21: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1399:8: branch_false: following 'false' branch (when 'session_state' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1403:33: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1406:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:9: throw: if 'session_mgr_user_session_exists' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1415:9: danger: 'session_state' leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
# 1413|        * same login state.
# 1414|        */
# 1415|->     if (session_mgr_user_session_exists(tokdata)) {
# 1416|           ld = getLDAPhandle(tokdata, sess->session_info.slotID);
# 1417|           if (ld == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-121): [#def805]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1646:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1603:8: branch_false: following 'false' branch (when 'slot_id <= 1023')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1609:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1610:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1615:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1616:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1621:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1621:8: branch_true: following 'true' branch (when 'userType == 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1623:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1623:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1631:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1631:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1639:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1639:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1640:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1640:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1645:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1645:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1646:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1646:17: danger: out-of-bounds write on 'fname'
# 1644|               }
# 1645|               if (PATH_MAX - strlen(fname) > strlen("/MK_USER")) {
# 1646|->                 strcat(fname, "/MK_USER");
# 1647|               } else {
# 1648|                   TRACE_ERROR("MK_USER buffer overflow\n");

Error: GCC_ANALYZER_WARNING (CWE-121): [#def806]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1678:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1603:8: branch_false: following 'false' branch (when 'slot_id <= 1023')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1609:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1610:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1615:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1616:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1621:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1621:8: branch_false: following 'false' branch (when 'userType != 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1663:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1663:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1670:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1670:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1672:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1672:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1677:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1677:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1678:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1678:17: danger: out-of-bounds write on 'fname'
# 1676|               }
# 1677|               if (PATH_MAX - strlen(fname) > strlen("/MK_SO")) {
# 1678|->                 strcat(fname, "/MK_SO");
# 1679|               } else {
# 1680|                   TRACE_ERROR("MK_SO buffer overflow\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def807]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1715:5: warning[-Wanalyzer-malloc-leak]: leak of 'mapping_dst'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1774:7: enter_function: entry to 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: call_function: calling 'get_session_state' from 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: return_function: returning to 'icsftok_copy_object' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:8: branch_false: following 'false' branch (when 'mapping_dst' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1822:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1828:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1830:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1835:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1852:10: call_function: calling 'check_session_permissions' from 'icsftok_copy_object'
# 1713|   
# 1714|       /* Get attributes values */
# 1715|->     find_bbool_attribute(attrs, attrs_len, CKA_TOKEN, &is_token_obj);
# 1716|       find_bbool_attribute(attrs, attrs_len, CKA_PRIVATE, &is_priv_obj);
# 1717|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def808]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1716:5: warning[-Wanalyzer-malloc-leak]: leak of 'mapping_dst'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1774:7: enter_function: entry to 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: call_function: calling 'get_session_state' from 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: return_function: returning to 'icsftok_copy_object' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:8: branch_false: following 'false' branch (when 'mapping_dst' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1822:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1828:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1830:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1835:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1852:10: call_function: calling 'check_session_permissions' from 'icsftok_copy_object'
# 1714|       /* Get attributes values */
# 1715|       find_bbool_attribute(attrs, attrs_len, CKA_TOKEN, &is_token_obj);
# 1716|->     find_bbool_attribute(attrs, attrs_len, CKA_PRIVATE, &is_priv_obj);
# 1717|   
# 1718|       /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def809]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1732:13: warning[-Wanalyzer-malloc-leak]: leak of 'mapping_dst'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1774:7: enter_function: entry to 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: call_function: calling 'get_session_state' from 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: return_function: returning to 'icsftok_copy_object' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:8: branch_false: following 'false' branch (when 'mapping_dst' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1822:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1828:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1830:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1835:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1852:10: call_function: calling 'check_session_permissions' from 'icsftok_copy_object'
# 1730|       if (sess->session_info.state == CKS_RO_PUBLIC_SESSION) {
# 1731|           if (is_priv_obj) {
# 1732|->             TRACE_ERROR("%s\n", ock_err(ERR_USER_NOT_LOGGED_IN));
# 1733|               rc = CKR_USER_NOT_LOGGED_IN;
# 1734|               goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def810]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1737:13: warning[-Wanalyzer-malloc-leak]: leak of 'mapping_dst'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1774:7: enter_function: entry to 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: call_function: calling 'get_session_state' from 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: return_function: returning to 'icsftok_copy_object' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:8: branch_false: following 'false' branch (when 'mapping_dst' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1822:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1828:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1830:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1835:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1852:10: call_function: calling 'check_session_permissions' from 'icsftok_copy_object'
# 1735|           }
# 1736|           if (is_token_obj) {
# 1737|->             TRACE_ERROR("%s\n", ock_err(ERR_SESSION_READ_ONLY));
# 1738|               rc = CKR_SESSION_READ_ONLY;
# 1739|               goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def811]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1745:13: warning[-Wanalyzer-malloc-leak]: leak of 'mapping_dst'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1774:7: enter_function: entry to 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: call_function: calling 'get_session_state' from 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: return_function: returning to 'icsftok_copy_object' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:8: branch_false: following 'false' branch (when 'mapping_dst' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1822:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1828:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1830:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1835:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1852:10: call_function: calling 'check_session_permissions' from 'icsftok_copy_object'
# 1743|       if (sess->session_info.state == CKS_RO_USER_FUNCTIONS) {
# 1744|           if (is_token_obj) {
# 1745|->             TRACE_ERROR("%s\n", ock_err(ERR_SESSION_READ_ONLY));
# 1746|               rc = CKR_SESSION_READ_ONLY;
# 1747|               goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def812]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: warning[-Wanalyzer-malloc-leak]: leak of 'mapping_dst'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1774:7: enter_function: entry to 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: call_function: calling 'get_session_state' from 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: return_function: returning to 'icsftok_copy_object' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:8: branch_false: following 'false' branch (when 'mapping_dst' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: throw: if 'bt_get_node_value' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: danger: 'mapping_dst' leaks here; was allocated at [(15)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/14)
# 1819|       }
# 1820|   
# 1821|->     mapping_src = bt_get_node_value(&icsf_data->objects, src);
# 1822|       if (!mapping_src) {
# 1823|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def813]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1823:9: warning[-Wanalyzer-malloc-leak]: leak of 'mapping_dst'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1774:7: enter_function: entry to 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: call_function: calling 'get_session_state' from 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: return_function: returning to 'icsftok_copy_object' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:8: branch_false: following 'false' branch (when 'mapping_dst' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1822:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1823:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1823:9: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1823:9: danger: 'mapping_dst' leaks here; was allocated at [(15)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/14)
# 1821|       mapping_src = bt_get_node_value(&icsf_data->objects, src);
# 1822|       if (!mapping_src) {
# 1823|->         TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));
# 1824|           rc = CKR_OBJECT_HANDLE_INVALID;
# 1825|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def814]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1828:10: warning[-Wanalyzer-malloc-leak]: leak of 'mapping_dst'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1774:7: enter_function: entry to 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: call_function: calling 'get_session_state' from 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: return_function: returning to 'icsftok_copy_object' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:8: branch_false: following 'false' branch (when 'mapping_dst' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1822:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1828:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1828:10: throw: if 'icsf_get_attribute' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1828:10: danger: 'mapping_dst' leaks here; was allocated at [(15)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/14)
# 1826|       }
# 1827|   
# 1828|->     rc = icsf_get_attribute(session_state->ld, &reason, NULL,
# 1829|                               &mapping_src->icsf_object, priv_attrs, 2);
# 1830|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def815]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1831:9: warning[-Wanalyzer-malloc-leak]: leak of 'mapping_dst'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1774:7: enter_function: entry to 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: call_function: calling 'get_session_state' from 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: return_function: returning to 'icsftok_copy_object' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:8: branch_false: following 'false' branch (when 'mapping_dst' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1822:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1828:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1830:8: branch_true: following 'true' branch (when 'rc != 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1831:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1831:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1831:9: danger: 'mapping_dst' leaks here; was allocated at [(15)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/14)
# 1829|                               &mapping_src->icsf_object, priv_attrs, 2);
# 1830|       if (rc != CKR_OK) {
# 1831|->         TRACE_ERROR("icsf_get_attribute failed\n");
# 1832|           goto done;
# 1833|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def816]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1837:22: warning[-Wanalyzer-malloc-leak]: leak of 'mapping_dst'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1774:7: enter_function: entry to 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: call_function: calling 'get_session_state' from 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: return_function: returning to 'icsftok_copy_object' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:8: branch_false: following 'false' branch (when 'mapping_dst' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1822:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1828:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1830:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1835:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1835:8: branch_true: following 'true' branch (when 'attrs_len != 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1837:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1837:22: throw: if 'get_attribute_by_type' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1837:22: danger: 'mapping_dst' leaks here; was allocated at [(15)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/14)
# 1835|       if (attrs_len != 0) {
# 1836|           /* looking for CKA_PRIVATE */
# 1837|->         temp_attrs = get_attribute_by_type(attrs, attrs_len, CKA_PRIVATE);
# 1838|           if (temp_attrs != NULL) {
# 1839|               priv_attrs[0].pValue = temp_attrs->pValue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def817]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1844:22: warning[-Wanalyzer-malloc-leak]: leak of 'mapping_dst'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1774:7: enter_function: entry to 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: call_function: calling 'get_session_state' from 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: return_function: returning to 'icsftok_copy_object' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:8: branch_false: following 'false' branch (when 'mapping_dst' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1822:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1828:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1830:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1835:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1835:8: branch_true: following 'true' branch (when 'attrs_len != 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1837:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1838:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1844:22: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1844:22: throw: if 'get_attribute_by_type' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1844:22: danger: 'mapping_dst' leaks here; was allocated at [(15)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/14)
# 1842|   
# 1843|           /* looking for CKA_TOKEN */
# 1844|->         temp_attrs = get_attribute_by_type(attrs, attrs_len, CKA_TOKEN);
# 1845|           if (temp_attrs != NULL) {
# 1846|               priv_attrs[1].pValue = temp_attrs->pValue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def818]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1881:9: warning[-Wanalyzer-malloc-leak]: leak of 'mapping_dst'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1774:7: enter_function: entry to 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: call_function: calling 'get_session_state' from 'icsftok_copy_object'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:27: return_function: returning to 'icsftok_copy_object' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1801:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1808:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1815:8: branch_false: following 'false' branch (when 'mapping_dst' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1821:19: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1822:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1828:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1830:8: branch_true: following 'true' branch (when 'rc != 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1831:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1880:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1881:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1881:9: throw: if 'bt_put_node_value' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1881:9: danger: 'mapping_dst' leaks here; was allocated at [(15)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/14)
# 1879|   done:
# 1880|       if (mapping_src) {
# 1881|->         bt_put_node_value(&icsf_data->objects, mapping_src);
# 1882|           mapping_src = NULL;
# 1883|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def819]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2781:10: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2678:7: enter_function: entry to 'icsftok_encrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2699:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2701:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2701:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:27: call_function: calling 'get_session_state' from 'icsftok_encrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:27: return_function: returning to 'icsftok_encrypt_update' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2715:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2715:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2722:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2722:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2728:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2759:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2769:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2769:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2769:8: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2774:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2775:8: branch_false: following 'false' branch (when 'input_part_len <= remaining')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2780:23: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2781:10: throw: if 'icsf_secret_key_encrypt' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2781:10: danger: 'buffer' leaks here; was allocated at [(23)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/22)
# 2779|       /* Encrypt data using remote token. */
# 2780|       output_part_len = *p_output_part_len;
# 2781|->     rc = icsf_secret_key_encrypt(session_state->ld, &reason,
# 2782|                                    &mapping->icsf_object,
# 2783|                                    &encr_ctx->mech, chaining,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def820]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2797:17: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2678:7: enter_function: entry to 'icsftok_encrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2699:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2701:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2701:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:27: call_function: calling 'get_session_state' from 'icsftok_encrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:27: return_function: returning to 'icsftok_encrypt_update' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2715:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2715:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2722:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2722:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2728:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2759:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2769:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2769:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2769:8: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2774:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2775:8: branch_false: following 'false' branch (when 'input_part_len <= remaining')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2780:23: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2788:8: branch_true: following 'true' branch (when 'rc != 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2789:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2789:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2790:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2790:16: branch_false: following 'false' branch (when 'output_part' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2797:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2797:17: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2797:17: danger: 'buffer' leaks here; was allocated at [(23)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/22)
# 2795|                   rc = CKR_OK;
# 2796|               } else {
# 2797|->                 TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 2798|                   rc = CKR_BUFFER_TOO_SMALL;
# 2799|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def821]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2801:13: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2678:7: enter_function: entry to 'icsftok_encrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2699:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2701:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2701:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:27: call_function: calling 'get_session_state' from 'icsftok_encrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:27: return_function: returning to 'icsftok_encrypt_update' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2715:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2715:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2722:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2722:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2728:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2759:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2769:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2769:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2769:8: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2774:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2775:8: branch_false: following 'false' branch (when 'input_part_len <= remaining')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2780:23: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2788:8: branch_true: following 'true' branch (when 'rc != 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2789:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2789:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2801:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2801:13: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2801:13: danger: 'buffer' leaks here; was allocated at [(23)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/22)
# 2799|               }
# 2800|           } else {
# 2801|->             TRACE_DEVEL("Failed to encrypt data. reason = %d\n", reason);
# 2802|               rc = icsf_to_ock_err(rc, reason);
# 2803|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def822]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2849:9: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2678:7: enter_function: entry to 'icsftok_encrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2699:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2701:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2701:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:27: call_function: calling 'get_session_state' from 'icsftok_encrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:27: return_function: returning to 'icsftok_encrypt_update' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2708:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2715:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2715:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2722:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2722:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2728:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2759:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2769:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2769:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2769:8: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2774:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2775:8: branch_false: following 'false' branch (when 'input_part_len <= remaining')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2780:23: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2810:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2817:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2817:8: branch_false: following 'false' branch (when 'output_part' is NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2831:1: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2848:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2849:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2849:9: throw: if 'bt_put_node_value' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:2849:9: danger: 'buffer' leaks here; was allocated at [(23)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/22)
# 2847|   done:
# 2848|       if (mapping) {
# 2849|->         bt_put_node_value(&icsf_data->objects, mapping);
# 2850|           mapping = NULL;
# 2851|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def823]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3324:10: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3204:7: enter_function: entry to 'icsftok_decrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3226:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3228:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:27: call_function: calling 'get_session_state' from 'icsftok_decrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:27: return_function: returning to 'icsftok_decrypt_update' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3242:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3242:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3249:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3249:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3255:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3300:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3300:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3312:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3312:8: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3317:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3318:8: branch_false: following 'false' branch (when 'remaining >= input_part_len')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3323:23: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3324:10: throw: if 'icsf_secret_key_decrypt' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3324:10: danger: 'buffer' leaks here; was allocated at [(23)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/22)
# 3322|       /* Decrypt data using remote token. */
# 3323|       output_part_len = *p_output_part_len;
# 3324|->     rc = icsf_secret_key_decrypt(session_state->ld, &reason,
# 3325|                                    &mapping->icsf_object,
# 3326|                                    &decr_ctx->mech, chaining,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def824]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3340:17: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3204:7: enter_function: entry to 'icsftok_decrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3226:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3228:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:27: call_function: calling 'get_session_state' from 'icsftok_decrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:27: return_function: returning to 'icsftok_decrypt_update' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3242:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3242:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3249:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3249:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3255:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3300:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3300:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3312:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3312:8: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3317:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3318:8: branch_false: following 'false' branch (when 'remaining >= input_part_len')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3323:23: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3331:8: branch_true: following 'true' branch (when 'rc != 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3332:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3332:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3333:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3333:16: branch_false: following 'false' branch (when 'output_part' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3340:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3340:17: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3340:17: danger: 'buffer' leaks here; was allocated at [(23)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/22)
# 3338|                   rc = CKR_OK;
# 3339|               } else {
# 3340|->                 TRACE_ERROR("%s\n", ock_err(ERR_BUFFER_TOO_SMALL));
# 3341|                   rc = CKR_BUFFER_TOO_SMALL;
# 3342|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def825]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3344:13: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3204:7: enter_function: entry to 'icsftok_decrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3226:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3228:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:27: call_function: calling 'get_session_state' from 'icsftok_decrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:27: return_function: returning to 'icsftok_decrypt_update' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3242:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3242:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3249:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3249:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3255:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3300:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3300:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3312:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3312:8: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3317:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3318:8: branch_false: following 'false' branch (when 'remaining >= input_part_len')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3323:23: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3331:8: branch_true: following 'true' branch (when 'rc != 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3332:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3332:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3344:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3344:13: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3344:13: danger: 'buffer' leaks here; was allocated at [(23)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/22)
# 3342|               }
# 3343|           } else {
# 3344|->             TRACE_DEVEL("Failed to decrypt data. reason = %d\n", reason);
# 3345|               rc = icsf_to_ock_err(rc, reason);
# 3346|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def826]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3391:9: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3204:7: enter_function: entry to 'icsftok_decrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3226:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3228:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3228:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:27: call_function: calling 'get_session_state' from 'icsftok_decrypt_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:27: return_function: returning to 'icsftok_decrypt_update' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3235:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3242:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3242:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3249:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3249:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3255:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3300:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3300:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3312:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3312:8: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3317:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3318:8: branch_false: following 'false' branch (when 'remaining >= input_part_len')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3323:23: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3351:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3358:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3358:8: branch_false: following 'false' branch (when 'output_part' is NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3372:1: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3390:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3391:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3391:9: throw: if 'bt_put_node_value' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3391:9: danger: 'buffer' leaks here; was allocated at [(23)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/22)
# 3389|   done:
# 3390|       if (mapping) {
# 3391|->         bt_put_node_value(&icsf_data->objects, mapping);
# 3392|           mapping = NULL;
# 3393|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def827]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3840:22: warning[-Wanalyzer-malloc-leak]: leak of 'new_mapping'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3702:7: enter_function: entry to 'icsftok_find_objects_init'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3752:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3757:40: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3761:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3767:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3767:27: call_function: calling 'get_session_state' from 'icsftok_find_objects_init'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3767:27: return_function: returning to 'icsftok_find_objects_init' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3767:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3773:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3773:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3779:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3786:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3786:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3799:21: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3799:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3804:25: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3827:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3827:16: branch_true: following 'true' branch (when 'node_number == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3830:37: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3830:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3830:20: branch_false: following 'false' branch (when 'new_mapping' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3835:43: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3840:22: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:3840:22: danger: 'new_mapping' leaks here; was allocated at [(29)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/28)
# 3838|                   pattr.ld = session_state->ld;
# 3839|                   pattr.icsf_object = &new_mapping->icsf_object;
# 3840|->                 rc = tokdata->policy->store_object_strength(
# 3841|                        tokdata->policy, &new_mapping->strength,
# 3842|                        icsf_policy_get_attr, &pattr, icsf_policy_free_attr, sess);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def828]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4465:14: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4328:7: enter_function: entry to 'icsftok_sign_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4346:27: call_function: calling 'get_session_state' from 'icsftok_sign_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4346:27: return_function: returning to 'icsftok_sign_update' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4346:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4353:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4353:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4360:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4360:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4371:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4372:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4374:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4422:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4424:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4428:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4439:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4442:32: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4442:20: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4447:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4465:14: throw: if 'icsf_hash_signverify' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4465:14: danger: 'buffer' leaks here; was allocated at [(25)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/24)
# 4463|           }
# 4464|   
# 4465|->         rc = icsf_hash_signverify(session_state->ld, &reason,
# 4466|                                     &mapping->icsf_object, &ctx->mech,
# 4467|                                     (multi_part_ctx->

Error: GCC_ANALYZER_WARNING (CWE-401): [#def829]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4473:13: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4328:7: enter_function: entry to 'icsftok_sign_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4346:27: call_function: calling 'get_session_state' from 'icsftok_sign_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4346:27: return_function: returning to 'icsftok_sign_update' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4346:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4353:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4353:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4360:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4360:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4371:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4372:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4374:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4422:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4424:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4428:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4439:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4442:32: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4442:20: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4447:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4472:12: branch_true: following 'true' branch (when 'rc != 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4473:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4473:13: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4473:13: danger: 'buffer' leaks here; was allocated at [(25)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/24)
# 4471|   
# 4472|           if (rc != 0) {
# 4473|->             TRACE_DEVEL("icsf_hash_signverify failed\n");
# 4474|               rc = icsf_to_ock_err(rc, reason);
# 4475|           } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def830]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4603:14: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4500:7: enter_function: entry to 'icsftok_sign_final'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4517:27: call_function: calling 'get_session_state' from 'icsftok_sign_final'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4517:27: return_function: returning to 'icsftok_sign_final' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4517:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4524:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4524:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4531:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4531:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4538:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4538:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4540:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4594:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4595:28: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4595:28: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4595:16: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4600:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4603:14: throw: if 'icsf_hash_signverify' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4603:14: danger: 'buffer' leaks here; was allocated at [(23)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/22)
# 4601|           }
# 4602|   
# 4603|->         rc = icsf_hash_signverify(session_state->ld, &reason,
# 4604|                                     &mapping->icsf_object, &ctx->mech,
# 4605|                                     multi_part_ctx->initiated ? "LAST" : "ONLY",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def831]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4615:17: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4500:7: enter_function: entry to 'icsftok_sign_final'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4517:27: call_function: calling 'get_session_state' from 'icsftok_sign_final'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4517:27: return_function: returning to 'icsftok_sign_final' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4517:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4524:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4524:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4531:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4531:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4538:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4538:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4540:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4594:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4595:28: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4595:28: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4595:16: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4600:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4611:12: branch_true: following 'true' branch (when 'rc != 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4612:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4615:17: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4615:17: danger: 'buffer' leaks here; was allocated at [(23)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/22)
# 4613|                   rc = CKR_OK;
# 4614|               } else {
# 4615|->                 TRACE_DEVEL("icsf_hash_signverify failed\n");
# 4616|                   rc = icsf_to_ock_err(rc, reason);
# 4617|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def832]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5081:14: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4946:7: enter_function: entry to 'icsftok_verify_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4963:27: call_function: calling 'get_session_state' from 'icsftok_verify_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4963:27: return_function: returning to 'icsftok_verify_update' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4963:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4970:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4970:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4977:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4977:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4987:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4988:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4990:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5038:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5040:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5044:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5055:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5058:32: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5058:20: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5063:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5081:14: throw: if 'icsf_hash_signverify' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5081:14: danger: 'buffer' leaks here; was allocated at [(25)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/24)
# 5079|           }
# 5080|   
# 5081|->         rc = icsf_hash_signverify(session_state->ld, &reason,
# 5082|                                     &mapping->icsf_object, &ctx->mech,
# 5083|                                     (multi_part_ctx->

Error: GCC_ANALYZER_WARNING (CWE-401): [#def833]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5089:13: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4946:7: enter_function: entry to 'icsftok_verify_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4963:27: call_function: calling 'get_session_state' from 'icsftok_verify_update'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4963:27: return_function: returning to 'icsftok_verify_update' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4963:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4970:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4970:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4977:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4977:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4987:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4988:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:4990:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5038:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5040:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5044:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5055:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5058:32: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5058:20: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5063:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5088:12: branch_true: following 'true' branch (when 'rc != 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5089:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5089:13: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5089:13: danger: 'buffer' leaks here; was allocated at [(25)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/24)
# 5087|   
# 5088|           if (rc != 0) {
# 5089|->             TRACE_DEVEL("icsf_hash_signverify failed\n");
# 5090|               rc = icsf_to_ock_err(rc, reason);
# 5091|           } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def834]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5214:14: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5117:7: enter_function: entry to 'icsftok_verify_final'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5132:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5139:27: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5139:27: call_function: calling 'get_session_state' from 'icsftok_verify_final'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5139:27: return_function: returning to 'icsftok_verify_final' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5139:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5146:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5146:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5153:60: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5153:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5160:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5160:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5162:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5205:13: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5206:28: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5206:28: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5206:16: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5211:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5214:14: throw: if 'icsf_hash_signverify' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5214:14: danger: 'buffer' leaks here; was allocated at [(25)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/24)
# 5212|           }
# 5213|   
# 5214|->         rc = icsf_hash_signverify(session_state->ld, &reason,
# 5215|                                     &mapping->icsf_object, &ctx->mech,
# 5216|                                     multi_part_ctx->initiated ? "LAST" : "ONLY",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def835]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5420:19: warning[-Wanalyzer-malloc-leak]: leak of 'key_mapping'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5361:7: enter_function: entry to 'icsftok_unwrap_key'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:27: call_function: calling 'get_session_state' from 'icsftok_unwrap_key'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:27: return_function: returning to 'icsftok_unwrap_key' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5385:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5385:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5391:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5392:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5396:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5399:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:8: branch_false: following 'false' branch (when 'key_mapping' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5411:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5420:19: throw: if 'icsf_block_size' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5420:19: danger: 'key_mapping' leaks here; was allocated at [(19)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/18)
# 5418|       case CKM_DES3_CBC_PAD:
# 5419|       case CKM_AES_CBC_PAD:
# 5420|->         if ((rc = icsf_block_size(mech->mechanism, &expected_block_size)))
# 5421|               goto done;
# 5422|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def836]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5425:13: warning[-Wanalyzer-malloc-leak]: leak of 'key_mapping'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5361:7: enter_function: entry to 'icsftok_unwrap_key'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:27: call_function: calling 'get_session_state' from 'icsftok_unwrap_key'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:27: return_function: returning to 'icsftok_unwrap_key' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5385:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5385:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5391:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5392:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5396:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5399:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:8: branch_false: following 'false' branch (when 'key_mapping' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5411:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5420:12: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5423:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5425:13: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5425:13: danger: 'key_mapping' leaks here; was allocated at [(19)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/18)
# 5423|           if (mech->ulParameterLen != expected_block_size ||
# 5424|               mech->pParameter == NULL) {
# 5425|->             TRACE_ERROR("Invalid mechanism parameter NULL or length: %lu "
# 5426|                           "(expected %lu)\n",
# 5427|                           (unsigned long) mech->ulParameterLen,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def837]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5435:13: warning[-Wanalyzer-malloc-leak]: leak of 'key_mapping'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5361:7: enter_function: entry to 'icsftok_unwrap_key'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:27: call_function: calling 'get_session_state' from 'icsftok_unwrap_key'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:27: return_function: returning to 'icsftok_unwrap_key' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5385:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5385:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5391:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5392:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5396:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5399:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:8: branch_false: following 'false' branch (when 'key_mapping' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5411:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5434:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5435:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5435:13: throw: if 'ock_err' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5435:13: danger: 'key_mapping' leaks here; was allocated at [(19)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/18)
# 5433|       case CKM_RSA_PKCS:
# 5434|           if (mech->ulParameterLen != 0) {
# 5435|->             TRACE_ERROR("%s\n", ock_err(ERR_MECHANISM_PARAM_INVALID));
# 5436|               rc = CKR_MECHANISM_PARAM_INVALID;
# 5437|               goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def838]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5441:9: warning[-Wanalyzer-malloc-leak]: leak of 'key_mapping'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5361:7: enter_function: entry to 'icsftok_unwrap_key'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:27: call_function: calling 'get_session_state' from 'icsftok_unwrap_key'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:27: return_function: returning to 'icsftok_unwrap_key' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5385:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5385:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5391:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5392:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5396:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5399:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:8: branch_false: following 'false' branch (when 'key_mapping' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5411:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5441:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5441:9: danger: 'key_mapping' leaks here; was allocated at [(19)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/18)
# 5439|           break;
# 5440|       default:
# 5441|->         TRACE_ERROR("icsf invalid %lu mechanism for key wrapping\n",
# 5442|                       mech->mechanism);
# 5443|           rc = CKR_MECHANISM_INVALID;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def839]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5448:10: warning[-Wanalyzer-malloc-leak]: leak of 'key_mapping'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5361:7: enter_function: entry to 'icsftok_unwrap_key'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:27: call_function: calling 'get_session_state' from 'icsftok_unwrap_key'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:27: return_function: returning to 'icsftok_unwrap_key' from 'get_session_state'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5379:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5385:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5385:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5391:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5392:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5396:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5399:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:25: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5406:8: branch_false: following 'false' branch (when 'key_mapping' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5411:5: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5434:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5448:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5448:10: throw: if 'icsf_unwrap_key' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:5448:10: danger: 'key_mapping' leaks here; was allocated at [(19)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/18)
# 5446|   
# 5447|       /* Call ICSF service */
# 5448|->     rc = icsf_unwrap_key(session_state->ld, &reason, mech,
# 5449|                            &wrapping_key_mapping->icsf_object,
# 5450|                            wrapped_key, wrapped_key_len,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def840]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:40:51: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/urandom", 0)'
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:37:13: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:38:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:38:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:40:51: danger: 'open("/dev/urandom", 0)' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   38|       if (ranfd >= 0) {
#   39|           do {
#   40|->             rlen = read(ranfd, output + totallen, bytes - totallen);
#   41|               if (rlen == -1) {
#   42|                   close(ranfd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def841]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:40:51: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:37:13: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:38:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:38:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:40:51: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   38|       if (ranfd >= 0) {
#   39|           do {
#   40|->             rlen = read(ranfd, output + totallen, bytes - totallen);
#   41|               if (rlen == -1) {
#   42|                   close(ranfd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def842]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(fname, "r")'
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:207:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:208:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:213:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:214:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:235:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:235:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:9: danger: 'fopen(fname, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  224|        * length is 64 bytes, this is it is much higher than the version number.
#  225|        */
#  226|->     if (version == ICSF_MK_FILE_VERSION) {
#  227|           /* New version file detected */
#  228|           ret = fread(&totallen, sizeof(CK_ULONG_32), 1, fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def843]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:207:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:208:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:213:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:214:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:235:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:235:9: throw: if ‘ock_traceit’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:9: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  224|        * length is 64 bytes, this is it is much higher than the version number.
#  225|        */
#  226|->     if (version == ICSF_MK_FILE_VERSION) {
#  227|           /* New version file detected */
#  228|           ret = fread(&totallen, sizeof(CK_ULONG_32), 1, fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def844]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:9: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(fname, "r")'
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:207:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:208:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:213:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:214:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:235:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:235:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:9: danger: 'fopen(fname, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  224|        * length is 64 bytes, this is it is much higher than the version number.
#  225|        */
#  226|->     if (version == ICSF_MK_FILE_VERSION) {
#  227|           /* New version file detected */
#  228|           ret = fread(&totallen, sizeof(CK_ULONG_32), 1, fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def845]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:207:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:208:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:213:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:214:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:235:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:235:9: throw: if ‘ock_traceit’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:226:9: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  224|        * length is 64 bytes, this is it is much higher than the version number.
#  225|        */
#  226|->     if (version == ICSF_MK_FILE_VERSION) {
#  227|           /* New version file detected */
#  228|           ret = fread(&totallen, sizeof(CK_ULONG_32), 1, fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def846]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(&fname, "r")'
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:308:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:309:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:314:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:315:8: branch_true: following 'true' branch (when 'readsize != 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: danger: 'fopen(&fname, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  314|       readsize = fread(&len, sizeof(CK_ULONG_32), 1, fp);
#  315|       if (readsize != 1) {
#  316|->         TRACE_ERROR("fread failed\n");
#  317|           fclose(fp);
#  318|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def847]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:308:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:309:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:314:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:315:8: branch_true: following ‘true’ branch (when ‘readsize != 1’)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: throw: if ‘ock_traceit’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: danger: ‘fopen(&fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  314|       readsize = fread(&len, sizeof(CK_ULONG_32), 1, fp);
#  315|       if (readsize != 1) {
#  316|->         TRACE_ERROR("fread failed\n");
#  317|           fclose(fp);
#  318|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def848]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(&fname, "r")'
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:308:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:309:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:314:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:315:8: branch_true: following 'true' branch (when 'readsize != 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: danger: 'fopen(&fname, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  314|       readsize = fread(&len, sizeof(CK_ULONG_32), 1, fp);
#  315|       if (readsize != 1) {
#  316|->         TRACE_ERROR("fread failed\n");
#  317|           fclose(fp);
#  318|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def849]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:308:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:309:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:314:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:315:8: branch_true: following ‘true’ branch (when ‘readsize != 1’)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: throw: if ‘ock_traceit’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:316:9: danger: ‘fopen(&fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  314|       readsize = fread(&len, sizeof(CK_ULONG_32), 1, fp);
#  315|       if (readsize != 1) {
#  316|->         TRACE_ERROR("fread failed\n");
#  317|           fclose(fp);
#  318|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def850]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(&fname, "r")'
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:308:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:309:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:314:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:315:8: branch_false: following 'false' branch (when 'readsize == 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:321:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:322:8: branch_true: following 'true' branch (when 'readsize != 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: danger: 'fopen(&fname, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  321|       readsize = fread(iv, AES_INIT_VECTOR_SIZE, 1, fp);
#  322|       if (readsize != 1) {
#  323|->         TRACE_ERROR("fread failed\n");
#  324|           fclose(fp);
#  325|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def851]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:308:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:309:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:314:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:315:8: branch_false: following ‘false’ branch (when ‘readsize == 1’)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:321:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:322:8: branch_true: following ‘true’ branch (when ‘readsize != 1’)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: throw: if ‘ock_traceit’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: danger: ‘fopen(&fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  321|       readsize = fread(iv, AES_INIT_VECTOR_SIZE, 1, fp);
#  322|       if (readsize != 1) {
#  323|->         TRACE_ERROR("fread failed\n");
#  324|           fclose(fp);
#  325|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def852]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(&fname, "r")'
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:308:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:309:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:314:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:315:8: branch_false: following 'false' branch (when 'readsize == 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:321:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:322:8: branch_true: following 'true' branch (when 'readsize != 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: danger: 'fopen(&fname, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  321|       readsize = fread(iv, AES_INIT_VECTOR_SIZE, 1, fp);
#  322|       if (readsize != 1) {
#  323|->         TRACE_ERROR("fread failed\n");
#  324|           fclose(fp);
#  325|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def853]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:308:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:309:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:314:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:315:8: branch_false: following ‘false’ branch (when ‘readsize == 1’)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:321:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:322:8: branch_true: following ‘true’ branch (when ‘readsize != 1’)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: throw: if ‘ock_traceit’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:323:9: danger: ‘fopen(&fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  321|       readsize = fread(iv, AES_INIT_VECTOR_SIZE, 1, fp);
#  322|       if (readsize != 1) {
#  323|->         TRACE_ERROR("fread failed\n");
#  324|           fclose(fp);
#  325|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def854]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:329:16: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(&fname, "r")'
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:308:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:309:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:314:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:315:8: branch_false: following 'false' branch (when 'readsize == 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:321:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:322:8: branch_false: following 'false' branch (when 'readsize == 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:329:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:331:8: branch_true: following 'true' branch (when 'readsize != 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:332:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:332:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:329:16: danger: 'fopen(&fname, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  327|   
#  328|       /* get length of encryted data */
#  329|->     datasize = len - AES_INIT_VECTOR_SIZE;
#  330|       readsize = fread(outbuf, datasize, 1, fp);
#  331|       if (readsize != 1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def855]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:329:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:308:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:309:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:314:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:315:8: branch_false: following ‘false’ branch (when ‘readsize == 1’)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:321:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:322:8: branch_false: following ‘false’ branch (when ‘readsize == 1’)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:329:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:331:8: branch_true: following ‘true’ branch (when ‘readsize != 1’)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:332:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:332:9: throw: if ‘ock_traceit’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:329:16: danger: ‘fopen(&fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  327|   
#  328|       /* get length of encryted data */
#  329|->     datasize = len - AES_INIT_VECTOR_SIZE;
#  330|       readsize = fread(outbuf, datasize, 1, fp);
#  331|       if (readsize != 1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def856]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:329:16: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(&fname, "r")'
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:308:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:309:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:314:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:315:8: branch_false: following 'false' branch (when 'readsize == 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:321:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:322:8: branch_false: following 'false' branch (when 'readsize == 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:329:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:331:8: branch_true: following 'true' branch (when 'readsize != 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:332:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:332:9: throw: if 'ock_traceit' throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:329:16: danger: 'fopen(&fname, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  327|   
#  328|       /* get length of encryted data */
#  329|->     datasize = len - AES_INIT_VECTOR_SIZE;
#  330|       readsize = fread(outbuf, datasize, 1, fp);
#  331|       if (readsize != 1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def857]
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:329:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:308:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:309:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:314:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:315:8: branch_false: following ‘false’ branch (when ‘readsize == 1’)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:321:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:322:8: branch_false: following ‘false’ branch (when ‘readsize == 1’)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:329:16: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:331:8: branch_true: following ‘true’ branch (when ‘readsize != 1’)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:332:9: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:332:9: throw: if ‘ock_traceit’ throws an exception...
opencryptoki-3.26.0/usr/lib/icsf_stdll/pbkdf.c:329:16: danger: ‘fopen(&fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  327|   
#  328|       /* get length of encryted data */
#  329|->     datasize = len - AES_INIT_VECTOR_SIZE;
#  330|       readsize = fread(outbuf, datasize, 1, fp);
#  331|       if (readsize != 1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def858]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:72:16: warning[-Wanalyzer-malloc-leak]: leak of ‘v1_attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: enter_function: entry to ‘kmip_new_attributes’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:772:20: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:775:28: branch_false: following ‘false’ branch (when ‘v1_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:29: branch_false: following ‘false’ branch (when ‘attrs_count <= i’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:789:25: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:789:25: call_function: calling ‘kmip_new_template_attribute_v1’ from ‘kmip_new_attributes’
#   70|   	}
#   71|   
#   72|-> 	tmpl = kmip_node_new_structure_va(KMIP_TAG_TEMPLATE_ATTRIBUTE, NULL, 0);
#   73|   	if (tmpl == NULL)
#   74|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def859]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:359:13: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:844:19: enter_function: entry to ‘kmip_new_attributes_va’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:852:12: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:853:25: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:853:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:854:20: branch_false: following ‘false’ branch (when ‘attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:859:28: branch_true: following ‘true’ branch (when ‘i < attrs_count’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:860:22: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:859:28: branch_true: following ‘true’ branch (when ‘i < attrs_count’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:860:22: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:866:15: call_function: calling ‘kmip_new_attributes’ from ‘kmip_new_attributes_va’
#  357|   		return -EINVAL;
#  358|   
#  359|-> 	if (kmip_node_get_tag(node) != KMIP_TAG_ATTRIBUTE)
#  360|   		return -EBADMSG;
#  361|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def860]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:359:13: warning[-Wanalyzer-malloc-leak]: leak of ‘v1_attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: enter_function: entry to ‘kmip_new_attributes’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:772:20: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:775:28: branch_false: following ‘false’ branch (when ‘v1_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:29: branch_true: following ‘true’ branch (when ‘attrs_count > i’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:780:40: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:781:28: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: call_function: calling ‘kmip_v1_attr_from_v2_attr’ from ‘kmip_new_attributes’
#  357|   		return -EINVAL;
#  358|   
#  359|-> 	if (kmip_node_get_tag(node) != KMIP_TAG_ATTRIBUTE)
#  360|   		return -EBADMSG;
#  361|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def861]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:362:16: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:844:19: enter_function: entry to ‘kmip_new_attributes_va’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:852:12: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:853:25: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:853:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:854:20: branch_false: following ‘false’ branch (when ‘attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:859:28: branch_true: following ‘true’ branch (when ‘i < attrs_count’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:860:22: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:859:28: branch_true: following ‘true’ branch (when ‘i < attrs_count’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:860:22: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:866:15: call_function: calling ‘kmip_new_attributes’ from ‘kmip_new_attributes_va’
#  360|   		return -EBADMSG;
#  361|   
#  362|-> 	vend = kmip_node_get_structure_element_by_tag(node,
#  363|   					KMIP_TAG_VENDOR_IDENTIFICATION, 0);
#  364|   	nam = kmip_node_get_structure_element_by_tag(node,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def862]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:362:16: warning[-Wanalyzer-malloc-leak]: leak of ‘v1_attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: enter_function: entry to ‘kmip_new_attributes’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:772:20: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:775:28: branch_false: following ‘false’ branch (when ‘v1_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:29: branch_true: following ‘true’ branch (when ‘attrs_count > i’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:780:40: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:781:28: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: call_function: calling ‘kmip_v1_attr_from_v2_attr’ from ‘kmip_new_attributes’
#  360|   		return -EBADMSG;
#  361|   
#  362|-> 	vend = kmip_node_get_structure_element_by_tag(node,
#  363|   					KMIP_TAG_VENDOR_IDENTIFICATION, 0);
#  364|   	nam = kmip_node_get_structure_element_by_tag(node,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def863]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:364:15: warning[-Wanalyzer-malloc-leak]: leak of ‘v1_attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: enter_function: entry to ‘kmip_new_attributes’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:772:20: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:775:28: branch_false: following ‘false’ branch (when ‘v1_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:29: branch_true: following ‘true’ branch (when ‘attrs_count > i’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:780:40: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:781:28: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: call_function: calling ‘kmip_v1_attr_from_v2_attr’ from ‘kmip_new_attributes’
#  362|   	vend = kmip_node_get_structure_element_by_tag(node,
#  363|   					KMIP_TAG_VENDOR_IDENTIFICATION, 0);
#  364|-> 	nam = kmip_node_get_structure_element_by_tag(node,
#  365|   						     KMIP_TAG_ATTRIBUTE_NAME,
#  366|   						     0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def864]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:367:15: warning[-Wanalyzer-malloc-leak]: leak of ‘v1_attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: enter_function: entry to ‘kmip_new_attributes’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:772:20: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:775:28: branch_false: following ‘false’ branch (when ‘v1_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:29: branch_true: following ‘true’ branch (when ‘attrs_count > i’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:780:40: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:781:28: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: call_function: calling ‘kmip_v1_attr_from_v2_attr’ from ‘kmip_new_attributes’
#  365|   						     KMIP_TAG_ATTRIBUTE_NAME,
#  366|   						     0);
#  367|-> 	val = kmip_node_get_structure_element_by_tag(node,
#  368|   						     KMIP_TAG_ATTRIBUTE_VALUE,
#  369|   						     0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def865]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:376:30: warning[-Wanalyzer-malloc-leak]: leak of ‘v1_attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: enter_function: entry to ‘kmip_new_attributes’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:772:20: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:775:28: branch_false: following ‘false’ branch (when ‘v1_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:29: branch_true: following ‘true’ branch (when ‘attrs_count > i’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:780:40: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:781:28: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: call_function: calling ‘kmip_v1_attr_from_v2_attr’ from ‘kmip_new_attributes’
#  374|   
#  375|   	if (vendor_id != NULL)
#  376|-> 		*vendor_id = kmip_node_get_text_string(vend);
#  377|   	if (name != NULL)
#  378|   		*name = kmip_node_get_text_string(nam);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def866]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:378:25: warning[-Wanalyzer-malloc-leak]: leak of ‘v1_attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: enter_function: entry to ‘kmip_new_attributes’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:772:20: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:775:28: branch_false: following ‘false’ branch (when ‘v1_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:29: branch_true: following ‘true’ branch (when ‘attrs_count > i’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:780:40: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:781:28: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: call_function: calling ‘kmip_v1_attr_from_v2_attr’ from ‘kmip_new_attributes’
#  376|   		*vendor_id = kmip_node_get_text_string(vend);
#  377|   	if (name != NULL)
#  378|-> 		*name = kmip_node_get_text_string(nam);
#  379|   	if (value != NULL)
#  380|   		*value =  val;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def867]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:383:9: warning[-Wanalyzer-malloc-leak]: leak of ‘v1_attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: enter_function: entry to ‘kmip_new_attributes’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:772:20: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:775:28: branch_false: following ‘false’ branch (when ‘v1_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:29: branch_true: following ‘true’ branch (when ‘attrs_count > i’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:780:40: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:781:28: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: call_function: calling ‘kmip_v1_attr_from_v2_attr’ from ‘kmip_new_attributes’
#  381|   
#  382|   out:
#  383|-> 	kmip_node_free(vend);
#  384|   	kmip_node_free(nam);
#  385|   	if (value == NULL || rc != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def868]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:384:9: warning[-Wanalyzer-malloc-leak]: leak of ‘v1_attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: enter_function: entry to ‘kmip_new_attributes’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:772:20: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:775:28: branch_false: following ‘false’ branch (when ‘v1_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:29: branch_true: following ‘true’ branch (when ‘attrs_count > i’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:780:40: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:781:28: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:784:30: call_function: calling ‘kmip_v1_attr_from_v2_attr’ from ‘kmip_new_attributes’
#  382|   out:
#  383|   	kmip_node_free(vend);
#  384|-> 	kmip_node_free(nam);
#  385|   	if (value == NULL || rc != 0)
#  386|   		kmip_node_free(val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def869]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:751:27: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:844:19: enter_function: entry to ‘kmip_new_attributes_va’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:852:12: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:853:25: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:853:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:854:20: branch_false: following ‘false’ branch (when ‘attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:859:28: branch_true: following ‘true’ branch (when ‘i < attrs_count’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:860:22: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:859:28: branch_true: following ‘true’ branch (when ‘i < attrs_count’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:860:22: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:866:15: call_function: calling ‘kmip_new_attributes’ from ‘kmip_new_attributes_va’
#  749|   
#  750|   	if (version == NULL)
#  751|-> 		version = kmip_get_default_protocol_version();
#  752|   
#  753|   	if (version->major == 1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def870]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:796:25: warning[-Wanalyzer-malloc-leak]: leak of ‘v1_attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:739:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:772:20: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:773:36: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:775:28: branch_false: following ‘false’ branch (when ‘v1_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:779:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:781:28: branch_true: following ‘true’ branch (when ‘attr’ is NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:782:33: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:793:29: branch_true: following ‘true’ branch (when ‘attrs_count > i’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:794:37: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:796:25: throw: if ‘kmip_node_free’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:796:25: danger: ‘v1_attrs’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  794|   			if (v1_attrs[i] == NULL)
#  795|   				continue;
#  796|-> 			kmip_node_free(v1_attrs[i]);
#  797|   		}
#  798|   		if (v1_attrs != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def871]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:997:16: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1190:5: enter_function: entry to ‘kmip_get_attribute_name_v1’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1198:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1201:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1201:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1204:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1205:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1208:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1210:24: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1211:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: call_function: calling ‘kmip_split_v1_custom_attr_name’ from ‘kmip_get_attribute_name_v1’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: return_function: returning to ‘kmip_get_attribute_name_v1’ from ‘kmip_split_v1_custom_attr_name’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1216:20: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1221:32: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1221:32: call_function: calling ‘kmip_new_attribute_reference’ from ‘kmip_get_attribute_name_v1’
#  995|   						 NULL, attr_tag);
#  996|   
#  997|-> 	vend = kmip_node_new_text_string(KMIP_TAG_VENDOR_IDENTIFICATION, NULL,
#  998|   					 vendor_id);
#  999|   	nam = kmip_node_new_text_string(KMIP_TAG_ATTRIBUTE_NAME, NULL, name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def872]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:999:15: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1190:5: enter_function: entry to ‘kmip_get_attribute_name_v1’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1198:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1201:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1201:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1204:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1205:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1208:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1210:24: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1211:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: call_function: calling ‘kmip_split_v1_custom_attr_name’ from ‘kmip_get_attribute_name_v1’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: return_function: returning to ‘kmip_get_attribute_name_v1’ from ‘kmip_split_v1_custom_attr_name’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1216:20: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1221:32: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1221:32: call_function: calling ‘kmip_new_attribute_reference’ from ‘kmip_get_attribute_name_v1’
#  997|   	vend = kmip_node_new_text_string(KMIP_TAG_VENDOR_IDENTIFICATION, NULL,
#  998|   					 vendor_id);
#  999|-> 	nam = kmip_node_new_text_string(KMIP_TAG_ATTRIBUTE_NAME, NULL, name);
# 1000|   	if (nam == NULL || vend == NULL)
# 1001|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def873]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1003:15: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1190:5: enter_function: entry to ‘kmip_get_attribute_name_v1’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1198:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1201:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1201:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1204:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1205:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1208:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1210:24: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1211:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: call_function: calling ‘kmip_split_v1_custom_attr_name’ from ‘kmip_get_attribute_name_v1’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: return_function: returning to ‘kmip_get_attribute_name_v1’ from ‘kmip_split_v1_custom_attr_name’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1216:20: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1221:32: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1221:32: call_function: calling ‘kmip_new_attribute_reference’ from ‘kmip_get_attribute_name_v1’
# 1001|   		goto out;
# 1002|   
# 1003|-> 	ref = kmip_node_new_structure_va(KMIP_TAG_ATTRIBUTE_REFERENCE, NULL,
# 1004|   					 2, vend, nam);
# 1005|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def874]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1007:9: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1190:5: enter_function: entry to ‘kmip_get_attribute_name_v1’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1198:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1201:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1201:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1204:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1205:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1208:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1210:24: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1211:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: call_function: calling ‘kmip_split_v1_custom_attr_name’ from ‘kmip_get_attribute_name_v1’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: return_function: returning to ‘kmip_get_attribute_name_v1’ from ‘kmip_split_v1_custom_attr_name’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1216:20: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1221:32: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1221:32: call_function: calling ‘kmip_new_attribute_reference’ from ‘kmip_get_attribute_name_v1’
# 1005|   
# 1006|   out:
# 1007|-> 	kmip_node_free(nam);
# 1008|   	kmip_node_free(vend);
# 1009|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def875]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1008:9: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1190:5: enter_function: entry to ‘kmip_get_attribute_name_v1’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1198:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1201:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1201:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1204:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1205:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1208:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1210:24: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1211:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: call_function: calling ‘kmip_split_v1_custom_attr_name’ from ‘kmip_get_attribute_name_v1’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1214:22: return_function: returning to ‘kmip_get_attribute_name_v1’ from ‘kmip_split_v1_custom_attr_name’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1216:20: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1221:32: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/attribute.c:1221:32: call_function: calling ‘kmip_new_attribute_reference’ from ‘kmip_get_attribute_name_v1’
# 1006|   out:
# 1007|   	kmip_node_free(nam);
# 1008|-> 	kmip_node_free(vend);
# 1009|   
# 1010|   	return ref;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def876]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:232:27: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:299:19: enter_function: entry to ‘kmip_new_key_value_va’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:307:12: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:308:25: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:308:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:309:20: branch_false: following ‘false’ branch (when ‘attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:313:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:314:28: branch_true: following ‘true’ branch (when ‘i < attrs_count’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:315:22: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:314:28: branch_true: following ‘true’ branch (when ‘i < attrs_count’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:315:22: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:321:15: call_function: calling ‘kmip_new_key_value’ from ‘kmip_new_key_value_va’
#  230|   
#  231|   	if (version == NULL)
#  232|-> 		version = kmip_get_default_protocol_version();
#  233|   
#  234|   	if (version->major == 1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def877]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:236:23: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:299:19: enter_function: entry to ‘kmip_new_key_value_va’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:307:12: branch_true: following ‘true’ branch (when ‘attrs_count != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:308:25: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:308:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:309:20: branch_false: following ‘false’ branch (when ‘attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:313:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:314:28: branch_true: following ‘true’ branch (when ‘i < attrs_count’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:315:22: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:314:28: branch_true: following ‘true’ branch (when ‘i < attrs_count’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:315:22: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/key.c:321:15: call_function: calling ‘kmip_new_key_value’ from ‘kmip_new_key_value_va’
#  234|   	if (version->major == 1) {
#  235|   		/* KMIP v1.x */
#  236|-> 		ret = kmip_node_new_structure_va(KMIP_TAG_KEY_VALUE, NULL, 1,
#  237|   						 key_material);
#  238|   		if (ret == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def878]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:864:17: warning[-Wanalyzer-malloc-leak]: leak of ‘kmip_node_new(*node.tag, *node.name, *node.type)’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:855:19: enter_function: entry to ‘kmip_node_clone’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:860:17: call_function: calling ‘kmip_node_new’ from ‘kmip_node_clone’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:860:17: return_function: returning to ‘kmip_node_clone’ from ‘kmip_node_new’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:861:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:864:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:886:44: throw: if ‘BN_dup’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:864:17: danger: ‘kmip_node_new(*node.tag, *node.name, *node.type)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  862|   		return NULL;
#  863|   
#  864|-> 	switch (clone->type) {
#  865|   	case KMIP_TYPE_STRUCTURE:
#  866|   		element = node->structure_value;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def879]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:886:44: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:855:19: enter_function: entry to ‘kmip_node_clone’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:860:17: call_function: calling ‘kmip_node_new’ from ‘kmip_node_clone’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:860:17: return_function: returning to ‘kmip_node_clone’ from ‘kmip_node_new’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:861:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:864:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:886:44: throw: if ‘BN_dup’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:886:44: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/7)
#  884|   		break;
#  885|   	case KMIP_TYPE_BIG_INTEGER:
#  886|-> 		clone->big_integer_value = BN_dup(node->big_integer_value);
#  887|   		if (clone->big_integer_value == NULL)
#  888|   			goto error;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def880]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:901:41: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘strdup(*node.u.text_value)’ where non-null expected
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:855:19: enter_function: entry to ‘kmip_node_clone’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:860:17: call_function: calling ‘kmip_node_new’ from ‘kmip_node_clone’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:860:17: return_function: returning to ‘kmip_node_clone’ from ‘kmip_node_new’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:861:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:864:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:897:20: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:898:45: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:898:45: acquire_memory: this call could return NULL
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:899:28: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:901:41: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:901:41: danger: argument 1 (‘strdup(*node.u.text_value)’) from [(15)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/14) could be NULL where non-null expected
#  899|   			if (node->text_value == NULL)
#  900|   				goto error;
#  901|-> 			clone->length = strlen(clone->text_value);
#  902|   		}
#  903|   		break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def881]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1124:9: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1124:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1124:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1124:9: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1124:9: danger: ‘conn’ leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
# 1122|   	conn->config.encoding = config->encoding;
# 1123|   	conn->config.transport = config->transport;
# 1124|-> 	kmip_debug(debug, "encoding: %d", conn->config.encoding);
# 1125|   	kmip_debug(debug, "transport: %d", conn->config.transport);
# 1126|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def882]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1125:9: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1124:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1124:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1125:9: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1125:9: danger: ‘conn’ leaks here; was allocated at [(9)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/8)
# 1123|   	conn->config.transport = config->transport;
# 1124|   	kmip_debug(debug, "encoding: %d", conn->config.encoding);
# 1125|-> 	kmip_debug(debug, "transport: %d", conn->config.transport);
# 1126|   
# 1127|   	conn->config.server = strdup(config->server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def883]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1129:17: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1129:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1129:17: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1129:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1129:17: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1129:17: danger: ‘conn’ leaks here; was allocated at [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
# 1127|   	conn->config.server = strdup(config->server);
# 1128|   	if (conn->config.server == NULL) {
# 1129|-> 		kmip_debug(debug, "strdup failed");
# 1130|   		rc = -ENOMEM;
# 1131|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def884]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1127:31: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/10)
# 1131|   		goto out;
# 1132|   	}
# 1133|-> 	kmip_debug(debug, "server: '%s'", conn->config.server);
# 1134|   
# 1135|   	conn->config.tls_client_key = config->tls_client_key;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def885]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: danger: ‘conn’ leaks here; was allocated at [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8)
# 1131|   		goto out;
# 1132|   	}
# 1133|-> 	kmip_debug(debug, "server: '%s'", conn->config.server);
# 1134|   
# 1135|   	conn->config.tls_client_key = config->tls_client_key;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def886]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1127:31: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: following ‘false’ branch (when ‘debug == 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1135:39: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:13: throw: if ‘EVP_PKEY_up_ref’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:13: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/10)
# 1134|   
# 1135|   	conn->config.tls_client_key = config->tls_client_key;
# 1136|-> 	if (EVP_PKEY_up_ref(conn->config.tls_client_key) != 1) {
# 1137|   		kmip_debug(debug, "EVP_PKEY_up_ref failed");
# 1138|   		rc = -EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def887]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:13: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: following ‘false’ branch (when ‘debug == 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1135:39: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:13: throw: if ‘EVP_PKEY_up_ref’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:13: danger: ‘conn’ leaks here; was allocated at [(9)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/8)
# 1134|   
# 1135|   	conn->config.tls_client_key = config->tls_client_key;
# 1136|-> 	if (EVP_PKEY_up_ref(conn->config.tls_client_key) != 1) {
# 1137|   		kmip_debug(debug, "EVP_PKEY_up_ref failed");
# 1138|   		rc = -EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def888]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1137:17: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1137:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1137:17: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1137:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1137:17: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1137:17: danger: ‘conn’ leaks here; was allocated at [(9)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/8)
# 1135|   	conn->config.tls_client_key = config->tls_client_key;
# 1136|   	if (EVP_PKEY_up_ref(conn->config.tls_client_key) != 1) {
# 1137|-> 		kmip_debug(debug, "EVP_PKEY_up_ref failed");
# 1138|   		rc = -EIO;
# 1139|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def889]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: danger: ‘conn’ leaks here; was allocated at [(9)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/8)
# 1139|   		goto out;
# 1140|   	}
# 1141|-> 	kmip_debug(debug, "client key: %p", conn->config.tls_client_key);
# 1142|   
# 1143|   	conn->config.tls_client_cert = strdup(config->tls_client_cert);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def890]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1145:17: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1144:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1145:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1145:17: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1145:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1145:17: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1145:17: danger: ‘conn’ leaks here; was allocated at [(9)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/8)
# 1143|   	conn->config.tls_client_cert = strdup(config->tls_client_cert);
# 1144|   	if (conn->config.tls_client_cert == NULL) {
# 1145|-> 		kmip_debug(debug, "strdup failed");
# 1146|   		rc = -ENOMEM;
# 1147|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def891]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1143:40: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1144:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: danger: ‘<unknown>’ leaks here; was allocated at [(19)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/18)
# 1147|   		goto out;
# 1148|   	}
# 1149|-> 	kmip_debug(debug, "client cert: '%s'", conn->config.tls_client_cert);
# 1150|   
# 1151|   	if (config->tls_ca != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def892]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1144:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: danger: ‘conn’ leaks here; was allocated at [(9)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/8)
# 1147|   		goto out;
# 1148|   	}
# 1149|-> 	kmip_debug(debug, "client cert: '%s'", conn->config.tls_client_cert);
# 1150|   
# 1151|   	if (config->tls_ca != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def893]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1154:25: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1144:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1151:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1152:39: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1153:20: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1154:25: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1154:25: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1154:25: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1154:25: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1154:25: danger: ‘conn’ leaks here; was allocated at [(9)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/8)
# 1152|   		conn->config.tls_ca = strdup(config->tls_ca);
# 1153|   		if (conn->config.tls_ca == NULL) {
# 1154|-> 			kmip_debug(debug, "strdup failed");
# 1155|   			rc = -ENOMEM;
# 1156|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def894]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1158:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1144:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1151:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1152:39: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1152:39: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1153:20: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1158:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1158:17: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1158:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1158:17: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1158:17: danger: ‘<unknown>’ leaks here; was allocated at [(25)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/24)
# 1156|   			goto out;
# 1157|   		}
# 1158|-> 		kmip_debug(debug, "CA: '%s'", conn->config.tls_ca);
# 1159|   	}
# 1160|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def895]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1158:17: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1144:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1151:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1152:39: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1153:20: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1158:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1158:17: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1158:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1158:17: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1158:17: danger: ‘conn’ leaks here; was allocated at [(9)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/8)
# 1156|   			goto out;
# 1157|   		}
# 1158|-> 		kmip_debug(debug, "CA: '%s'", conn->config.tls_ca);
# 1159|   	}
# 1160|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def896]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1164:25: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1144:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1151:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1161:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1161:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1162:48: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1163:20: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1164:25: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1164:25: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1164:25: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1164:25: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1164:25: danger: ‘conn’ leaks here; was allocated at [(9)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/8)
# 1162|   		conn->config.tls_issuer_cert = strdup(config->tls_issuer_cert);
# 1163|   		if (conn->config.tls_issuer_cert == NULL) {
# 1164|-> 			kmip_debug(debug, "strdup failed");
# 1165|   			rc = -ENOMEM;
# 1166|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def897]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1168:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1060:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1103:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1107:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1111:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1116:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1117:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1122:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1128:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1133:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1136:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1141:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1144:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1149:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1151:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1161:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1161:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1162:48: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1162:48: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1163:20: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1168:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1168:17: branch_true: following ‘true’ branch (when ‘debug != 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1168:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1168:17: throw: if ‘kmip_print_debug’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:1168:17: danger: ‘<unknown>’ leaks here; was allocated at [(27)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/26)
# 1166|   			goto out;
# 1167|   		}
# 1168|-> 		kmip_debug(debug, "issuer cert: '%s'",
# 1169|   			   conn->config.tls_issuer_cert);
# 1170|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def898]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:58:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*conn.config.tls_pinned_pubkey, "r")’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:50:14: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:51:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:58:22: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:58:22: throw: if ‘PEM_read_PUBKEY’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:58:22: danger: ‘fopen(*conn.config.tls_pinned_pubkey, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   56|   	}
#   57|   
#   58|-> 	pinned_key = PEM_read_PUBKEY(fp, NULL, NULL, NULL);
#   59|   	fclose(fp);
#   60|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def899]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:108:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*conn.config.tls_server_cert, "r")’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:100:14: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:101:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:108:23: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:108:23: throw: if ‘PEM_read_X509’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:108:23: danger: ‘fopen(*conn.config.tls_server_cert, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  106|   	}
#  107|   
#  108|-> 	pinned_cert = PEM_read_X509(fp, NULL, NULL, NULL);
#  109|   	fclose(fp);
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def900]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:155:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*conn.config.tls_issuer_cert, "r")’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:147:14: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:148:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:155:23: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:155:23: throw: if ‘PEM_read_X509’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:155:23: danger: ‘fopen(*conn.config.tls_issuer_cert, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  153|   	}
#  154|   
#  155|-> 	issuer_cert = PEM_read_X509(fp, NULL, NULL, NULL);
#  156|   	fclose(fp);
#  157|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def901]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/utils.c:35:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/utils.c:680:6: enter_function: entry to ‘kmip_node_dump’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/utils.c:682:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/utils.c:685:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/utils.c:685:9: call_function: calling ‘kmip_node_dump_int’ from ‘kmip_node_dump’
#   33|   
#   34|   	va_start(ap, fmt);
#   35|-> 	vwarnx(tmp_fmt, ap);
#   36|   	va_end(ap);
#   37|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def902]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:726:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:699:8: branch_true: following ‘true’ branch (when ‘file_loc’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:700:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:700:14: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:701:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:726:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:726:9: throw: if ‘parse_configlib_file’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:726:9: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  724|       }
#  725|   
#  726|->     if (parse_configlib_file(fp, &p11kmip_cfg, 
#  727|                                parse_config_file_error_hook, 0)) {
#  728|           warnx("Failed to parse config file '%s'", file_loc);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def903]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:726:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:699:8: branch_true: following ‘true’ branch (when ‘file_loc’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:700:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:700:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:701:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:726:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:726:9: throw: if ‘parse_configlib_file’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:726:9: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  724|       }
#  725|   
#  726|->     if (parse_configlib_file(fp, &p11kmip_cfg, 
#  727|                                parse_config_file_error_hook, 0)) {
#  728|           warnx("Failed to parse config file '%s'", file_loc);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def904]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1183:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(cert_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1175:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1176:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1183:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1183:12: throw: if ‘PEM_read_X509’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1183:12: danger: ‘fopen(cert_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1181|       }
# 1182|   
# 1183|->     cert = PEM_read_X509(fp, NULL, NULL, NULL);
# 1184|       fclose(fp);
# 1185|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def905]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1183:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(cert_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1175:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1176:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1183:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1183:12: throw: if ‘PEM_read_X509’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1183:12: danger: ‘fopen(cert_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 1181|       }
# 1182|   
# 1183|->     cert = PEM_read_X509(fp, NULL, NULL, NULL);
# 1184|       fclose(fp);
# 1185|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def906]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1226:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(cert_pem, "r")’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1216:8: branch_false: following ‘false’ branch (when ‘cert_pem’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1219:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1219:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1220:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1220:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1226:16: throw: if ‘PEM_read_X509’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1226:16: danger: ‘fopen(cert_pem, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 1224|   
# 1225|       while (1) {
# 1226|->         cert = PEM_read_X509(fp, NULL, NULL, NULL);
# 1227|           if (cert == NULL)
# 1228|               break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def907]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1226:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(cert_pem, "r")’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1216:8: branch_false: following ‘false’ branch (when ‘cert_pem’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1219:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1219:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1220:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1220:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1226:16: throw: if ‘PEM_read_X509’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1226:16: danger: ‘fopen(cert_pem, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 1224|   
# 1225|       while (1) {
# 1226|->         cert = PEM_read_X509(fp, NULL, NULL, NULL);
# 1227|           if (cert == NULL)
# 1228|               break;

Error: GCC_ANALYZER_WARNING: [#def908]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2500:13: warning[-Wanalyzer-overlapping-buffers]: overlapping buffers passed as arguments to ‘memcpy’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2491:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2491:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2498:17: branch_true: following ‘true’ branch (when ‘i < wrapped_key_num_attrs’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2499:30: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2499:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2501:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2500:13: danger: overlapping buffers passed as arguments to ‘memcpy’
# 2498|       for (i = 0; i < wrapped_key_num_attrs; i++) {
# 2499|           if (wrapped_key_attrs[i].type == CKA_TOKEN) {
# 2500|->             memcpy(wrapped_key_attrs[0].pValue, wrapped_key_attrs[i].pValue, 
# 2501|                   wrapped_key_attrs[i].ulValueLen);
# 2502|           } else if (wrapped_key_attrs[i].type == CKA_SENSITIVE) {

Error: CPPCHECK_WARNING (CWE-476): [#def909]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2926: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: attrs
# 2924|   
# 2925|       /* Set the label */
# 2926|->     attrs[k] =
# 2927|           kmip_new_name((char *) label, KMIP_NAME_TYPE_UNINTERPRETED_TEXT_STRING);
# 2928|       if (attrs[k] == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def910]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2926:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2884:14: enter_function: entry to ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2904:16: call_function: inlined call to ‘get_kmip_obj_class_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2906:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2913:15: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2915:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: acquire_memory: this call could return NULL
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2926:5: danger: ‘attrs’ could be NULL: unchecked value from [(12)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/11)
# 2924|   
# 2925|       /* Set the label */
# 2926|->     attrs[k] =
# 2927|           kmip_new_name((char *) label, KMIP_NAME_TYPE_UNINTERPRETED_TEXT_STRING);
# 2928|       if (attrs[k] == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def911]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2927:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2884:14: enter_function: entry to ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2904:16: call_function: inlined call to ‘get_kmip_obj_class_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2906:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2913:15: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2915:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2927:9: throw: if ‘kmip_new_name’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2927:9: danger: ‘attrs’ leaks here; was allocated at [(12)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/11)
# 2925|       /* Set the label */
# 2926|       attrs[k] =
# 2927|->         kmip_new_name((char *) label, KMIP_NAME_TYPE_UNINTERPRETED_TEXT_STRING);
# 2928|       if (attrs[k] == NULL) {
# 2929|           rc = CKR_HOST_MEMORY;

Error: CPPCHECK_WARNING (CWE-476): [#def912]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2928: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: attrs
# 2926|       attrs[k] =
# 2927|           kmip_new_name((char *) label, KMIP_NAME_TYPE_UNINTERPRETED_TEXT_STRING);
# 2928|->     if (attrs[k] == NULL) {
# 2929|           rc = CKR_HOST_MEMORY;
# 2930|           warnx("Allocate KMIP node failed");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def913]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2930:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2884:14: enter_function: entry to ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2904:16: call_function: inlined call to ‘get_kmip_obj_class_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2906:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2913:15: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2915:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2928:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2930:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2930:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2930:9: danger: ‘attrs’ leaks here; was allocated at [(12)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/11)
# 2928|       if (attrs[k] == NULL) {
# 2929|           rc = CKR_HOST_MEMORY;
# 2930|->         warnx("Allocate KMIP node failed");
# 2931|           goto out;
# 2932|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def914]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2936:16: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2884:14: enter_function: entry to ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2904:16: call_function: inlined call to ‘get_kmip_obj_class_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2906:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2913:15: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2915:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2928:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2936:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2936:16: throw: if ‘kmip_new_object_type’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2936:16: danger: ‘attrs’ leaks here; was allocated at [(12)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/11)
# 2934|   
# 2935|       /* Set the object type */
# 2936|->     attrs[k] = kmip_new_object_type(obj_type);
# 2937|       if (attrs[k] == NULL) {
# 2938|           rc = CKR_HOST_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def915]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2939:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2884:14: enter_function: entry to ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2904:16: call_function: inlined call to ‘get_kmip_obj_class_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2906:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2913:15: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2915:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2928:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2936:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2937:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2939:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2939:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2939:9: danger: ‘attrs’ leaks here; was allocated at [(12)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/11)
# 2937|       if (attrs[k] == NULL) {
# 2938|           rc = CKR_HOST_MEMORY;
# 2939|->         warnx("Allocate KMIP node failed");
# 2940|           goto out;
# 2941|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def916]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2945:16: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2884:14: enter_function: entry to ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2904:16: call_function: inlined call to ‘get_kmip_obj_class_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2906:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2913:15: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2915:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2928:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2936:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2937:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2945:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2945:16: throw: if ‘kmip_new_cryptographic_algorithm’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2945:16: danger: ‘attrs’ leaks here; was allocated at [(12)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/11)
# 2943|   
# 2944|       /* Set the key algorithm */
# 2945|->     attrs[k] = kmip_new_cryptographic_algorithm(key_alg);
# 2946|       if (attrs[k] == NULL) {
# 2947|           rc = CKR_HOST_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def917]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2948:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2884:14: enter_function: entry to ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2904:16: call_function: inlined call to ‘get_kmip_obj_class_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2906:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2913:15: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2915:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2928:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2936:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2937:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2945:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2946:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2948:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2948:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2948:9: danger: ‘attrs’ leaks here; was allocated at [(12)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/11)
# 2946|       if (attrs[k] == NULL) {
# 2947|           rc = CKR_HOST_MEMORY;
# 2948|->         warnx("Allocate KMIP node failed");
# 2949|           goto out;
# 2950|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def918]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2953:14: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2884:14: enter_function: entry to ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2904:16: call_function: inlined call to ‘get_kmip_obj_class_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2906:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2913:15: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2915:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2928:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2936:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2937:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2945:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2946:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2953:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2953:14: throw: if ‘kmip_new_locate_request_payload’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2953:14: danger: ‘attrs’ leaks here; was allocated at [(12)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/11)
# 2951|       k++;
# 2952|   
# 2953|->     req_pl = kmip_new_locate_request_payload(NULL, 0, 0, 0, 0,
# 2954|                                                num_attrs, attrs);
# 2955|       if (req_pl == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def919]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2992:13: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2884:14: enter_function: entry to ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2904:16: call_function: inlined call to ‘get_kmip_obj_class_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2906:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2913:15: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2915:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2928:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2930:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2991:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2992:33: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2992:13: throw: if ‘kmip_node_free’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2992:13: danger: ‘attrs’ leaks here; was allocated at [(12)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/11)
# 2990|       if (attrs != NULL) {
# 2991|           for (i = 0; i < num_attrs; i++)
# 2992|->             kmip_node_free(attrs[i]);
# 2993|           free(attrs);
# 2994|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def920]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3890:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3890:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3890:9: danger: ‘attrs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 3888|   
# 3889|       if (secret_alg == P11KMIP_KMIP_UNKNOWN_ALG) {
# 3890|->         warnx("Invalid key type being generated");
# 3891|           rc = CKR_FUNCTION_NOT_SUPPORTED;
# 3892|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def921]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3870:14: enter_function: entry to ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: this call could return NULL
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3887:18: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3889:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:5: danger: ‘attrs’ could be NULL: unchecked value from [(2)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/1)
# 3892|           goto out;
# 3893|       }
# 3894|->     attrs[idx] = kmip_new_cryptographic_algorithm(secret_alg);
# 3895|   
# 3896|       if (attrs[idx] == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def922]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3870:14: enter_function: entry to ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3887:18: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3889:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: throw: if ‘kmip_new_cryptographic_algorithm’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: danger: ‘attrs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/1)
# 3892|           goto out;
# 3893|       }
# 3894|->     attrs[idx] = kmip_new_cryptographic_algorithm(secret_alg);
# 3895|   
# 3896|       if (attrs[idx] == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def923]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3897:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3870:14: enter_function: entry to ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3887:18: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3889:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3896:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3897:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3897:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3897:9: danger: ‘attrs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/1)
# 3895|   
# 3896|       if (attrs[idx] == NULL) {
# 3897|->         warnx("Allocate KMIP node failed");
# 3898|           rc = CKR_HOST_MEMORY;
# 3899|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def924]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3904:18: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3870:14: enter_function: entry to ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3887:18: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3889:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3896:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3904:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3904:18: throw: if ‘kmip_new_cryptographic_length’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3904:18: danger: ‘attrs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/1)
# 3902|   
# 3903|       /* Cryptographic length wants it in bits */
# 3904|->     attrs[idx] = kmip_new_cryptographic_length(keysize * 8);
# 3905|       if (attrs[idx] == NULL) {
# 3906|           warnx("Allocate KMIP node failed");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def925]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3906:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3870:14: enter_function: entry to ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3887:18: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3889:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3896:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3904:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3905:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3906:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3906:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3906:9: danger: ‘attrs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/1)
# 3904|       attrs[idx] = kmip_new_cryptographic_length(keysize * 8);
# 3905|       if (attrs[idx] == NULL) {
# 3906|->         warnx("Allocate KMIP node failed");
# 3907|           rc = CKR_HOST_MEMORY;
# 3908|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def926]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3913:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3870:14: enter_function: entry to ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3887:18: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3889:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3896:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3904:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3905:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3913:43: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3913:9: throw: if ‘kmip_new_cryptographic_usage_mask’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3913:9: danger: ‘attrs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/1)
# 3911|   
# 3912|       attrs[idx] =
# 3913|->         kmip_new_cryptographic_usage_mask(get_kmip_usage_mask_p11(keytype));
# 3914|       if (attrs[idx] == NULL) {
# 3915|           warnx("Allocate KMIP node failed");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def927]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3915:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3870:14: enter_function: entry to ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3887:18: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3889:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3896:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3904:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3905:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3913:43: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3914:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3915:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3915:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3915:9: danger: ‘attrs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/1)
# 3913|           kmip_new_cryptographic_usage_mask(get_kmip_usage_mask_p11(keytype));
# 3914|       if (attrs[idx] == NULL) {
# 3915|->         warnx("Allocate KMIP node failed");
# 3916|           rc = CKR_HOST_MEMORY;
# 3917|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def928]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3922:22: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3870:14: enter_function: entry to ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3887:18: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3889:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3896:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3904:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3905:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3913:43: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3914:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3921:9: call_function: inlined call to ‘supports_sensitive_attr’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3922:22: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3922:22: throw: if ‘kmip_new_sensitive’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3922:22: danger: ‘attrs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/1)
# 3920|   
# 3921|       if (supports_sensitive_attr()) {
# 3922|->         attrs[idx] = kmip_new_sensitive(true);
# 3923|           if (attrs[idx] == NULL) {
# 3924|               warnx("Allocate KMIP node failed");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def929]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3924:13: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3870:14: enter_function: entry to ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3887:18: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3889:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3896:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3904:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3905:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3913:43: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3914:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3921:9: call_function: inlined call to ‘supports_sensitive_attr’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3922:22: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3923:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3924:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3924:13: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3924:13: danger: ‘attrs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/1)
# 3922|           attrs[idx] = kmip_new_sensitive(true);
# 3923|           if (attrs[idx] == NULL) {
# 3924|->             warnx("Allocate KMIP node failed");
# 3925|               rc = CKR_HOST_MEMORY;
# 3926|               goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def930]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3931:18: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3870:14: enter_function: entry to ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3887:18: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3889:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3896:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3904:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3905:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3913:43: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3914:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3921:9: call_function: inlined call to ‘supports_sensitive_attr’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3931:18: throw: if ‘kmip_new_name’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3931:18: danger: ‘attrs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/1)
# 3929|       }
# 3930|   
# 3931|->     attrs[idx] = kmip_new_name(secret_key_label,
# 3932|                                  KMIP_NAME_TYPE_UNINTERPRETED_TEXT_STRING);
# 3933|       if (attrs[idx] == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def931]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3934:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3870:14: enter_function: entry to ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3887:18: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3889:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3896:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3904:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3905:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3913:43: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3914:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3921:9: call_function: inlined call to ‘supports_sensitive_attr’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3933:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3934:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3934:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3934:9: danger: ‘attrs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/1)
# 3932|                                  KMIP_NAME_TYPE_UNINTERPRETED_TEXT_STRING);
# 3933|       if (attrs[idx] == NULL) {
# 3934|->         warnx("Allocate KMIP node failed");
# 3935|           rc = CKR_HOST_MEMORY;
# 3936|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def932]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3940:16: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3870:14: enter_function: entry to ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3887:18: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3889:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3896:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3904:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3905:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3913:43: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3914:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3921:9: call_function: inlined call to ‘supports_sensitive_attr’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3933:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3940:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3940:16: throw: if ‘kmip_new_create_request_payload’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3940:16: danger: ‘attrs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/1)
# 3938|       idx++;
# 3939|   
# 3940|->     crea_req = kmip_new_create_request_payload(NULL,
# 3941|                                                  KMIP_OBJECT_TYPE_SYMMETRIC_KEY,
# 3942|                                                  NULL, num_attrs, attrs);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def933]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3979:13: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3977:8: branch_true: following ‘true’ branch (when ‘attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3977:8: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3978:21: branch_true: following ‘true’ branch (when ‘num_attrs > i’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3979:33: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3979:13: throw: if ‘kmip_node_free’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3979:13: danger: ‘attrs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
# 3977|       if (attrs != NULL) {
# 3978|           for (i = 0; i < num_attrs; i++)
# 3979|->             kmip_node_free(attrs[i]);
# 3980|           free(attrs);
# 3981|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def934]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3624:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pub’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3612:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3613:18: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3619:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3619:16: branch_false: following ‘false’ branch (when ‘pub’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3623:40: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3623:16: branch_true: following ‘true’ branch (when ‘priv’ is NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3624:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3624:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3624:17: danger: ‘pub’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 3622|               }
# 3623|               if (!(priv = strdup(&label[i + 1]))) {
# 3624|->                 warnx("Failed to allocate memory for priv label");
# 3625|                   free(pub);
# 3626|                   return CKR_HOST_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def935]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3636:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pub’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3612:17: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3613:18: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3619:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3619:16: branch_false: following ‘false’ branch (when ‘pub’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3623:40: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3623:16: branch_false: following ‘false’ branch (when ‘priv’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3632:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3632:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3633:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3633:12: branch_true: following ‘true’ branch (when the strings are equal)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3634:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3635:16: branch_true: following ‘true’ branch (when ‘priv’ is NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3636:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3636:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3636:17: danger: ‘pub’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 3634|               free(priv);
# 3635|               if (!(priv = strdup(pub))) {
# 3636|->                 warnx("Failed to allocate memory for priv label");
# 3637|                   free(pub);
# 3638|                   return CKR_HOST_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def936]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3650:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pub’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3632:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3642:28: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3642:21: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3642:12: branch_false: following ‘false’ branch (when ‘pub’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3646:15: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3649:12: branch_true: following ‘true’ branch (when ‘priv’ is NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3650:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3650:13: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3650:13: danger: ‘pub’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 3648|   
# 3649|           if (!(priv = malloc(strlen(label) + 5))) {
# 3650|->             warnx("Failed to allocate memory for priv label");
# 3651|               free(pub);
# 3652|               return CKR_HOST_MEMORY;

Error: COMPILER_WARNING (CWE-704): [#def937]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c: scope_hint: In function ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3687:8: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 3687 |     ch = strchr(attrs, ':');
#      |        ^
# 3685|       }
# 3686|   
# 3687|->     ch = strchr(attrs, ':');
# 3688|   
# 3689|       if (ch == NULL) {

Error: COMPILER_WARNING (CWE-704): [#def938]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3687:8: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 3685|       }
# 3686|   
# 3687|->     ch = strchr(attrs, ':');
# 3688|   
# 3689|       if (ch == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def939]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3698:9: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
# 3696|   
# 3697|       if (pub == NULL || priv == NULL) {
# 3698|->         warnx("Failed to allocate memory for pub/priv labels");
# 3699|           free(pub);
# 3700|           free(priv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def940]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3698:9: warning[-Wanalyzer-malloc-leak]: leak of ‘priv’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3681:8: branch_false: following ‘false’ branch (when ‘attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3687:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3689:8: branch_true: following ‘true’ branch (when ‘ch’ is NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3690:15: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3691:16: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3697:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3698:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3698:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3698:9: danger: ‘priv’ leaks here; was allocated at [(6)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/5)
# 3696|   
# 3697|       if (pub == NULL || priv == NULL) {
# 3698|->         warnx("Failed to allocate memory for pub/priv labels");
# 3699|           free(pub);
# 3700|           free(priv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def941]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3698:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
# 3696|   
# 3697|       if (pub == NULL || priv == NULL) {
# 3698|->         warnx("Failed to allocate memory for pub/priv labels");
# 3699|           free(pub);
# 3700|           free(priv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def942]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3698:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pub’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3681:8: branch_false: following ‘false’ branch (when ‘attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3687:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3689:8: branch_true: following ‘true’ branch (when ‘ch’ is NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3690:15: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3690:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3697:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3698:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3698:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3698:9: danger: ‘pub’ leaks here; was allocated at [(6)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/5)
# 3696|   
# 3697|       if (pub == NULL || priv == NULL) {
# 3698|->         warnx("Failed to allocate memory for pub/priv labels");
# 3699|           free(pub);
# 3700|           free(priv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def943]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3814:10: warning[-Wanalyzer-malloc-leak]: leak of ‘matched_objs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10389:14: enter_function: entry to ‘p11sak_extract_cert_pubkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10395:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10398:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10400:10: call_function: calling ‘iterate_objects’ from ‘p11sak_extract_cert_pubkey’
# 3812|       char *common_name_val = NULL;
# 3813|   
# 3814|->     rc = p11tool_get_label_value(obj, &label_val);
# 3815|       if (rc != CKR_OK)
# 3816|           return rc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def944]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3818:10: warning[-Wanalyzer-malloc-leak]: leak of ‘matched_objs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10389:14: enter_function: entry to ‘p11sak_extract_cert_pubkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10395:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10398:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10400:10: call_function: calling ‘iterate_objects’ from ‘p11sak_extract_cert_pubkey’
# 3816|           return rc;
# 3817|   
# 3818|->     rc = p11tool_get_class_and_type_values(obj, label_val, &class_val,
# 3819|                                              &otype_val);
# 3820|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def945]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3831:13: warning[-Wanalyzer-malloc-leak]: leak of ‘matched_objs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10389:14: enter_function: entry to ‘p11sak_extract_cert_pubkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10395:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10398:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10400:10: call_function: calling ‘iterate_objects’ from ‘p11sak_extract_cert_pubkey’
# 3829|           objtype_val = find_keytype(otype_val);
# 3830|           if (objtype_val == NULL) {
# 3831|->             warnx("Object \"%s\" has an unsupported type: %lu",
# 3832|                     label_val, otype_val);
# 3833|               free(label_val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def946]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3837:18: warning[-Wanalyzer-malloc-leak]: leak of ‘matched_objs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10389:14: enter_function: entry to ‘p11sak_extract_cert_pubkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10395:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10398:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10400:10: call_function: calling ‘iterate_objects’ from ‘p11sak_extract_cert_pubkey’
# 3835|           }
# 3836|           if (keysize != NULL) {
# 3837|->             rc = p11tool_get_keysize_value(obj, label_val, objtype_val,
# 3838|                                              &keysize_val);
# 3839|               if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def947]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3849:13: warning[-Wanalyzer-malloc-leak]: leak of ‘matched_objs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10389:14: enter_function: entry to ‘p11sak_extract_cert_pubkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10395:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10398:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10400:10: call_function: calling ‘iterate_objects’ from ‘p11sak_extract_cert_pubkey’
# 3847|           objtype_val = find_certtype(otype_val);
# 3848|           if (objtype_val == NULL) {
# 3849|->             warnx("Object \"%s\" has an unsupported type: %lu",
# 3850|                     label_val, otype_val);
# 3851|               free(label_val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def948]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3855:18: warning[-Wanalyzer-malloc-leak]: leak of ‘matched_objs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10389:14: enter_function: entry to ‘p11sak_extract_cert_pubkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10395:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10398:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10400:10: call_function: calling ‘iterate_objects’ from ‘p11sak_extract_cert_pubkey’
# 3853|           }
# 3854|           if (common_name != NULL) {
# 3855|->             rc = p11tool_get_common_name_value(obj, label_val,
# 3856|                                                  &common_name_val);
# 3857|               if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def949]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3867:9: warning[-Wanalyzer-malloc-leak]: leak of ‘matched_objs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10389:14: enter_function: entry to ‘p11sak_extract_cert_pubkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10395:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10398:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10400:10: call_function: calling ‘iterate_objects’ from ‘p11sak_extract_cert_pubkey’
# 3865|       default:
# 3866|           /* Should not occur */
# 3867|->         warnx("Object \"%s\" has an unsupported class: %lu",
# 3868|                 label_val, class_val);
# 3869|           free(label_val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def950]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4014:14: warning[-Wanalyzer-malloc-leak]: leak of ‘matched_objs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3965:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3968:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4004:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4004:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4016:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4038:16: branch_true: following ‘true’ branch (when ‘num_matched_objs >= alloc_matched_objs’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4040:31: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4042:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4052:26: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4055:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4057:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4025:21: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4025:21: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4014:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4014:14: danger: ‘matched_objs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/10)
# 4012|           num_objs = 0;
# 4013|   
# 4014|->         rc = p11tool_pkcs11_funcs->C_FindObjects(p11tool_pkcs11_session, objs,
# 4015|                                                    FIND_OBJECTS_COUNT, &num_objs);
# 4016|           if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def951]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4017:13: warning[-Wanalyzer-malloc-leak]: leak of ‘matched_objs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3965:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3968:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4004:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4004:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4016:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4038:16: branch_true: following ‘true’ branch (when ‘num_matched_objs >= alloc_matched_objs’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4040:31: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4042:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4052:26: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4055:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4057:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4025:21: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4025:21: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4017:13: throw: if ‘p11_get_ckr’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4017:13: danger: ‘matched_objs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/10)
# 4015|                                                    FIND_OBJECTS_COUNT, &num_objs);
# 4016|           if (rc != CKR_OK) {
# 4017|->             warnx("Failed to find objects: C_FindObjects: 0x%lX: %s",
# 4018|                     rc, p11_get_ckr(rc));
# 4019|               goto done_find;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def952]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4062:11: warning[-Wanalyzer-malloc-leak]: leak of ‘matched_objs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3965:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3968:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4004:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4004:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4016:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4038:16: branch_true: following ‘true’ branch (when ‘num_matched_objs >= alloc_matched_objs’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4040:31: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4042:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4052:26: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4055:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4057:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4025:21: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4025:21: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4062:11: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4062:11: danger: ‘matched_objs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/10)
# 4060|   
# 4061|   done_find:
# 4062|->     rc2 = p11tool_pkcs11_funcs->C_FindObjectsFinal(p11tool_pkcs11_session);
# 4063|       if (rc2 != CKR_OK) {
# 4064|           warnx("Failed to finalize the find operation: C_FindObjectsFinal: 0x%lX: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def953]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4064:9: warning[-Wanalyzer-malloc-leak]: leak of ‘matched_objs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3965:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3968:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4004:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4004:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4016:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4038:16: branch_true: following ‘true’ branch (when ‘num_matched_objs >= alloc_matched_objs’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4040:31: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4042:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4052:26: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4055:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4057:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4025:21: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4025:21: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4063:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4064:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4064:9: throw: if ‘p11_get_ckr’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4064:9: danger: ‘matched_objs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/10)
# 4062|       rc2 = p11tool_pkcs11_funcs->C_FindObjectsFinal(p11tool_pkcs11_session);
# 4063|       if (rc2 != CKR_OK) {
# 4064|->         warnx("Failed to finalize the find operation: C_FindObjectsFinal: 0x%lX: %s",
# 4065|                 rc2, p11_get_ckr(rc2));
# 4066|           if (rc == CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def954]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4083:9: warning[-Wanalyzer-malloc-leak]: leak of ‘matched_objs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3965:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3968:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4004:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4004:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4016:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4022:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4038:16: branch_true: following ‘true’ branch (when ‘num_matched_objs >= alloc_matched_objs’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4040:31: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4042:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4052:26: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4055:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4057:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4025:21: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4025:21: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4070:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4073:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4073:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4074:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4083:9: throw: if ‘qsort_r’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4083:9: danger: ‘matched_objs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/10)
# 4081|                   iterate_compare_aix);
# 4082|   #else
# 4083|->         qsort_r(matched_objs, num_matched_objs, sizeof(CK_OBJECT_HANDLE),
# 4084|                   iterate_compare, &data);
# 4085|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def955]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4114:5: warning[-Wanalyzer-malloc-leak]: leak of ‘matched_objs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10389:14: enter_function: entry to ‘p11sak_extract_cert_pubkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10395:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10398:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10400:10: call_function: calling ‘iterate_objects’ from ‘p11sak_extract_cert_pubkey’
# 4112|   
# 4113|   done:
# 4114|->     p11tool_free_attributes(attrs, num_attrs);
# 4115|   
# 4116|       if (label != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def956]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: throw: if ‘p11tool_add_attributes’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: danger: ‘priv_attrs’ leaks here; was allocated at [(38)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/37)
# 4179|               goto done;
# 4180|   
# 4181|->         rc = p11tool_add_attributes(keytype, p11sak_bool_attrs,
# 4182|                                       &public_attrs, &num_public_attrs,
# 4183|                                       pub_label, pub_attrs, opt_id, false, opt_so,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def957]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: throw: if ‘p11tool_add_attributes’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: danger: ‘priv_label’ leaks here; was allocated at [(18)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/17)
# 4179|               goto done;
# 4180|   
# 4181|->         rc = p11tool_add_attributes(keytype, p11sak_bool_attrs,
# 4182|                                       &public_attrs, &num_public_attrs,
# 4183|                                       pub_label, pub_attrs, opt_id, false, opt_so,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def958]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: throw: if ‘p11tool_add_attributes’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: danger: ‘pub_attrs’ leaks here; was allocated at [(38)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/37)
# 4179|               goto done;
# 4180|   
# 4181|->         rc = p11tool_add_attributes(keytype, p11sak_bool_attrs,
# 4182|                                       &public_attrs, &num_public_attrs,
# 4183|                                       pub_label, pub_attrs, opt_id, false, opt_so,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def959]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: throw: if ‘p11tool_add_attributes’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: danger: ‘pub_label’ leaks here; was allocated at [(16)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/15)
# 4179|               goto done;
# 4180|   
# 4181|->         rc = p11tool_add_attributes(keytype, p11sak_bool_attrs,
# 4182|                                       &public_attrs, &num_public_attrs,
# 4183|                                       pub_label, pub_attrs, opt_id, false, opt_so,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def960]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: throw: if ‘p11tool_add_attributes’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: danger: ‘priv_attrs’ leaks here; was allocated at [(38)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/37)
# 4187|               goto done;
# 4188|   
# 4189|->         rc = p11tool_add_attributes(keytype, p11sak_bool_attrs,
# 4190|                                       &private_attrs, &num_private_attrs,
# 4191|                                       priv_label, priv_attrs, opt_id, true, opt_so,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def961]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: throw: if ‘p11tool_add_attributes’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: danger: ‘priv_label’ leaks here; was allocated at [(18)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/17)
# 4187|               goto done;
# 4188|   
# 4189|->         rc = p11tool_add_attributes(keytype, p11sak_bool_attrs,
# 4190|                                       &private_attrs, &num_private_attrs,
# 4191|                                       priv_label, priv_attrs, opt_id, true, opt_so,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def962]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: throw: if ‘p11tool_add_attributes’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: danger: ‘pub_attrs’ leaks here; was allocated at [(38)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/37)
# 4187|               goto done;
# 4188|   
# 4189|->         rc = p11tool_add_attributes(keytype, p11sak_bool_attrs,
# 4190|                                       &private_attrs, &num_private_attrs,
# 4191|                                       priv_label, priv_attrs, opt_id, true, opt_so,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def963]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: throw: if ‘p11tool_add_attributes’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: danger: ‘pub_label’ leaks here; was allocated at [(16)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/15)
# 4187|               goto done;
# 4188|   
# 4189|->         rc = p11tool_add_attributes(keytype, p11sak_bool_attrs,
# 4190|                                       &private_attrs, &num_private_attrs,
# 4191|                                       priv_label, priv_attrs, opt_id, true, opt_so,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def964]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:14: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:14: danger: ‘priv_attrs’ leaks here; was allocated at [(38)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/37)
# 4205|   
# 4206|       if (keytype->is_asymmetric)
# 4207|->         rc = p11tool_pkcs11_funcs->C_GenerateKeyPair(p11tool_pkcs11_session,
# 4208|                                             (CK_MECHANISM *)&keytype->keygen_mech,
# 4209|                                             public_attrs, num_public_attrs,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def965]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:14: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:14: danger: ‘priv_label’ leaks here; was allocated at [(18)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/17)
# 4205|   
# 4206|       if (keytype->is_asymmetric)
# 4207|->         rc = p11tool_pkcs11_funcs->C_GenerateKeyPair(p11tool_pkcs11_session,
# 4208|                                             (CK_MECHANISM *)&keytype->keygen_mech,
# 4209|                                             public_attrs, num_public_attrs,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def966]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:14: danger: ‘pub_attrs’ leaks here; was allocated at [(38)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/37)
# 4205|   
# 4206|       if (keytype->is_asymmetric)
# 4207|->         rc = p11tool_pkcs11_funcs->C_GenerateKeyPair(p11tool_pkcs11_session,
# 4208|                                             (CK_MECHANISM *)&keytype->keygen_mech,
# 4209|                                             public_attrs, num_public_attrs,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def967]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:14: danger: ‘pub_label’ leaks here; was allocated at [(16)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/15)
# 4205|   
# 4206|       if (keytype->is_asymmetric)
# 4207|->         rc = p11tool_pkcs11_funcs->C_GenerateKeyPair(p11tool_pkcs11_session,
# 4208|                                             (CK_MECHANISM *)&keytype->keygen_mech,
# 4209|                                             public_attrs, num_public_attrs,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def968]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4217:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: throw: if ‘p11tool_is_rejected_by_policy’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: danger: ‘priv_attrs’ leaks here; was allocated at [(38)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/37)
# 4216|                                             &secret_key);
# 4217|       if (rc != CKR_OK) {
# 4218|->         if (p11tool_is_rejected_by_policy(rc, p11tool_pkcs11_session)) {
# 4219|               if (keysize == 0)
# 4220|                   warnx("Key generation of a %s key is rejected by policy",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def969]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4217:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: throw: if ‘p11tool_is_rejected_by_policy’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: danger: ‘priv_label’ leaks here; was allocated at [(18)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/17)
# 4216|                                             &secret_key);
# 4217|       if (rc != CKR_OK) {
# 4218|->         if (p11tool_is_rejected_by_policy(rc, p11tool_pkcs11_session)) {
# 4219|               if (keysize == 0)
# 4220|                   warnx("Key generation of a %s key is rejected by policy",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def970]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4217:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: throw: if ‘p11tool_is_rejected_by_policy’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: danger: ‘pub_attrs’ leaks here; was allocated at [(38)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/37)
# 4216|                                             &secret_key);
# 4217|       if (rc != CKR_OK) {
# 4218|->         if (p11tool_is_rejected_by_policy(rc, p11tool_pkcs11_session)) {
# 4219|               if (keysize == 0)
# 4220|                   warnx("Key generation of a %s key is rejected by policy",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def971]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4217:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: throw: if ‘p11tool_is_rejected_by_policy’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: danger: ‘pub_label’ leaks here; was allocated at [(16)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/15)
# 4216|                                             &secret_key);
# 4217|       if (rc != CKR_OK) {
# 4218|->         if (p11tool_is_rejected_by_policy(rc, p11tool_pkcs11_session)) {
# 4219|               if (keysize == 0)
# 4220|                   warnx("Key generation of a %s key is rejected by policy",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def972]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4220:17: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4217:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4219:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4219:16: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4221:23: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4220:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4220:17: danger: ‘priv_attrs’ leaks here; was allocated at [(38)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/37)
# 4218|           if (p11tool_is_rejected_by_policy(rc, p11tool_pkcs11_session)) {
# 4219|               if (keysize == 0)
# 4220|->                 warnx("Key generation of a %s key is rejected by policy",
# 4221|                         keytype->name);
# 4222|               else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def973]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4220:17: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4217:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4219:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4219:16: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4221:23: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4220:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4220:17: danger: ‘priv_label’ leaks here; was allocated at [(18)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/17)
# 4218|           if (p11tool_is_rejected_by_policy(rc, p11tool_pkcs11_session)) {
# 4219|               if (keysize == 0)
# 4220|->                 warnx("Key generation of a %s key is rejected by policy",
# 4221|                         keytype->name);
# 4222|               else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def974]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4220:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4217:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4219:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4219:16: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4221:23: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4220:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4220:17: danger: ‘pub_attrs’ leaks here; was allocated at [(38)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/37)
# 4218|           if (p11tool_is_rejected_by_policy(rc, p11tool_pkcs11_session)) {
# 4219|               if (keysize == 0)
# 4220|->                 warnx("Key generation of a %s key is rejected by policy",
# 4221|                         keytype->name);
# 4222|               else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def975]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4220:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4217:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4219:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4219:16: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4221:23: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4220:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4220:17: danger: ‘pub_label’ leaks here; was allocated at [(16)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/15)
# 4218|           if (p11tool_is_rejected_by_policy(rc, p11tool_pkcs11_session)) {
# 4219|               if (keysize == 0)
# 4220|->                 warnx("Key generation of a %s key is rejected by policy",
# 4221|                         keytype->name);
# 4222|               else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def976]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4217:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4226:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4226:16: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: throw: if ‘p11_get_ckr’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: danger: ‘priv_attrs’ leaks here; was allocated at [(38)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/37)
# 4225|           } else {
# 4226|               if (keysize == 0)
# 4227|->                 warnx("Key generation of a %s key failed: 0x%lX: %s",
# 4228|                         keytype->name, rc, p11_get_ckr(rc));
# 4229|               else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def977]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4217:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4226:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4226:16: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: throw: if ‘p11_get_ckr’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: danger: ‘priv_label’ leaks here; was allocated at [(18)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/17)
# 4225|           } else {
# 4226|               if (keysize == 0)
# 4227|->                 warnx("Key generation of a %s key failed: 0x%lX: %s",
# 4228|                         keytype->name, rc, p11_get_ckr(rc));
# 4229|               else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def978]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4217:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4226:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4226:16: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: throw: if ‘p11_get_ckr’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: danger: ‘pub_attrs’ leaks here; was allocated at [(38)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/37)
# 4225|           } else {
# 4226|               if (keysize == 0)
# 4227|->                 warnx("Key generation of a %s key failed: 0x%lX: %s",
# 4228|                         keytype->name, rc, p11_get_ckr(rc));
# 4229|               else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def979]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4181:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4186:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4189:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4194:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4206:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4207:34: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4217:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4218:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4226:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4226:16: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: throw: if ‘p11_get_ckr’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4227:17: danger: ‘pub_label’ leaks here; was allocated at [(16)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/15)
# 4225|           } else {
# 4226|               if (keysize == 0)
# 4227|->                 warnx("Key generation of a %s key failed: 0x%lX: %s",
# 4228|                         keytype->name, rc, p11_get_ckr(rc));
# 4229|               else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def980]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4245:9: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4179:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4244:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4245:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4245:9: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4245:9: danger: ‘priv_label’ leaks here; was allocated at [(18)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/17)
# 4243|   done:
# 4244|       if (keytype->keygen_cleanup != NULL)
# 4245|->         keytype->keygen_cleanup(keytype, private);
# 4246|   
# 4247|       if (pub_label != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def981]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4245:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4128:14: enter_function: entry to ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4144:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4149:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4158:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4167:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4169:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4172:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: call_function: calling ‘parse_key_pair_label’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4173:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_label’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4174:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: call_function: calling ‘parse_key_pair_attrs’ from ‘p11sak_generate_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4177:14: return_function: returning to ‘p11sak_generate_key’ from ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4178:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4179:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4244:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4245:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4245:9: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4245:9: danger: ‘pub_label’ leaks here; was allocated at [(16)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/15)
# 4243|   done:
# 4244|       if (keytype->keygen_cleanup != NULL)
# 4245|->         keytype->keygen_cleanup(keytype, private);
# 4246|   
# 4247|       if (pub_label != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def982]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4976:13: warning[-Wanalyzer-malloc-leak]: leak of ‘spec’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4967:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4968:8: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4973:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4974:12: branch_true: following ‘true’ branch (when ‘tok’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_false: following ‘false’ branch (when ‘i != 5’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4981:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5045:19: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5046:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4974:12: branch_true: following ‘true’ branch (when ‘tok’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_false: following ‘false’ branch (when ‘i != 5’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4981:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5045:19: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5046:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4974:12: branch_true: following ‘true’ branch (when ‘tok’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4976:13: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4976:13: danger: ‘spec’ leaks here; was allocated at [(1)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/0)
# 4974|       while (tok != NULL) {
# 4975|           if (i >= MAX_SORT_FIELDS) {
# 4976|->             warnx("Too many sort field designators.");
# 4977|               rc = CKR_ARGUMENTS_BAD;
# 4978|               goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def983]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4991:17: warning[-Wanalyzer-malloc-leak]: leak of ‘spec’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4967:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4968:8: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4973:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4974:12: branch_true: following ‘true’ branch (when ‘tok’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_false: following ‘false’ branch (when ‘i != 5’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4981:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4991:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4991:17: danger: ‘spec’ leaks here; was allocated at [(1)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/0)
# 4989|                   break;
# 4990|               default:
# 4991|->                 warnx("Invalid sort field designator: '%c'.", *tok);
# 4992|                   rc = CKR_ARGUMENTS_BAD;
# 4993|                   goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def984]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5011:17: warning[-Wanalyzer-malloc-leak]: leak of ‘spec’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4967:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4968:8: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4973:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4974:12: branch_true: following ‘true’ branch (when ‘tok’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_false: following ‘false’ branch (when ‘i != 5’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4981:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5011:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5011:17: danger: ‘spec’ leaks here; was allocated at [(1)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/0)
# 5009|                   break;
# 5010|               default:
# 5011|->                 warnx("Invalid sort field designator: '%c'.", *tok);
# 5012|                   rc = CKR_ARGUMENTS_BAD;
# 5013|                   goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def985]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5017:13: warning[-Wanalyzer-malloc-leak]: leak of ‘spec’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4967:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4968:8: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4973:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4974:12: branch_true: following ‘true’ branch (when ‘tok’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_false: following ‘false’ branch (when ‘i != 5’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4981:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5017:13: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5017:13: danger: ‘spec’ leaks here; was allocated at [(1)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/0)
# 5015|               break;
# 5016|           default:
# 5017|->             warnx("Cannot sort objects of class %d", data->objclass);
# 5018|               rc = CKR_ARGUMENTS_BAD;
# 5019|               goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def986]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5033:17: warning[-Wanalyzer-malloc-leak]: leak of ‘spec’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4967:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4968:8: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4973:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4974:12: branch_true: following ‘true’ branch (when ‘tok’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_false: following ‘false’ branch (when ‘i != 5’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4981:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5023:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5025:21: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5033:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5033:17: danger: ‘spec’ leaks here; was allocated at [(1)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/0)
# 5031|                   break;
# 5032|               default:
# 5033|->                 warnx("Invalid sort order designator: '%c'.", *tok);
# 5034|                   rc = CKR_ARGUMENTS_BAD;
# 5035|                   goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def987]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5040:17: warning[-Wanalyzer-malloc-leak]: leak of ‘spec’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4967:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4968:8: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4973:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4974:12: branch_true: following ‘true’ branch (when ‘tok’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_false: following ‘false’ branch (when ‘i != 5’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4981:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5023:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5025:21: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5039:16: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5040:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5040:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5040:17: danger: ‘spec’ leaks here; was allocated at [(1)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/0)
# 5038|               tok++;
# 5039|               if (*tok != '\0') {
# 5040|->                 warnx("Invalid character(s) after sort order designator: '%s'.",
# 5041|                         tok);
# 5042|                   rc = CKR_ARGUMENTS_BAD;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def988]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5048:13: warning[-Wanalyzer-malloc-leak]: leak of ‘spec’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4967:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4968:8: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4973:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4974:12: branch_true: following ‘true’ branch (when ‘tok’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4975:12: branch_false: following ‘false’ branch (when ‘i != 5’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:4981:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5023:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5045:19: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5045:19: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5048:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5048:13: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5048:13: danger: ‘spec’ leaks here; was allocated at [(1)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/0)
# 5046|               data->sort_info[i].descending = false;
# 5047|           } else {
# 5048|->             warnx("Invalid character(s) after sort field designator: '%s'.",
# 5049|                     tok);
# 5050|               rc = CKR_ARGUMENTS_BAD;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def989]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5089:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attr_data’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5073:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5074:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5083:61: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5084:41: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5083:61: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5084:41: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5083:61: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5084:41: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5083:61: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5086:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5086:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5088:8: branch_false: following ‘false’ branch (when ‘attr_data’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5088:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5088:9: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5089:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5089:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5089:9: danger: ‘attr_data’ leaks here; was allocated at [(11)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/10)
# 5087|       data.bool_attrs = calloc(data.num_bool_attrs, sizeof(CK_ATTRIBUTE));
# 5088|       if (attr_data == NULL || data.bool_attrs == NULL) {
# 5089|->         warnx("Failed to allocate memory for the attributes");
# 5090|           rc = CKR_HOST_MEMORY;
# 5091|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def990]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5089:9: warning[-Wanalyzer-malloc-leak]: leak of ‘data.bool_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5073:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5074:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5083:61: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5084:41: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5083:61: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5084:41: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5083:61: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5086:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5087:23: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5088:8: branch_true: following ‘true’ branch (when ‘attr_data’ is NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5089:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5089:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5089:9: danger: ‘data.bool_attrs’ leaks here; was allocated at [(9)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/8)
# 5087|       data.bool_attrs = calloc(data.num_bool_attrs, sizeof(CK_ATTRIBUTE));
# 5088|       if (attr_data == NULL || data.bool_attrs == NULL) {
# 5089|->         warnx("Failed to allocate memory for the attributes");
# 5090|           rc = CKR_HOST_MEMORY;
# 5091|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def991]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5180:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attr_data’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5171:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5172:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5174:66: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5175:41: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5174:66: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5175:41: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5174:66: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5175:41: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5174:66: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5177:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5177:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5179:8: branch_false: following ‘false’ branch (when ‘attr_data’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5179:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5179:9: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5180:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5180:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5180:9: danger: ‘attr_data’ leaks here; was allocated at [(11)](sarif:/runs/0/results/63/codeFlows/0/threadFlows/0/locations/10)
# 5178|       data.bool_attrs = calloc(data.num_bool_attrs, sizeof(CK_ATTRIBUTE));
# 5179|       if (attr_data == NULL || data.bool_attrs == NULL) {
# 5180|->         warnx("Failed to allocate memory for the attributes");
# 5181|           rc = CKR_HOST_MEMORY;
# 5182|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def992]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5180:9: warning[-Wanalyzer-malloc-leak]: leak of ‘data.bool_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5171:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5172:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5174:66: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5175:41: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5174:66: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5175:41: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5174:66: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5177:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5178:23: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5179:8: branch_true: following ‘true’ branch (when ‘attr_data’ is NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5180:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5180:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5180:9: danger: ‘data.bool_attrs’ leaks here; was allocated at [(9)](sarif:/runs/0/results/62/codeFlows/0/threadFlows/0/locations/8)
# 5178|       data.bool_attrs = calloc(data.num_bool_attrs, sizeof(CK_ATTRIBUTE));
# 5179|       if (attr_data == NULL || data.bool_attrs == NULL) {
# 5180|->         warnx("Failed to allocate memory for the attributes");
# 5181|           rc = CKR_HOST_MEMORY;
# 5182|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def993]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7131:9: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7117:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7122:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7123:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7124:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7130:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7131:66: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7131:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7131:9: danger: ‘value’ leaks here; was allocated at [(3)](sarif:/runs/0/results/64/codeFlows/0/threadFlows/0/locations/2)
# 7129|       fp = fopen(opt_file, "r");
# 7130|       if (fp == NULL) {
# 7131|->         warnx("Failed to open file '%s': %s", opt_file, strerror(errno));
# 7132|           rc = CKR_ARGUMENTS_BAD;
# 7133|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def994]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7137:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7117:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7122:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7124:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7130:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7137:71: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7137:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7137:9: danger: ‘fopen(opt_file, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/65/codeFlows/0/threadFlows/0/locations/4)
# 7135|   
# 7136|       if (fread(value, value_len, 1, fp) != 1) {
# 7137|->         warnx("Failed to read from file '%s': %s", opt_file, strerror(errno));
# 7138|           rc = CKR_FUNCTION_FAILED;
# 7139|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def995]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7137:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7117:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7122:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7124:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7130:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7137:71: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7137:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7137:9: danger: ‘fopen(opt_file, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/4)
# 7135|   
# 7136|       if (fread(value, value_len, 1, fp) != 1) {
# 7137|->         warnx("Failed to read from file '%s': %s", opt_file, strerror(errno));
# 7138|           rc = CKR_FUNCTION_FAILED;
# 7139|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def996]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7137:9: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7117:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7122:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7123:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7124:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7130:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7137:71: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7137:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7137:9: danger: ‘value’ leaks here; was allocated at [(3)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/2)
# 7135|   
# 7136|       if (fread(value, value_len, 1, fp) != 1) {
# 7137|->         warnx("Failed to read from file '%s': %s", opt_file, strerror(errno));
# 7138|           rc = CKR_FUNCTION_FAILED;
# 7139|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def997]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7143:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7117:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7122:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7124:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7130:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7142:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7143:9: throw: if ‘d2i_X509’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7143:9: danger: ‘fopen(opt_file, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/4)
# 7141|   
# 7142|       tmp_value = (CK_BYTE *)value;
# 7143|->     x = d2i_X509(NULL, &tmp_value, value_len);
# 7144|       if (x == NULL) {
# 7145|           warnx("d2i_X509 failed to decode contents from file '%s'", opt_file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def998]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7143:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7117:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7122:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7124:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7130:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7142:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7143:9: throw: if ‘d2i_X509’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7143:9: danger: ‘fopen(opt_file, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/4)
# 7141|   
# 7142|       tmp_value = (CK_BYTE *)value;
# 7143|->     x = d2i_X509(NULL, &tmp_value, value_len);
# 7144|       if (x == NULL) {
# 7145|           warnx("d2i_X509 failed to decode contents from file '%s'", opt_file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def999]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7143:9: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7117:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7122:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7123:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7124:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7130:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7142:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7143:9: throw: if ‘d2i_X509’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7143:9: danger: ‘value’ leaks here; was allocated at [(3)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/2)
# 7141|   
# 7142|       tmp_value = (CK_BYTE *)value;
# 7143|->     x = d2i_X509(NULL, &tmp_value, value_len);
# 7144|       if (x == NULL) {
# 7145|           warnx("d2i_X509 failed to decode contents from file '%s'", opt_file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1000]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7145:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7117:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7122:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7124:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7130:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7142:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7144:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7145:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7145:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7145:9: danger: ‘fopen(opt_file, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/4)
# 7143|       x = d2i_X509(NULL, &tmp_value, value_len);
# 7144|       if (x == NULL) {
# 7145|->         warnx("d2i_X509 failed to decode contents from file '%s'", opt_file);
# 7146|           ERR_print_errors_cb(p11tool_openssl_err_cb, NULL);
# 7147|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1001]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7145:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7117:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7122:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7124:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7129:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7130:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7136:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7142:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7144:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7145:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7145:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7145:9: danger: ‘fopen(opt_file, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/72/codeFlows/0/threadFlows/0/locations/4)
# 7143|       x = d2i_X509(NULL, &tmp_value, value_len);
# 7144|       if (x == NULL) {
# 7145|->         warnx("d2i_X509 failed to decode contents from file '%s'", opt_file);
# 7146|           ERR_print_errors_cb(p11tool_openssl_err_cb, NULL);
# 7147|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1002]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7188:9: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7174:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7178:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7180:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7181:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7187:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7188:66: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7188:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7188:9: danger: ‘value’ leaks here; was allocated at [(3)](sarif:/runs/0/results/75/codeFlows/0/threadFlows/0/locations/2)
# 7186|       fp = fopen(opt_file, "r");
# 7187|       if (fp == NULL) {
# 7188|->         warnx("Failed to open file '%s': %s", opt_file, strerror(errno));
# 7189|           rc = CKR_FUNCTION_FAILED;
# 7190|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1003]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7194:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7174:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7178:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7181:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7187:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7194:71: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7194:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7194:9: danger: ‘fopen(opt_file, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/76/codeFlows/0/threadFlows/0/locations/4)
# 7192|   
# 7193|       if (fread(value, value_len, 1, fp) != 1) {
# 7194|->         warnx("Failed to read from file '%s': %s", opt_file, strerror(errno));
# 7195|           rc = CKR_FUNCTION_FAILED;
# 7196|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1004]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7194:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7174:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7178:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7181:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7187:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7194:71: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7194:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7194:9: danger: ‘fopen(opt_file, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/78/codeFlows/0/threadFlows/0/locations/4)
# 7192|   
# 7193|       if (fread(value, value_len, 1, fp) != 1) {
# 7194|->         warnx("Failed to read from file '%s': %s", opt_file, strerror(errno));
# 7195|           rc = CKR_FUNCTION_FAILED;
# 7196|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1005]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7194:9: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7174:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7178:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7180:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7181:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7187:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7194:71: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7194:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7194:9: danger: ‘value’ leaks here; was allocated at [(3)](sarif:/runs/0/results/77/codeFlows/0/threadFlows/0/locations/2)
# 7192|   
# 7193|       if (fread(value, value_len, 1, fp) != 1) {
# 7194|->         warnx("Failed to read from file '%s': %s", opt_file, strerror(errno));
# 7195|           rc = CKR_FUNCTION_FAILED;
# 7196|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1006]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7199:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7174:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7178:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7181:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7187:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7199:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7199:10: throw: if ‘p11tool_add_attribute’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7199:10: danger: ‘fopen(opt_file, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/79/codeFlows/0/threadFlows/0/locations/4)
# 7197|       }
# 7198|   
# 7199|->     rc = p11tool_add_attribute(CKA_IBM_OPAQUE, value, value_len,
# 7200|                                  attrs, num_attrs);
# 7201|       if (rc != CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1007]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7199:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7174:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7178:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7181:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7187:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7199:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7199:10: throw: if ‘p11tool_add_attribute’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7199:10: danger: ‘fopen(opt_file, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/81/codeFlows/0/threadFlows/0/locations/4)
# 7197|       }
# 7198|   
# 7199|->     rc = p11tool_add_attribute(CKA_IBM_OPAQUE, value, value_len,
# 7200|                                  attrs, num_attrs);
# 7201|       if (rc != CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1008]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7199:10: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7174:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7178:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7180:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7181:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7187:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7199:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7199:10: throw: if ‘p11tool_add_attribute’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7199:10: danger: ‘value’ leaks here; was allocated at [(3)](sarif:/runs/0/results/80/codeFlows/0/threadFlows/0/locations/2)
# 7197|       }
# 7198|   
# 7199|->     rc = p11tool_add_attribute(CKA_IBM_OPAQUE, value, value_len,
# 7200|                                  attrs, num_attrs);
# 7201|       if (rc != CKR_OK)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1009]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7206:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7174:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7178:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7181:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7187:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7206:9: throw: if ‘OPENSSL_cleanse’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7206:9: danger: ‘fopen(opt_file, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/82/codeFlows/0/threadFlows/0/locations/4)
# 7204|   done:
# 7205|       if (value != NULL) {
# 7206|->         OPENSSL_cleanse(value, value_len);
# 7207|           free(value);
# 7208|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1010]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7206:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7174:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7178:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7181:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7187:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7206:9: throw: if ‘OPENSSL_cleanse’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7206:9: danger: ‘fopen(opt_file, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/83/codeFlows/0/threadFlows/0/locations/4)
# 7204|   done:
# 7205|       if (value != NULL) {
# 7206|->         OPENSSL_cleanse(value, value_len);
# 7207|           free(value);
# 7208|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1011]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7206:9: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7174:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7178:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7180:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7181:8: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7186:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7187:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7193:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7206:9: throw: if ‘OPENSSL_cleanse’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7206:9: danger: ‘value’ leaks here; was allocated at [(3)](sarif:/runs/0/results/84/codeFlows/0/threadFlows/0/locations/2)
# 7204|   done:
# 7205|       if (value != NULL) {
# 7206|->         OPENSSL_cleanse(value, value_len);
# 7207|           free(value);
# 7208|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1012]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7339:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7309:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7315:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7315:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7319:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7327:8: branch_false: following ‘false’ branch (when ‘data_len <= 64’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7332:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7332:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7333:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7338:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7338:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7339:71: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7339:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7339:9: danger: ‘fopen(opt_file, "r")’ leaks here; was opened at [(7)](sarif:/runs/0/results/85/codeFlows/0/threadFlows/0/locations/6)
# 7337|   
# 7338|       if (fread(data, data_len, 1, fp) != 1) {
# 7339|->         warnx("Failed to read from file '%s': %s", opt_file, strerror(errno));
# 7340|           fclose(fp);
# 7341|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1013]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7339:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(opt_file, "r")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7309:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7315:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7315:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7319:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7327:8: branch_false: following ‘false’ branch (when ‘data_len <= 64’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7332:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7332:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7333:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7338:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7338:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7339:71: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7339:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:7339:9: danger: ‘fopen(opt_file, "r")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/86/codeFlows/0/threadFlows/0/locations/6)
# 7337|   
# 7338|       if (fread(data, data_len, 1, fp) != 1) {
# 7339|->         warnx("Failed to read from file '%s': %s", opt_file, strerror(errno));
# 7340|           fclose(fp);
# 7341|           return CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1014]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8069:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pem’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8051:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8054:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8054:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8060:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8063:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8064:8: branch_false: following ‘false’ branch (when ‘pem’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8069:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8069:9: throw: if ‘BIO_read’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8069:9: danger: ‘pem’ leaks here; was allocated at [(5)](sarif:/runs/0/results/87/codeFlows/0/threadFlows/0/locations/4)
# 8067|       }
# 8068|   
# 8069|->     if (BIO_read(bio, pem, bio_len) != bio_len) {
# 8070|           ERR_print_errors_cb(p11tool_openssl_err_cb, NULL);
# 8071|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1015]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8687:17: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8605:14: enter_function: entry to ‘p11sak_export_dilithium_ml_dsa_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8641:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8650:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8653:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8659:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8659:16: call_function: calling ‘get_openssl_pqc_oid_name’ from ‘p11sak_export_dilithium_ml_dsa_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8659:16: return_function: returning to ‘p11sak_export_dilithium_ml_dsa_pkey’ from ‘get_openssl_pqc_oid_name’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8660:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8668:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8668:8: branch_true: following ‘true’ branch (when ‘private != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8669:20: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8676:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8677:12: branch_false: following ‘false’ branch (when ‘priv_key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8683:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8683:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8684:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8686:16: branch_true: following ‘true’ branch (when ‘priv_seed’ is NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8687:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8687:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8687:17: danger: ‘priv_key’ leaks here; was allocated at [(17)](sarif:/runs/0/results/88/codeFlows/0/threadFlows/0/locations/16)
# 8685|               priv_seed = calloc(1, seed_len);
# 8686|               if (priv_seed == NULL) {
# 8687|->                 warnx("Failed to allocate buffer for private seed.");
# 8688|                   rc = CKR_HOST_MEMORY;
# 8689|                   goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1016]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8717:14: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8605:14: enter_function: entry to ‘p11sak_export_dilithium_ml_dsa_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8641:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8650:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8653:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8659:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8659:16: call_function: calling ‘get_openssl_pqc_oid_name’ from ‘p11sak_export_dilithium_ml_dsa_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8659:16: return_function: returning to ‘p11sak_export_dilithium_ml_dsa_pkey’ from ‘get_openssl_pqc_oid_name’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8660:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8668:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8668:8: branch_true: following ‘true’ branch (when ‘private != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8669:20: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8676:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8677:12: branch_false: following ‘false’ branch (when ‘priv_key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8683:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8683:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8694:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8712:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8717:34: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8717:14: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8717:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8717:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8717:14: danger: ‘priv_key’ leaks here; was allocated at [(17)](sarif:/runs/0/results/89/codeFlows/0/threadFlows/0/locations/16)
# 8715|           }
# 8716|   
# 8717|->         rc = p11tool_pkcs11_funcs->C_GetAttributeValue(p11tool_pkcs11_session,
# 8718|                                                          key, priv_attrs,
# 8719|                                                          keytype->type ==

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1017]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8717:14: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_seed’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8605:14: enter_function: entry to ‘p11sak_export_dilithium_ml_dsa_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8641:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8650:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8653:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8659:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8659:16: call_function: calling ‘get_openssl_pqc_oid_name’ from ‘p11sak_export_dilithium_ml_dsa_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8659:16: return_function: returning to ‘p11sak_export_dilithium_ml_dsa_pkey’ from ‘get_openssl_pqc_oid_name’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8660:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8668:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8668:8: branch_true: following ‘true’ branch (when ‘private != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8669:20: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8677:12: branch_false: following ‘false’ branch (when ‘priv_key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8683:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8683:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8684:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8685:25: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8686:16: branch_false: following ‘false’ branch (when ‘priv_seed’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8694:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8712:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8713:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8717:14: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8717:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8717:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8717:14: danger: ‘priv_seed’ leaks here; was allocated at [(21)](sarif:/runs/0/results/90/codeFlows/0/threadFlows/0/locations/20)
# 8715|           }
# 8716|   
# 8717|->         rc = p11tool_pkcs11_funcs->C_GetAttributeValue(p11tool_pkcs11_session,
# 8718|                                                          key, priv_attrs,
# 8719|                                                          keytype->type ==

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1018]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8774:10: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8605:14: enter_function: entry to ‘p11sak_export_dilithium_ml_dsa_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8641:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8650:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8653:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8659:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8659:16: call_function: calling ‘get_openssl_pqc_oid_name’ from ‘p11sak_export_dilithium_ml_dsa_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8659:16: return_function: returning to ‘p11sak_export_dilithium_ml_dsa_pkey’ from ‘get_openssl_pqc_oid_name’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8660:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8668:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8668:8: branch_false: following ‘false’ branch (when ‘private == 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8757:15: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8760:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8761:8: branch_false: following ‘false’ branch (when ‘pub_key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8768:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8774:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8774:10: danger: ‘pub_key’ leaks here; was allocated at [(17)](sarif:/runs/0/results/91/codeFlows/0/threadFlows/0/locations/16)
# 8772|       pub_attrs[1].ulValueLen = oid->len_info.ml_dsa.t1_len;
# 8773|   
# 8774|->     rc = p11tool_pkcs11_funcs->C_GetAttributeValue(p11tool_pkcs11_session, key,
# 8775|                                                      pub_attrs, 2);
# 8776|       if (rc == CKR_ATTRIBUTE_SENSITIVE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1019]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8962:13: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8900:14: enter_function: entry to ‘p11sak_export_ml_kem_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8926:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8933:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8934:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: call_function: calling ‘get_openssl_pqc_oid_name’ from ‘p11sak_export_ml_kem_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: return_function: returning to ‘p11sak_export_ml_kem_pkey’ from ‘get_openssl_pqc_oid_name’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8941:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8949:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8949:8: branch_true: following ‘true’ branch (when ‘private != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8950:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8952:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8953:12: branch_false: following ‘false’ branch (when ‘priv_key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8959:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8961:12: branch_true: following ‘true’ branch (when ‘priv_seed’ is NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8962:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8962:13: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8962:13: danger: ‘priv_key’ leaks here; was allocated at [(17)](sarif:/runs/0/results/92/codeFlows/0/threadFlows/0/locations/16)
# 8960|           priv_seed = calloc(1, seed_len);
# 8961|           if (priv_seed == NULL) {
# 8962|->             warnx("Failed to allocate buffer for private seed.");
# 8963|               rc = CKR_HOST_MEMORY;
# 8964|               goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1020]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8972:14: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8900:14: enter_function: entry to ‘p11sak_export_ml_kem_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8926:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8933:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8934:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: call_function: calling ‘get_openssl_pqc_oid_name’ from ‘p11sak_export_ml_kem_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: return_function: returning to ‘p11sak_export_ml_kem_pkey’ from ‘get_openssl_pqc_oid_name’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8941:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8949:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8949:8: branch_true: following ‘true’ branch (when ‘private != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8950:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8952:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8953:12: branch_false: following ‘false’ branch (when ‘priv_key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8959:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8961:12: branch_false: following ‘false’ branch (when ‘priv_seed’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8967:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8972:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8972:14: danger: ‘priv_key’ leaks here; was allocated at [(17)](sarif:/runs/0/results/93/codeFlows/0/threadFlows/0/locations/16)
# 8970|           priv_attrs[1].ulValueLen = oid->len_info.ml_kem.priv_seed_len;
# 8971|   
# 8972|->         rc = p11tool_pkcs11_funcs->C_GetAttributeValue(p11tool_pkcs11_session,
# 8973|                                                          key, priv_attrs, 2);
# 8974|           if (rc == CKR_ATTRIBUTE_SENSITIVE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1021]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8972:14: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_seed’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8900:14: enter_function: entry to ‘p11sak_export_ml_kem_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8926:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8933:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8934:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: call_function: calling ‘get_openssl_pqc_oid_name’ from ‘p11sak_export_ml_kem_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: return_function: returning to ‘p11sak_export_ml_kem_pkey’ from ‘get_openssl_pqc_oid_name’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8941:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8949:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8949:8: branch_true: following ‘true’ branch (when ‘private != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8950:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8953:12: branch_false: following ‘false’ branch (when ‘priv_key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8959:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8960:21: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8961:12: branch_false: following ‘false’ branch (when ‘priv_seed’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8967:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8972:14: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8972:14: danger: ‘priv_seed’ leaks here; was allocated at [(19)](sarif:/runs/0/results/94/codeFlows/0/threadFlows/0/locations/18)
# 8970|           priv_attrs[1].ulValueLen = oid->len_info.ml_kem.priv_seed_len;
# 8971|   
# 8972|->         rc = p11tool_pkcs11_funcs->C_GetAttributeValue(p11tool_pkcs11_session,
# 8973|                                                          key, priv_attrs, 2);
# 8974|           if (rc == CKR_ATTRIBUTE_SENSITIVE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1022]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9008:10: warning[-Wanalyzer-malloc-leak]: leak of ‘pub_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8900:14: enter_function: entry to ‘p11sak_export_ml_kem_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8926:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8933:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8934:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: call_function: calling ‘get_openssl_pqc_oid_name’ from ‘p11sak_export_ml_kem_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: return_function: returning to ‘p11sak_export_ml_kem_pkey’ from ‘get_openssl_pqc_oid_name’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8941:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8949:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8949:8: branch_false: following ‘false’ branch (when ‘private == 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8996:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8998:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8999:8: branch_false: following ‘false’ branch (when ‘pub_key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9005:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9008:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9008:10: danger: ‘pub_key’ leaks here; was allocated at [(17)](sarif:/runs/0/results/95/codeFlows/0/threadFlows/0/locations/16)
# 9006|       pub_attrs[0].ulValueLen = oid->len_info.ml_kem.pk_len;
# 9007|   
# 9008|->     rc = p11tool_pkcs11_funcs->C_GetAttributeValue(p11tool_pkcs11_session, key,
# 9009|                                                      pub_attrs, 1);
# 9010|       if (rc == CKR_ATTRIBUTE_SENSITIVE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1023]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9105:9: warning[-Wanalyzer-malloc-leak]: leak of ‘priv_key’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8900:14: enter_function: entry to ‘p11sak_export_ml_kem_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8926:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8933:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8934:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: call_function: calling ‘get_openssl_pqc_oid_name’ from ‘p11sak_export_ml_kem_pkey’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8940:16: return_function: returning to ‘p11sak_export_ml_kem_pkey’ from ‘get_openssl_pqc_oid_name’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8941:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8949:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8949:8: branch_true: following ‘true’ branch (when ‘private != 0’)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8950:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8952:20: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8953:12: branch_false: following ‘false’ branch (when ‘priv_key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8959:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8961:12: branch_true: following ‘true’ branch (when ‘priv_seed’ is NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:8962:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9104:8: branch_true: following ‘true’ branch (when ‘priv_key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9105:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9105:9: throw: if ‘OPENSSL_cleanse’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9105:9: danger: ‘priv_key’ leaks here; was allocated at [(17)](sarif:/runs/0/results/96/codeFlows/0/threadFlows/0/locations/16)
# 9103|   out:
# 9104|       if (priv_key != NULL) {
# 9105|->         OPENSSL_cleanse(priv_key, priv_len);
# 9106|           free(priv_key);
# 9107|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1024]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9273:11: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9225:14: enter_function: entry to ‘p11sak_export_uri_pem’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9239:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9242:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9251:19: call_function: calling ‘ber_encode_len’ from ‘p11sak_export_uri_pem’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9251:19: return_function: returning to ‘p11sak_export_uri_pem’ from ‘ber_encode_len’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9255:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9256:8: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9262:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9273:11: throw: if ‘PEM_write_bio’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:9273:11: danger: ‘data’ leaks here; was allocated at [(9)](sarif:/runs/0/results/97/codeFlows/0/threadFlows/0/locations/8)
# 9271|       ofs += strlen(uri_str);
# 9272|   
# 9273|->     ret = PEM_write_bio(bio, PKCS11_URI_PEM_NAME, "", data, total_len);
# 9274|       if (ret <= 0) {
# 9275|           warnx("Failed to write %s %s object \"%s\" to URI-PEM file '%s'.",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1025]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10078:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(pin_source, "w")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10070:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10071:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10077:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10077:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10079:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10078:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10078:9: danger: ‘fopen(pin_source, "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/98/codeFlows/0/threadFlows/0/locations/0)
#10076|   
#10077|       if (fchmod(fileno(fp), S_IRUSR | S_IWUSR) != 0) {
#10078|->         warnx("Failed to set permissions of pin-source file '%s': %s",
#10079|                 pin_source, strerror(errno));
#10080|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1026]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10078:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(pin_source, "w")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10070:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10071:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10077:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10077:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10079:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10078:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10078:9: danger: ‘fopen(pin_source, "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/99/codeFlows/0/threadFlows/0/locations/0)
#10076|   
#10077|       if (fchmod(fileno(fp), S_IRUSR | S_IWUSR) != 0) {
#10078|->         warnx("Failed to set permissions of pin-source file '%s': %s",
#10079|                 pin_source, strerror(errno));
#10080|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1027]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10085:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(pin_source, "w")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10070:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10071:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10077:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10077:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10084:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10084:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10086:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10085:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10085:9: danger: ‘fopen(pin_source, "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/100/codeFlows/0/threadFlows/0/locations/0)
#10083|   
#10084|       if (fprintf(fp, "%s\n", pin) <= 0) {
#10085|->         warnx("Failed to write to pin-source file '%s': %s",
#10086|                 pin_source, strerror(errno));
#10087|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1028]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10085:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(pin_source, "w")’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10070:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10071:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10077:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10077:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10084:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10084:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10086:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10085:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10085:9: danger: ‘fopen(pin_source, "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/101/codeFlows/0/threadFlows/0/locations/0)
#10083|   
#10084|       if (fprintf(fp, "%s\n", pin) <= 0) {
#10085|->         warnx("Failed to write to pin-source file '%s': %s",
#10086|                 pin_source, strerror(errno));
#10087|           rc = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1029]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10458:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10430:8: branch_true: following ‘true’ branch (when ‘file_loc’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10431:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10431:14: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10432:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10458:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10458:9: throw: if ‘parse_configlib_file’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10458:9: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/102/codeFlows/0/threadFlows/0/locations/2)
#10456|       }
#10457|   
#10458|->     if (parse_configlib_file(fp, &p11sak_cfg,
#10459|                                parse_config_file_error_hook, 0)) {
#10460|           warnx("Failed to parse config file '%s'", file_loc);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1030]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10458:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10430:8: branch_true: following ‘true’ branch (when ‘file_loc’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10431:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10431:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10432:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10458:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10458:9: throw: if ‘parse_configlib_file’ throws an exception...
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:10458:9: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/103/codeFlows/0/threadFlows/0/locations/2)
#10456|       }
#10457|   
#10458|->     if (parse_configlib_file(fp, &p11sak_cfg,
#10459|                                parse_config_file_error_hook, 0)) {
#10460|           warnx("Failed to parse config file '%s'", file_loc);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1031]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:593:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(mkfile, "r")’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1672:5: enter_function: entry to ‘migrate_version’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1684:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1690:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1692:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1698:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1700:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1707:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1707:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1712:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1720:11: call_function: calling ‘load_masterkey’ from ‘migrate_version’
#  591|   
#  592|       cipher = malloc(cipher_len);
#  593|->     clear = malloc(clear_len);
#  594|       if (cipher == NULL || clear == NULL) {
#  595|           ret = -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1032]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:593:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(mkfile, "r")’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1672:5: enter_function: entry to ‘migrate_version’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1684:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1690:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1692:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1698:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1700:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1707:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1707:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1712:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1720:11: call_function: calling ‘load_masterkey’ from ‘migrate_version’
#  591|   
#  592|       cipher = malloc(cipher_len);
#  593|->     clear = malloc(clear_len);
#  594|       if (cipher == NULL || clear == NULL) {
#  595|           ret = -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1033]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:608:11: warning[-Wanalyzer-malloc-leak]: leak of ‘cipher’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1672:5: enter_function: entry to ‘migrate_version’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1684:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1690:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1692:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1698:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1700:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1707:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1707:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1712:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1720:11: call_function: calling ‘load_masterkey’ from ‘migrate_version’
#  606|       /* decrypt the masterkey */
#  607|   
#  608|->     ret = compute_md5(pin, strlen(pin), pin_md5_hash);
#  609|       if (ret) {
#  610|           print_error("Error calculating MD5 of PIN!\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1034]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:608:11: warning[-Wanalyzer-malloc-leak]: leak of ‘clear’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1672:5: enter_function: entry to ‘migrate_version’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1684:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1690:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1692:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1698:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1700:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1707:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1707:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1712:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1720:11: call_function: calling ‘load_masterkey’ from ‘migrate_version’
#  606|       /* decrypt the masterkey */
#  607|   
#  608|->     ret = compute_md5(pin, strlen(pin), pin_md5_hash);
#  609|       if (ret) {
#  610|           print_error("Error calculating MD5 of PIN!\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1035]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:617:10: warning[-Wanalyzer-malloc-leak]: leak of ‘cipher’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1672:5: enter_function: entry to ‘migrate_version’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1684:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1690:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1692:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1698:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1700:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1707:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1707:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1712:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1720:11: call_function: calling ‘load_masterkey’ from ‘migrate_version’
#  615|       memcpy(des3_key + MD5_HASH_SIZE, pin_md5_hash, DES_KEY_SIZE);
#  616|   
#  617|->     rc = sw_des3_cbc_decrypt(cipher, cipher_len, (unsigned char *)clear,
#  618|                                &clear_len, (unsigned char *) "12345678",
#  619|                                des3_key);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1036]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:617:10: warning[-Wanalyzer-malloc-leak]: leak of ‘clear’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1672:5: enter_function: entry to ‘migrate_version’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1684:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1690:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1692:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1698:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1700:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1707:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1707:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1712:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1720:11: call_function: calling ‘load_masterkey’ from ‘migrate_version’
#  615|       memcpy(des3_key + MD5_HASH_SIZE, pin_md5_hash, DES_KEY_SIZE);
#  616|   
#  617|->     rc = sw_des3_cbc_decrypt(cipher, cipher_len, (unsigned char *)clear,
#  618|                                &clear_len, (unsigned char *) "12345678",
#  619|                                des3_key);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1037]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:855:14: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1279:5: enter_function: entry to ‘migrate_keytype’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1286:10: call_function: calling ‘find_wrapped_keys’ from ‘migrate_keytype’
#  853|   
#  854|       while (1) {
#  855|->         rv = funcs->C_FindObjects(sess, &tmp, 1, &ulObjectCount);
#  856|           if (rv != CKR_OK) {
#  857|               p11_error("C_FindObjects", rv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1038]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:871:13: warning[-Wanalyzer-malloc-leak]: leak of ‘handles’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1279:5: enter_function: entry to ‘migrate_keytype’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1286:10: call_function: calling ‘find_wrapped_keys’ from ‘migrate_keytype’
#  869|               print_error("Malloc of %lu bytes failed!",
#  870|                           sizeof(CK_OBJECT_HANDLE) * ulTotalCount);
#  871|->             funcs->C_FindObjectsFinal(sess);
#  872|               if (handles != NULL)
#  873|                   free(handles);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1039]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:884:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1279:5: enter_function: entry to ‘migrate_keytype’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1286:10: call_function: calling ‘find_wrapped_keys’ from ‘migrate_keytype’
#  882|   
#  883|       /* Don't care if this fails */
#  884|->     funcs->C_FindObjectsFinal(sess);
#  885|   
#  886|       /* At this point we have an array with handles to every object in the

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1040]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:890:14: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1279:5: enter_function: entry to ‘migrate_keytype’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1286:10: call_function: calling ‘find_wrapped_keys’ from ‘migrate_keytype’
#  888|        * so whittle down the list accordingly */
#  889|       for (tmp = 0; tmp < ulTotalCount; tmp++) {
#  890|->         rv = funcs->C_GetAttributeValue(sess, handles[tmp], attrs, num_attrs);
#  891|           if (rv != CKR_OK) {
#  892|               p11_error("C_GetAttributeValue", rv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1041]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1015:5: warning[-Wanalyzer-malloc-leak]: leak of ‘key_identifier’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1191:5: enter_function: entry to ‘cca_migrate’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1198:22: branch_true: following ‘true’ branch (when ‘key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1199:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1220:18: call_function: calling ‘cca_migrate_asymmetric’ from ‘cca_migrate’
# 1013|       memcpy(key_identifier, (char *) key->opaque_attr, key->attr_len);
# 1014|   
# 1015|->     CSNDKTC(&return_code,
# 1016|               &reason_code,
# 1017|               &exit_data_length,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1042]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1064:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key_identifier’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1191:5: enter_function: entry to ‘cca_migrate’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1198:22: branch_true: following ‘true’ branch (when ‘key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1199:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1204:18: call_function: calling ‘cca_migrate_symmetric’ from ‘cca_migrate’
# 1062|           key_identifier_length = key->type == CKK_AES_XTS ?
# 1063|                                           key->attr_len / 2 : key->attr_len;
# 1064|->         CSNBKTC2(&return_code,
# 1065|                    &reason_code,
# 1066|                    &exit_data_length,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1043]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1098:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key_identifier’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1191:5: enter_function: entry to ‘cca_migrate’
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1198:22: branch_true: following ‘true’ branch (when ‘key’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1199:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1204:18: call_function: calling ‘cca_migrate_symmetric’ from ‘cca_migrate’
# 1096|       } else {
# 1097|           /* AES DATA key */
# 1098|->         CSNBKTC(&return_code,
# 1099|                   &reason_code,
# 1100|                   &exit_data_length,

Error: CPPCHECK_WARNING (CWE-476): [#def1044]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1840: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mk_type
# 1838|           case 'k':
# 1839|               mk_type = strdup(optarg);
# 1840|->             if (strcmp(mk_type, "aes") == 0) {
# 1841|                   masterkey = MK_AES;
# 1842|               } else if (strcmp(mk_type, "apka") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1045]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1840:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘mk_type’ where non-null expected
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1829:12: branch_true: following ‘true’ branch (when ‘opt != -1’)...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1831:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1839:23: acquire_memory: this call could return NULL
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1840:17: danger: argument 1 (‘mk_type’) from [(5)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
# 1838|           case 'k':
# 1839|               mk_type = strdup(optarg);
# 1840|->             if (strcmp(mk_type, "aes") == 0) {
# 1841|                   masterkey = MK_AES;
# 1842|               } else if (strcmp(mk_type, "apka") == 0) {

Error: CPPCHECK_WARNING (CWE-476): [#def1046]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1856: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: m_type
# 1854|           case 'm':
# 1855|               m_type = strdup(optarg);
# 1856|->             if (strcmp(m_type, "v2objectsv3") == 0) {
# 1857|                   m_version = 1;
# 1858|               } else if (strcmp(m_type, "keys") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1047]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1856:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘m_type’ where non-null expected
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1829:12: branch_true: following ‘true’ branch (when ‘opt != -1’)...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1831:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1855:22: acquire_memory: this call could return NULL
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1856:17: danger: argument 1 (‘m_type’) from [(5)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
# 1854|           case 'm':
# 1855|               m_type = strdup(optarg);
# 1856|->             if (strcmp(m_type, "v2objectsv3") == 0) {
# 1857|                   m_version = 1;
# 1858|               } else if (strcmp(m_type, "keys") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1048]
opencryptoki-3.26.0/usr/sbin/pkcshsm_mk_change/pkcshsm_mk_change.c:453:10: warning[-Wanalyzer-malloc-leak]: leak of ‘payload’
opencryptoki-3.26.0/usr/sbin/pkcshsm_mk_change/pkcshsm_mk_change.c:936:12: enter_function: entry to ‘finalize_cancel_tokens’
opencryptoki-3.26.0/usr/sbin/pkcshsm_mk_change/pkcshsm_mk_change.c:947:10: call_function: calling ‘build_event_payload’ from ‘finalize_cancel_tokens’
#  451|       hdr->flags = 0;
#  452|   
#  453|->     rv = hsm_mk_change_info_flatten(&op.info, *payload + sizeof(*hdr),
#  454|                                       &info_len);
#  455|       if (rv != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1049]
opencryptoki-3.26.0/usr/sbin/pkcshsm_mk_change/pkcshsm_mk_change.c:1411:10: warning[-Wanalyzer-malloc-leak]: leak of ‘slots’
opencryptoki-3.26.0/usr/sbin/pkcshsm_mk_change/pkcshsm_mk_change.c:1391:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcshsm_mk_change/pkcshsm_mk_change.c:1397:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcshsm_mk_change/pkcshsm_mk_change.c:1399:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcshsm_mk_change/pkcshsm_mk_change.c:1405:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcshsm_mk_change/pkcshsm_mk_change.c:1405:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcshsm_mk_change/pkcshsm_mk_change.c:1406:8: branch_false: following ‘false’ branch (when ‘slots’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcshsm_mk_change/pkcshsm_mk_change.c:1411:19: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcshsm_mk_change/pkcshsm_mk_change.c:1411:10: throw: if the called function throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcshsm_mk_change/pkcshsm_mk_change.c:1411:10: danger: ‘slots’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 1409|       }
# 1410|   
# 1411|->     rc = func_list->C_GetSlotList(FALSE, slots, &num_slots);
# 1412|       if (rc != CKR_OK) {
# 1413|           warnx("Error getting slot list: 0x%lX (%s)", rc, p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1050]
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:217:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(config_file, "r")’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:213:12: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:214:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:217:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:217:11: throw: if ‘parse_configlib_file’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:217:11: danger: ‘fopen(config_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  215|           return NULL;
#  216|   
#  217|->     ret = parse_configlib_file(file, &config, config_parse_error,
#  218|                                  track_comments);
#  219|       fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1051]
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:217:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(config_file, "r")’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:213:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:214:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:217:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:217:11: throw: if ‘parse_configlib_file’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:217:11: danger: ‘fopen(config_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  215|           return NULL;
#  216|   
#  217|->     ret = parse_configlib_file(file, &config, config_parse_error,
#  218|                                  track_comments);
#  219|       fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1052]
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:328:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/etc/opencryptoki/opencryptoki.conf", "w")’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:226:12: enter_function: entry to ‘config_add_slotinfo’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:238:14: call_function: calling ‘config_parse’ from ‘config_add_slotinfo’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:238:14: return_function: returning to ‘config_add_slotinfo’ from ‘config_parse’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:239:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:239:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:250:17: branch_false: following ‘false’ branch (when ‘i >= num_of_slots’)...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:318:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:318:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:319:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:326:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:328:5: throw: if ‘confignode_dump’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:328:5: danger: ‘fopen("/etc/opencryptoki/opencryptoki.conf", "w")’ leaks here; was opened at [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
#  326|       fchmod(fileno(fp), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
#  327|   
#  328|->     confignode_dump(fp, config, NULL, 2);
#  329|       fclose(fp);
#  330|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1053]
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:328:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/etc/opencryptoki/opencryptoki.conf", "w")’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:226:12: enter_function: entry to ‘config_add_slotinfo’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:238:14: call_function: calling ‘config_parse’ from ‘config_add_slotinfo’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:238:14: return_function: returning to ‘config_add_slotinfo’ from ‘config_parse’
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:239:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:239:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:250:17: branch_false: following ‘false’ branch (when ‘i >= num_of_slots’)...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:318:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:318:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:319:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:326:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:328:5: throw: if ‘confignode_dump’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:328:5: danger: ‘fopen("/etc/opencryptoki/opencryptoki.conf", "w")’ leaks here; was allocated at [(13)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/12)
#  326|       fchmod(fileno(fp), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
#  327|   
#  328|->     confignode_dump(fp, config, NULL, 2);
#  329|       fclose(fp);
#  330|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1054]
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:684:13: warning[-Wanalyzer-null-argument]: use of NULL ‘tokenname’ where non-null expected
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:539:11: release_memory: ‘buf_racfpwd’ is NULL
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:622:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:626:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:626:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:626:23: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:630:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:634:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:654:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:660:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:660:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:683:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:684:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:684:13: danger: argument 1 (‘tokenname’) NULL where non-null expected
#  682|       /* Add token(s) */
#  683|       if (flags & CFG_ADD) {
#  684|->         if (strcmp(tokenname, "all") == 0) {
#  685|               rc = retrieve_all(racfpwd);
#  686|               if (rc) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1055]
opencryptoki-3.26.0/usr/sbin/pkcsslotd/log.c:130:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*pStuff.Filename, & FileMode)’
opencryptoki-3.26.0/usr/sbin/pkcsslotd/log.c:654:13: enter_function: entry to ‘InitLogging’
opencryptoki-3.26.0/usr/sbin/pkcsslotd/log.c:668:10: branch_true: following ‘true’ branch (when ‘i != 6’)...
opencryptoki-3.26.0/usr/sbin/pkcsslotd/log.c:671:36: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsslotd/log.c:671:14: call_function: calling ‘NewLoggingFacility’ from ‘InitLogging’
#  128|       asctime_r(&tm, buf);
#  129|       /* asctime_r puts a \n at the end, so we'll remove that */
#  130|->     buf[strlen(buf) - 1] = '\0';
#  131|   
#  132|       return TRUE;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def1056]
opencryptoki-3.26.0/usr/sbin/pkcsslotd/log.c:734:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
opencryptoki-3.26.0/usr/sbin/pkcsslotd/log.c:631:6: enter_function: entry to ‘InfoLog’
opencryptoki-3.26.0/usr/sbin/pkcsslotd/log.c:638:5: acquire_resource: ‘va_start’ called here
opencryptoki-3.26.0/usr/sbin/pkcsslotd/log.c:639:5: call_function: calling ‘PKCS_Log’ from ‘InfoLog’
#  732|       if (pInfo->pid != 0) {
#  733|           /* We've been initialized before, so close the previous instance */
#  734|->         closelog();
#  735|       }
#  736|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1057]
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:672:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/run/opencryptoki/pkcsslotd.pid", "w")’
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:664:15: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:665:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:671:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:672:5: throw: if ‘fflush’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:672:5: danger: ‘fopen("/run/opencryptoki/pkcsslotd.pid", "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  670|   
#  671|       fprintf(pidfile, "%d\n", (int) pid);
#  672|->     fflush(pidfile);
#  673|       fclose(pidfile);
#  674|       InfoLog("PID file (" PID_FILE_PATH ") created");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1058]
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:913:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(config_file, "r")’
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:905:12: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:906:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:912:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:912:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:915:25: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:913:9: throw: if ‘ErrLog’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:913:9: danger: ‘fopen(config_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  911|   
#  912|       if (fstat(fileno(file), &statbuf)) {
#  913|->         ErrLog("Error get file information for config file '%s': %s\n",
#  914|                  config_file,
#  915|                  strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1059]
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:920:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(config_file, "r")’
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:905:12: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:906:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:912:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:912:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:920:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:920:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:927:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:927:11: throw: if ‘parse_configlib_file’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcsslotd/slotmgr.c:920:10: danger: ‘fopen(config_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  918|       }
#  919|   
#  920|->     if ((statbuf.st_mode & S_IWOTH)) {
#  921|           ErrLog("Config file %s is world writable, this is not accepted\n",
#  922|                  config_file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1060]
opencryptoki-3.26.0/usr/sbin/pkcsslotd/socket_server.c:1358:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘listener_socket’
opencryptoki-3.26.0/usr/sbin/pkcsslotd/socket_server.c:1477:12: enter_function: entry to ‘listener_create’
opencryptoki-3.26.0/usr/sbin/pkcsslotd/socket_server.c:1505:24: call_function: calling ‘listener_socket_create’ from ‘listener_create’
# 1356|       if (unlink(file_path) && errno != ENOENT) {
# 1357|           err = errno;
# 1358|->         ErrLog("%s: Failed to unlink socket file, errno %d (%s).", __func__,
# 1359|                  err, strerror(err));
# 1360|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1061]
opencryptoki-3.26.0/usr/sbin/pkcsslotd/socket_server.c:1398:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘listener_socket’
opencryptoki-3.26.0/usr/sbin/pkcsslotd/socket_server.c:1477:12: enter_function: entry to ‘listener_create’
opencryptoki-3.26.0/usr/sbin/pkcsslotd/socket_server.c:1505:24: call_function: calling ‘listener_socket_create’ from ‘listener_create’
# 1396|       if (listen(listener_socket, 20) != 0) {
# 1397|           err = errno;
# 1398|->         ErrLog("%s: Failed to listen to socket, errno %d (%s).", __func__, err,
# 1399|                  strerror(err));
# 1400|           goto error;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1062]
opencryptoki-3.26.0/usr/sbin/pkcsslotd/socket_server.c:1415:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘listener_socket’
opencryptoki-3.26.0/usr/sbin/pkcsslotd/socket_server.c:1477:12: enter_function: entry to ‘listener_create’
opencryptoki-3.26.0/usr/sbin/pkcsslotd/socket_server.c:1505:24: call_function: calling ‘listener_socket_create’ from ‘listener_create’
# 1413|   static void listener_socket_close(int listener_socket, const char *file_path)
# 1414|   {
# 1415|->     close(listener_socket);
# 1416|       unlink(file_path);
# 1417|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1063]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:171:14: warning[-Wanalyzer-malloc-leak]: leak of ‘sd.summary_data’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:679:12: enter_function: entry to ‘display_summary’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:687:23: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:688:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:693:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:693:10: call_function: calling ‘for_all_users’ from ‘display_summary’
#  169|       make_shm_name(shm_prefix, sizeof(shm_prefix), -1);
#  170|   
#  171|->     shmDir = opendir("/dev/shm");
#  172|       if (shmDir == NULL) {
#  173|           warnx("Failed to open /dev/shm: %s", strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1064]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:171:14: warning[-Wanalyzer-malloc-leak]: leak of ‘user_name’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:795:5: enter_function: entry to ‘main’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:900:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:900:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:918:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_true: following ‘true’ branch (when ‘user_id == -1’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:929:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:931:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:938:8: branch_false: following ‘false’ branch (when ‘user_name’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: following ‘false’ branch (when ‘delete == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_true: following ‘true’ branch (when ‘delete_all != 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:955:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:955:12: branch_false: following ‘false’ branch (when ‘slot_id_specified == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:961:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:961:14: call_function: calling ‘for_all_users’ from ‘main’
#  169|       make_shm_name(shm_prefix, sizeof(shm_prefix), -1);
#  170|   
#  171|->     shmDir = opendir("/dev/shm");
#  172|       if (shmDir == NULL) {
#  173|           warnx("Failed to open /dev/shm: %s", strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1065]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:173:9: warning[-Wanalyzer-malloc-leak]: leak of ‘sd.summary_data’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:679:12: enter_function: entry to ‘display_summary’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:687:23: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:688:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:693:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:693:10: call_function: calling ‘for_all_users’ from ‘display_summary’
#  171|       shmDir = opendir("/dev/shm");
#  172|       if (shmDir == NULL) {
#  173|->         warnx("Failed to open /dev/shm: %s", strerror(errno));
#  174|           return 1;
#  175|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1066]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:173:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user_name’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:795:5: enter_function: entry to ‘main’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:900:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:900:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:918:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_true: following ‘true’ branch (when ‘user_id == -1’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:929:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:931:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:938:8: branch_false: following ‘false’ branch (when ‘user_name’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: following ‘false’ branch (when ‘delete == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_true: following ‘true’ branch (when ‘delete_all != 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:955:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:955:12: branch_false: following ‘false’ branch (when ‘slot_id_specified == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:961:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:961:14: call_function: calling ‘for_all_users’ from ‘main’
#  171|       shmDir = opendir("/dev/shm");
#  172|       if (shmDir == NULL) {
#  173|->         warnx("Failed to open /dev/shm: %s", strerror(errno));
#  174|           return 1;
#  175|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1067]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:177:23: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/dev/shm")’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:679:12: enter_function: entry to ‘display_summary’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:688:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:693:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:693:10: call_function: calling ‘for_all_users’ from ‘display_summary’
#  175|       }
#  176|   
#  177|->     while ((direntp = readdir(shmDir)) != NULL) {
#  178|           if(strstr(direntp->d_name, &shm_prefix[1]) != NULL) {
#  179|               errno = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1068]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:177:23: warning[-Wanalyzer-malloc-leak]: leak of ‘sd.summary_data’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:679:12: enter_function: entry to ‘display_summary’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:687:23: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:688:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:693:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:693:10: call_function: calling ‘for_all_users’ from ‘display_summary’
#  175|       }
#  176|   
#  177|->     while ((direntp = readdir(shmDir)) != NULL) {
#  178|           if(strstr(direntp->d_name, &shm_prefix[1]) != NULL) {
#  179|               errno = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1069]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:177:23: warning[-Wanalyzer-malloc-leak]: leak of ‘user_name’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:795:5: enter_function: entry to ‘main’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:900:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:900:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:918:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_true: following ‘true’ branch (when ‘user_id == -1’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:929:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:931:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:938:8: branch_false: following ‘false’ branch (when ‘user_name’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: following ‘false’ branch (when ‘delete == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_true: following ‘true’ branch (when ‘delete_all != 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:955:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:955:12: branch_false: following ‘false’ branch (when ‘slot_id_specified == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:961:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:961:14: call_function: calling ‘for_all_users’ from ‘main’
#  175|       }
#  176|   
#  177|->     while ((direntp = readdir(shmDir)) != NULL) {
#  178|           if(strstr(direntp->d_name, &shm_prefix[1]) != NULL) {
#  179|               errno = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1070]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:281:10: warning[-Wanalyzer-malloc-leak]: leak of ‘user_name’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:795:5: enter_function: entry to ‘main’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:918:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_true: following ‘true’ branch (when ‘user_id == -1’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:929:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:931:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:938:8: branch_false: following ‘false’ branch (when ‘user_name’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_true: following ‘true’ branch (when ‘delete != 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:944:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:944:12: branch_false: following ‘false’ branch (when ‘slot_id_specified == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:950:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:950:14: call_function: calling ‘delete_shm’ from ‘main’
#  279|   
#  280|       make_shm_name(shm_name, sizeof(shm_name), user_id);
#  281|->     rc = shm_unlink(shm_name);
#  282|       if (rc != 0) {
#  283|           if (errno == ENOENT)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1071]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:284:13: warning[-Wanalyzer-malloc-leak]: leak of ‘user_name’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:795:5: enter_function: entry to ‘main’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:918:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_true: following ‘true’ branch (when ‘user_id == -1’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:929:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:931:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:938:8: branch_false: following ‘false’ branch (when ‘user_name’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_true: following ‘true’ branch (when ‘delete != 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:944:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:944:12: branch_false: following ‘false’ branch (when ‘slot_id_specified == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:950:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:950:14: call_function: calling ‘delete_shm’ from ‘main’
#  282|       if (rc != 0) {
#  283|           if (errno == ENOENT)
#  284|->             warnx("No statistics are available for user '%s'", user_name);
#  285|           else
#  286|               warnx("Failed to delete statistics for user '%s': shm_unlink('%s'): %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1072]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:286:13: warning[-Wanalyzer-malloc-leak]: leak of ‘user_name’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:795:5: enter_function: entry to ‘main’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:918:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_true: following ‘true’ branch (when ‘user_id == -1’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:929:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:931:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:938:8: branch_false: following ‘false’ branch (when ‘user_name’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_true: following ‘true’ branch (when ‘delete != 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:944:12: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:944:12: branch_false: following ‘false’ branch (when ‘slot_id_specified == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:950:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:950:14: call_function: calling ‘delete_shm’ from ‘main’
#  284|               warnx("No statistics are available for user '%s'", user_name);
#  285|           else
#  286|->             warnx("Failed to delete statistics for user '%s': shm_unlink('%s'): %s",
#  287|                     user_name, shm_name,  strerror(errno));
#  288|           return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1073]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:726:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user_name’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:795:5: enter_function: entry to ‘main’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:918:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_true: following ‘true’ branch (when ‘user_id == -1’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:929:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:931:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:938:8: branch_false: following ‘false’ branch (when ‘user_name’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: following ‘false’ branch (when ‘delete == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: following ‘false’ branch (when ‘delete_all == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:965:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:965:10: call_function: calling ‘init_ock’ from ‘main’
#  724|       *dll = dlopen(OCK_API_LIBNAME, DYNLIB_LDFLAGS);
#  725|       if (*dll == NULL) {
#  726|->         warnx("Error loading PKCS#11 library: dlopen: %s", dlerror());
#  727|           return 1;
#  728|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1074]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:732:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user_name’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:795:5: enter_function: entry to ‘main’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:918:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_true: following ‘true’ branch (when ‘user_id == -1’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:929:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:931:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:938:8: branch_false: following ‘false’ branch (when ‘user_name’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: following ‘false’ branch (when ‘delete == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: following ‘false’ branch (when ‘delete_all == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:965:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:965:10: call_function: calling ‘init_ock’ from ‘main’
#  730|       *(void **)(&sym_ptr) = dlsym(*dll, "C_GetFunctionList");
#  731|       if (sym_ptr == NULL) {
#  732|->         warnx("Error loading PKCS#11 library: dlsym(C_GetFunctionList): %s",
#  733|                 dlerror());
#  734|   #ifndef WITH_SANITIZER

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1075]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:741:5: warning[-Wanalyzer-malloc-leak]: leak of ‘user_name’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:795:5: enter_function: entry to ‘main’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:918:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_true: following ‘true’ branch (when ‘user_id == -1’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:929:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:931:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:938:8: branch_false: following ‘false’ branch (when ‘user_name’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: following ‘false’ branch (when ‘delete == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: following ‘false’ branch (when ‘delete_all == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:965:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:965:10: call_function: calling ‘init_ock’ from ‘main’
#  739|       }
#  740|   
#  741|->     sym_ptr(func_list);
#  742|       if (*func_list == NULL) {
#  743|           warnx("Error getting function list from PKCS11 library");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1076]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:743:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user_name’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:795:5: enter_function: entry to ‘main’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:918:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_true: following ‘true’ branch (when ‘user_id == -1’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:929:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:931:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:938:8: branch_false: following ‘false’ branch (when ‘user_name’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: following ‘false’ branch (when ‘delete == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: following ‘false’ branch (when ‘delete_all == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:965:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:965:10: call_function: calling ‘init_ock’ from ‘main’
#  741|       sym_ptr(func_list);
#  742|       if (*func_list == NULL) {
#  743|->         warnx("Error getting function list from PKCS11 library");
#  744|   #ifndef WITH_SANITIZER
#  745|           dlclose(*dll);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1077]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:751:10: warning[-Wanalyzer-malloc-leak]: leak of ‘user_name’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:795:5: enter_function: entry to ‘main’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:918:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_true: following ‘true’ branch (when ‘user_id == -1’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:929:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:931:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:938:8: branch_false: following ‘false’ branch (when ‘user_name’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: following ‘false’ branch (when ‘delete == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: following ‘false’ branch (when ‘delete_all == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:965:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:965:10: call_function: calling ‘init_ock’ from ‘main’
#  749|       }
#  750|   
#  751|->     rc = (*func_list)->C_Initialize(NULL);
#  752|       if (rc != CKR_OK) {
#  753|           warnx("Error initializing the PKCS11 library: 0x%lX (%s)", rc,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1078]
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:753:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user_name’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:795:5: enter_function: entry to ‘main’
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:918:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:923:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:928:8: branch_true: following ‘true’ branch (when ‘user_id == -1’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:929:19: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:931:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:937:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:938:8: branch_false: following ‘false’ branch (when ‘user_name’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:943:8: branch_false: following ‘false’ branch (when ‘delete == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:954:8: branch_false: following ‘false’ branch (when ‘delete_all == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:965:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsstats/pkcsstats.c:965:10: call_function: calling ‘init_ock’ from ‘main’
#  751|       rc = (*func_list)->C_Initialize(NULL);
#  752|       if (rc != CKR_OK) {
#  753|->         warnx("Error initializing the PKCS11 library: 0x%lX (%s)", rc,
#  754|                  p11_get_ckr(rc));
#  755|   #ifndef WITH_SANITIZER

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1079]
opencryptoki-3.26.0/usr/sbin/pkcstok_admin/pkcstok_admin.c:439:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(fname)’
opencryptoki-3.26.0/usr/sbin/pkcstok_admin/pkcstok_admin.c:417:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_admin/pkcstok_admin.c:429:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_admin/pkcstok_admin.c:429:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_admin/pkcstok_admin.c:430:15: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_admin/pkcstok_admin.c:430:15: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_admin/pkcstok_admin.c:431:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_admin/pkcstok_admin.c:431:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_admin/pkcstok_admin.c:439:25: throw: if ‘readdir’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_admin/pkcstok_admin.c:439:25: danger: ‘opendir(fname)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  437|           /* remove directory recursively, skip the "." and ".." entries */
#  438|           rc = 0;
#  439|->         while ((entry = readdir(dir)) != NULL) {
#  440|               if (strncmp(entry->d_name, ".", 1) == 0)
#  441|                   continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1080]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:93:9: warning[-Wanalyzer-malloc-leak]: leak of ‘obj_new’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:186:14: enter_function: entry to ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:198:11: call_function: calling ‘make_OBJECT_PUB_312’ from ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:198:11: return_function: returning to ‘migrate_public_token_object’ from ‘make_OBJECT_PUB_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:199:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: call_function: calling ‘open_tokenobject’ from ‘migrate_public_token_object’
#   91|   
#   92|       if (ock_snprintf(buf, buflen, "%s/%s/%s", datastore, tokenobj, file) != 0) {
#   93|->         TRACE_ERROR("Path overflow for token object file %s for token %s\n",
#   94|                       file, tokenobj);
#   95|           return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1081]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:99:9: warning[-Wanalyzer-malloc-leak]: leak of ‘obj_new’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:186:14: enter_function: entry to ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:198:11: call_function: calling ‘make_OBJECT_PUB_312’ from ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:198:11: return_function: returning to ‘migrate_public_token_object’ from ‘make_OBJECT_PUB_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:199:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: call_function: calling ‘open_tokenobject’ from ‘migrate_public_token_object’
#   97|       res = fopen(buf, mode);
#   98|       if (!res)
#   99|->         TRACE_ERROR("fopen(%s) failed, errno=%s\n", buf, strerror(errno));
#  100|       return res;
#  101|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1082]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:210:11: warning[-Wanalyzer-malloc-leak]: leak of ‘obj_new’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:186:14: enter_function: entry to ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:198:11: call_function: calling ‘make_OBJECT_PUB_312’ from ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:198:11: return_function: returning to ‘migrate_public_token_object’ from ‘make_OBJECT_PUB_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:199:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: call_function: calling ‘open_tokenobject’ from ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: return_function: returning to ‘migrate_public_token_object’ from ‘open_tokenobject’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:206:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:210:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:210:11: throw: if ‘set_perm’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:210:11: danger: ‘obj_new’ leaks here; was allocated at [(6)](sarif:/runs/0/results/85/codeFlows/0/threadFlows/0/locations/5)
#  208|           goto done;
#  209|       }
#  210|->     ret = set_perm(fileno(fp), token_group);
#  211|       if (ret != CKR_OK)
#  212|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1083]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:216:9: warning[-Wanalyzer-malloc-leak]: leak of ‘obj_new’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:186:14: enter_function: entry to ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:198:11: call_function: calling ‘make_OBJECT_PUB_312’ from ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:198:11: return_function: returning to ‘migrate_public_token_object’ from ‘make_OBJECT_PUB_312’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:199:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: call_function: calling ‘open_tokenobject’ from ‘migrate_public_token_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:205:10: return_function: returning to ‘migrate_public_token_object’ from ‘open_tokenobject’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:206:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:210:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:211:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:215:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:215:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:216:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:216:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:216:9: danger: ‘obj_new’ leaks here; was allocated at [(6)](sarif:/runs/0/results/86/codeFlows/0/threadFlows/0/locations/5)
#  214|       /* Save new object */
#  215|       if (fwrite(obj_new, obj_new_len, 1, fp) != 1) {
#  216|->         TRACE_ERROR("fwrite(%s) failed, errno=%s\n", fname, strerror(errno));
#  217|           ret = CKR_FUNCTION_FAILED;
#  218|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1084]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:296:11: warning[-Wanalyzer-malloc-leak]: leak of ‘object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:272:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:279:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:287:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:288:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:289:8: branch_false: following ‘false’ branch (when ‘object’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:296:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:296:11: throw: if ‘local_rng’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:296:11: danger: ‘object’ leaks here; was allocated at [(5)](sarif:/runs/0/results/87/codeFlows/0/threadFlows/0/locations/4)
#  294|   
#  295|       /* Create new object key */
#  296|->     ret = local_rng(obj_key, 32);
#  297|       if (ret != CKR_OK) {
#  298|           TRACE_ERROR("local_rng failed with ret=%08lX.\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1085]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:298:9: warning[-Wanalyzer-malloc-leak]: leak of ‘object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:272:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:279:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:287:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:288:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:289:8: branch_false: following ‘false’ branch (when ‘object’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:296:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:297:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:298:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:298:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:298:9: danger: ‘object’ leaks here; was allocated at [(5)](sarif:/runs/0/results/88/codeFlows/0/threadFlows/0/locations/4)
#  296|       ret = local_rng(obj_key, 32);
#  297|       if (ret != CKR_OK) {
#  298|->         TRACE_ERROR("local_rng failed with ret=%08lX.\n", ret);
#  299|           goto done;
#  300|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1086]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:306:11: warning[-Wanalyzer-malloc-leak]: leak of ‘object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:272:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:279:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:287:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:288:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:289:8: branch_false: following ‘false’ branch (when ‘object’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:296:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:297:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:303:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:306:11: throw: if ‘aes_256_wrap’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:306:11: danger: ‘object’ leaks here; was allocated at [(5)](sarif:/runs/0/results/89/codeFlows/0/threadFlows/0/locations/4)
#  304|       header.tokversion = htobe32(0x0003000C);
#  305|       header.private_flag = 0x01;
#  306|->     ret = aes_256_wrap(header.key_wrapped, obj_key, masterkey);
#  307|       if (ret != CKR_OK) {
#  308|           TRACE_ERROR("aes_256_wrap failed with ret=%08lX.\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1087]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:308:9: warning[-Wanalyzer-malloc-leak]: leak of ‘object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:272:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:279:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:287:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:288:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:289:8: branch_false: following ‘false’ branch (when ‘object’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:296:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:297:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:303:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:307:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:308:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:308:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:308:9: danger: ‘object’ leaks here; was allocated at [(5)](sarif:/runs/0/results/90/codeFlows/0/threadFlows/0/locations/4)
#  306|       ret = aes_256_wrap(header.key_wrapped, obj_key, masterkey);
#  307|       if (ret != CKR_OK) {
#  308|->         TRACE_ERROR("aes_256_wrap failed with ret=%08lX.\n", ret);
#  309|           goto done;
#  310|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1088]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:321:11: warning[-Wanalyzer-malloc-leak]: leak of ‘object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:272:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:279:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:287:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:288:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:289:8: branch_false: following ‘false’ branch (when ‘object’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:296:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:297:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:303:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:307:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:312:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:321:11: throw: if ‘aes_256_gcm_seal’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:321:11: danger: ‘object’ leaks here; was allocated at [(5)](sarif:/runs/0/results/91/codeFlows/0/threadFlows/0/locations/4)
#  319|   
#  320|       /* Encrypt body */
#  321|->     ret = aes_256_gcm_seal(object + HEADER_LEN, /* ciphertext */
#  322|                              object + HEADER_LEN + clear_len, /* tag */
#  323|                              object, HEADER_LEN, /* aad */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1089]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:383:12: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp_clear’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:373:17: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:374:8: branch_false: following ‘false’ branch (when ‘tmp_clear’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:382:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:383:12: throw: if ‘sw_des3_cbc’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:383:12: danger: ‘tmp_clear’ leaks here; was allocated at [(1)](sarif:/runs/0/results/92/codeFlows/0/threadFlows/0/locations/0)
#  381|       /* Decrypt old object */
#  382|       memcpy(des3_key, masterkey_old, MAX_MASTER_KEY_SIZE);
#  383|->     ret  = sw_des3_cbc_decrypt(enc_old, enc_len, tmp_clear, &tmp_clear_len,
#  384|                                  (CK_BYTE *)"10293847", des3_key);
#  385|       if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-789): [#def1090]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:548:11: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘size + 4294967291’ as allocation size without upper-bounds checking
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:580:14: enter_function: entry to ‘read_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:594:10: call_function: calling ‘open_tokenobject’ from ‘read_object’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:594:10: return_function: returning to ‘read_object’ from ‘open_tokenobject’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:595:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:601:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:602:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:611:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:611:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:619:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:620:11: call_function: calling ‘read_object_00’ from ‘read_object’
#  546|       /* Allocate buffer for obj */
#  547|       size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
#  548|->     buf = malloc(size);
#  549|       if (!buf) {
#  550|           TRACE_ERROR("Cannot malloc %d bytes for object %s.\n", size, name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1091]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:558:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:526:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:533:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:534:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:540:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:540:8: branch_false: following ‘false’ branch (when ‘size > 5’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:547:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:548:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:549:8: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:556:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:557:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:558:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:558:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:558:9: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/94/codeFlows/0/threadFlows/0/locations/6)
#  556|       read_size = fread((char *)buf, 1, size, fp);
#  557|       if (read_size != size) {
#  558|->         TRACE_ERROR("Cannot read old object %s.\n", name);
#  559|           ret = CKR_FUNCTION_FAILED;
#  560|           free(buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1092]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:754:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:744:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:745:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:752:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:753:8: branch_true: following ‘true’ branch (when ‘rc != 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:754:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:754:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:754:9: danger: ‘fopen(&fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/95/codeFlows/0/threadFlows/0/locations/0)
#  752|       rc = fread(inbuf, sizeof(inbuf), 1, fp);
#  753|       if (rc != 1) {
#  754|->         TRACE_ERROR("Cannot read %zu bytes from %s.\n", sizeof(inbuf), fname);
#  755|           ret = CKR_FUNCTION_FAILED;
#  756|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1093]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:754:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:744:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:745:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:752:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:753:8: branch_true: following ‘true’ branch (when ‘rc != 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:754:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:754:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:754:9: danger: ‘fopen(&fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/96/codeFlows/0/threadFlows/0/locations/0)
#  752|       rc = fread(inbuf, sizeof(inbuf), 1, fp);
#  753|       if (rc != 1) {
#  754|->         TRACE_ERROR("Cannot read %zu bytes from %s.\n", sizeof(inbuf), fname);
#  755|           ret = CKR_FUNCTION_FAILED;
#  756|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1094]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:761:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:744:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:745:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:752:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:753:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:761:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:761:14: throw: if ‘EVP_sha512’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:761:14: danger: ‘fopen(&fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/97/codeFlows/0/threadFlows/0/locations/0)
#  759|       /* Derive wrapping key from pin and public info in TOKEN_DATA */
#  760|       if (strstr(mkfile,"MK_SO")) {
#  761|->         rc = PKCS5_PBKDF2_HMAC(pin, strlen(pin),
#  762|                                  tokdata->dat.so_wrap_salt, 64,
#  763|                                  tokdata->dat.so_wrap_it, EVP_sha512(),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1095]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:761:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:744:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:745:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:752:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:753:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:761:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:761:14: throw: if ‘EVP_sha512’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:761:14: danger: ‘fopen(&fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/98/codeFlows/0/threadFlows/0/locations/0)
#  759|       /* Derive wrapping key from pin and public info in TOKEN_DATA */
#  760|       if (strstr(mkfile,"MK_SO")) {
#  761|->         rc = PKCS5_PBKDF2_HMAC(pin, strlen(pin),
#  762|                                  tokdata->dat.so_wrap_salt, 64,
#  763|                                  tokdata->dat.so_wrap_it, EVP_sha512(),

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1096]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:763:32: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:744:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:745:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:752:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:753:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:761:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:761:14: throw: if ‘PKCS5_PBKDF2_HMAC’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:763:32: danger: ‘fopen(&fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/99/codeFlows/0/threadFlows/0/locations/0)
#  761|           rc = PKCS5_PBKDF2_HMAC(pin, strlen(pin),
#  762|                                  tokdata->dat.so_wrap_salt, 64,
#  763|->                                tokdata->dat.so_wrap_it, EVP_sha512(),
#  764|                                  256 / 8, wrap_key);
#  765|       } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1097]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:763:32: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:744:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:745:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:752:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:753:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:761:14: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:761:14: throw: if ‘PKCS5_PBKDF2_HMAC’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:763:32: danger: ‘fopen(&fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/100/codeFlows/0/threadFlows/0/locations/0)
#  761|           rc = PKCS5_PBKDF2_HMAC(pin, strlen(pin),
#  762|                                  tokdata->dat.so_wrap_salt, 64,
#  763|->                                tokdata->dat.so_wrap_it, EVP_sha512(),
#  764|                                  256 / 8, wrap_key);
#  765|       } else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1098]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:766:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:744:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:745:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:752:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:753:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:766:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:766:14: throw: if ‘EVP_sha512’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:766:14: danger: ‘fopen(&fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/101/codeFlows/0/threadFlows/0/locations/0)
#  764|                                  256 / 8, wrap_key);
#  765|       } else {
#  766|->         rc = PKCS5_PBKDF2_HMAC(pin, strlen(pin),
#  767|                                  tokdata->dat.user_wrap_salt, 64,
#  768|                                  tokdata->dat.user_wrap_it, EVP_sha512(),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1099]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:766:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:744:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:745:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:752:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:753:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:766:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:766:14: throw: if ‘EVP_sha512’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:766:14: danger: ‘fopen(&fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/102/codeFlows/0/threadFlows/0/locations/0)
#  764|                                  256 / 8, wrap_key);
#  765|       } else {
#  766|->         rc = PKCS5_PBKDF2_HMAC(pin, strlen(pin),
#  767|                                  tokdata->dat.user_wrap_salt, 64,
#  768|                                  tokdata->dat.user_wrap_it, EVP_sha512(),

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1100]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:768:32: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:744:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:745:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:752:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:753:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:766:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:766:14: throw: if ‘PKCS5_PBKDF2_HMAC’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:768:32: danger: ‘fopen(&fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/103/codeFlows/0/threadFlows/0/locations/0)
#  766|           rc = PKCS5_PBKDF2_HMAC(pin, strlen(pin),
#  767|                                  tokdata->dat.user_wrap_salt, 64,
#  768|->                                tokdata->dat.user_wrap_it, EVP_sha512(),
#  769|                                  256 / 8, wrap_key);
#  770|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1101]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:768:32: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:744:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:745:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:752:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:753:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:760:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:766:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:766:14: throw: if ‘PKCS5_PBKDF2_HMAC’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:768:32: danger: ‘fopen(&fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/104/codeFlows/0/threadFlows/0/locations/0)
#  766|           rc = PKCS5_PBKDF2_HMAC(pin, strlen(pin),
#  767|                                  tokdata->dat.user_wrap_salt, 64,
#  768|->                                tokdata->dat.user_wrap_it, EVP_sha512(),
#  769|                                  256 / 8, wrap_key);
#  770|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1102]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(mkfile, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:821:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: throw: if ‘fseek’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: danger: ‘fopen(mkfile, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/111/codeFlows/0/threadFlows/0/locations/0)
#  826|   
#  827|       /* Determine the master key length */
#  828|->     fseek(fp, 0L, SEEK_END);
#  829|       file_size = ftell(fp);
#  830|       switch (file_size) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1103]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(mkfile, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:821:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: throw: if ‘fseek’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: danger: ‘fopen(mkfile, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/112/codeFlows/0/threadFlows/0/locations/0)
#  826|   
#  827|       /* Determine the master key length */
#  828|->     fseek(fp, 0L, SEEK_END);
#  829|       file_size = ftell(fp);
#  830|       switch (file_size) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1104]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:829:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(mkfile, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:821:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:829:17: throw: if ‘ftell’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:829:17: danger: ‘fopen(mkfile, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/113/codeFlows/0/threadFlows/0/locations/0)
#  827|       /* Determine the master key length */
#  828|       fseek(fp, 0L, SEEK_END);
#  829|->     file_size = ftell(fp);
#  830|       switch (file_size) {
#  831|       case MK_FILE_SIZE_00_CCA: /* CCA token */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1105]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:829:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(mkfile, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:821:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:829:17: throw: if ‘ftell’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:829:17: danger: ‘fopen(mkfile, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/114/codeFlows/0/threadFlows/0/locations/0)
#  827|       /* Determine the master key length */
#  828|       fseek(fp, 0L, SEEK_END);
#  829|->     file_size = ftell(fp);
#  830|       switch (file_size) {
#  831|       case MK_FILE_SIZE_00_CCA: /* CCA token */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1106]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:839:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(mkfile, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:821:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:839:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:839:9: danger: ‘fopen(mkfile, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/115/codeFlows/0/threadFlows/0/locations/0)
#  837|       default:
#  838|           /* Unknown MK format, should not occur. */
#  839|->         TRACE_ERROR("%s has an unknown file size of %d bytes. Should be either 48 or 88 bytes.\n",
#  840|                       mkfile, file_size);
#  841|           ret = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1107]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:839:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(mkfile, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:821:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:839:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:839:9: danger: ‘fopen(mkfile, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/116/codeFlows/0/threadFlows/0/locations/0)
#  837|       default:
#  838|           /* Unknown MK format, should not occur. */
#  839|->         TRACE_ERROR("%s has an unknown file size of %d bytes. Should be either 48 or 88 bytes.\n",
#  840|                       mkfile, file_size);
#  841|           ret = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1108]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:844:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(mkfile, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:821:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:844:5: throw: if ‘rewind’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:844:5: danger: ‘fopen(mkfile, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/117/codeFlows/0/threadFlows/0/locations/0)
#  842|           goto done;
#  843|       }
#  844|->     rewind(fp);
#  845|   
#  846|       /* Read file contents */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1109]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:844:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(mkfile, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:821:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:844:5: throw: if ‘rewind’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:844:5: danger: ‘fopen(mkfile, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/118/codeFlows/0/threadFlows/0/locations/0)
#  842|           goto done;
#  843|       }
#  844|->     rewind(fp);
#  845|   
#  846|       /* Read file contents */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1110]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:848:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(mkfile, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:821:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:853:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:858:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:859:8: branch_true: following ‘true’ branch (when ‘rc != 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:860:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:860:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:848:13: danger: ‘fopen(mkfile, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/119/codeFlows/0/threadFlows/0/locations/0)
#  846|       /* Read file contents */
#  847|       clear_len = cipher_len =
#  848|->             (master_key_len + SHA1_HASH_SIZE +
#  849|               (DES_BLOCK_SIZE - 1)) & ~(DES_BLOCK_SIZE - 1);
#  850|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1111]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:848:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(mkfile, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:821:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:853:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:858:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:859:8: branch_true: following ‘true’ branch (when ‘rc != 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:860:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:860:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:848:13: danger: ‘fopen(mkfile, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/120/codeFlows/0/threadFlows/0/locations/0)
#  846|       /* Read file contents */
#  847|       clear_len = cipher_len =
#  848|->             (master_key_len + SHA1_HASH_SIZE +
#  849|               (DES_BLOCK_SIZE - 1)) & ~(DES_BLOCK_SIZE - 1);
#  850|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1112]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:860:9: warning[-Wanalyzer-malloc-leak]: leak of ‘cipher’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:851:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:853:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:858:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:859:8: branch_true: following ‘true’ branch (when ‘rc != 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:860:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:860:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:860:9: danger: ‘cipher’ leaks here; was allocated at [(3)](sarif:/runs/0/results/135/codeFlows/0/threadFlows/0/locations/2)
#  858|       rc = fread(cipher, cipher_len, 1, fp);
#  859|       if (rc != 1) {
#  860|->         TRACE_ERROR("Cannot read %ld bytes from %s\n", cipher_len, mkfile);
#  861|           ret = CKR_FUNCTION_FAILED;
#  862|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1113]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:860:9: warning[-Wanalyzer-malloc-leak]: leak of ‘clear’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:852:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:853:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:858:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:859:8: branch_true: following ‘true’ branch (when ‘rc != 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:860:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:860:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:860:9: danger: ‘clear’ leaks here; was allocated at [(3)](sarif:/runs/0/results/136/codeFlows/0/threadFlows/0/locations/2)
#  858|       rc = fread(cipher, cipher_len, 1, fp);
#  859|       if (rc != 1) {
#  860|->         TRACE_ERROR("Cannot read %ld bytes from %s\n", cipher_len, mkfile);
#  861|           ret = CKR_FUNCTION_FAILED;
#  862|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1114]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:866:11: warning[-Wanalyzer-malloc-leak]: leak of ‘cipher’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:851:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:853:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:858:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:859:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:866:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:866:11: throw: if ‘compute_hash’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:866:11: danger: ‘cipher’ leaks here; was allocated at [(3)](sarif:/runs/0/results/137/codeFlows/0/threadFlows/0/locations/2)
#  864|   
#  865|       /* Decrypt the masterkey */
#  866|->     ret = compute_md5((char *)pin, strlen(pin), pin_md5_hash);
#  867|       if (ret) {
#  868|           TRACE_ERROR("Error calculating MD5 of PIN, ret=%08lX\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1115]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:866:11: warning[-Wanalyzer-malloc-leak]: leak of ‘clear’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:852:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:853:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:858:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:859:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:866:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:866:11: throw: if ‘compute_hash’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:866:11: danger: ‘clear’ leaks here; was allocated at [(3)](sarif:/runs/0/results/138/codeFlows/0/threadFlows/0/locations/2)
#  864|   
#  865|       /* Decrypt the masterkey */
#  866|->     ret = compute_md5((char *)pin, strlen(pin), pin_md5_hash);
#  867|       if (ret) {
#  868|           TRACE_ERROR("Error calculating MD5 of PIN, ret=%08lX\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1116]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:868:9: warning[-Wanalyzer-malloc-leak]: leak of ‘cipher’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:851:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:853:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:858:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:859:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:866:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:867:8: branch_true: following ‘true’ branch (when ‘ret != 0’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:868:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:868:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:868:9: danger: ‘cipher’ leaks here; was allocated at [(3)](sarif:/runs/0/results/139/codeFlows/0/threadFlows/0/locations/2)
#  866|       ret = compute_md5((char *)pin, strlen(pin), pin_md5_hash);
#  867|       if (ret) {
#  868|->         TRACE_ERROR("Error calculating MD5 of PIN, ret=%08lX\n", ret);
#  869|           goto done;
#  870|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1117]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:868:9: warning[-Wanalyzer-malloc-leak]: leak of ‘clear’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:852:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:853:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:858:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:859:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:866:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:867:8: branch_true: following ‘true’ branch (when ‘ret != 0’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:868:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:868:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:868:9: danger: ‘clear’ leaks here; was allocated at [(3)](sarif:/runs/0/results/140/codeFlows/0/threadFlows/0/locations/2)
#  866|       ret = compute_md5((char *)pin, strlen(pin), pin_md5_hash);
#  867|       if (ret) {
#  868|->         TRACE_ERROR("Error calculating MD5 of PIN, ret=%08lX\n", ret);
#  869|           goto done;
#  870|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1118]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:875:11: warning[-Wanalyzer-malloc-leak]: leak of ‘cipher’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:851:14: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:853:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:858:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:859:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:866:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:867:8: branch_false: following ‘false’ branch (when ‘ret == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:872:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:875:11: throw: if ‘sw_des3_cbc’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:875:11: danger: ‘cipher’ leaks here; was allocated at [(3)](sarif:/runs/0/results/141/codeFlows/0/threadFlows/0/locations/2)
#  873|       memcpy(des3_key + MD5_HASH_SIZE, pin_md5_hash, DES_KEY_SIZE);
#  874|   
#  875|->     ret = sw_des3_cbc_decrypt(cipher, cipher_len, clear,
#  876|                                 &clear_len, (unsigned char *) "12345678",
#  877|                                 des3_key);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1119]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:875:11: warning[-Wanalyzer-malloc-leak]: leak of ‘clear’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:822:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:828:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:852:13: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:853:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:858:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:859:8: branch_false: following ‘false’ branch (when ‘rc == 1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:866:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:867:8: branch_false: following ‘false’ branch (when ‘ret == 0’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:872:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:875:11: throw: if ‘sw_des3_cbc’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:875:11: danger: ‘clear’ leaks here; was allocated at [(3)](sarif:/runs/0/results/142/codeFlows/0/threadFlows/0/locations/2)
#  873|       memcpy(des3_key + MD5_HASH_SIZE, pin_md5_hash, DES_KEY_SIZE);
#  874|   
#  875|->     ret = sw_des3_cbc_decrypt(cipher, cipher_len, clear,
#  876|                                 &clear_len, (unsigned char *) "12345678",
#  877|                                 des3_key);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1120]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:929:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(conf_dir)’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:919:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:920:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:926:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:928:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:929:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:929:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:929:9: danger: ‘opendir(conf_dir)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/143/codeFlows/0/threadFlows/0/locations/0)
#  927|       snprintf(fname, PATH_MAX, "%s/opencryptoki.conf", conf_dir);
#  928|       if (stat(fname, &statbuf) != 0) {
#  929|->         TRACE_INFO("Cannot find %s.\n", fname);
#  930|           closedir(dir);
#  931|           return CK_FALSE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1121]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:930:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(conf_dir)’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:919:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:920:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:926:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:928:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:929:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:930:9: danger: ‘opendir(conf_dir)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/144/codeFlows/0/threadFlows/0/locations/0)
#  928|       if (stat(fname, &statbuf) != 0) {
#  929|           TRACE_INFO("Cannot find %s.\n", fname);
#  930|->         closedir(dir);
#  931|           return CK_FALSE;
#  932|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1122]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:933:5: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(conf_dir)’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:919:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:920:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:926:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:928:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:933:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:933:5: danger: ‘opendir(conf_dir)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/145/codeFlows/0/threadFlows/0/locations/0)
#  931|           return CK_FALSE;
#  932|       }
#  933|->     closedir(dir);
#  934|   
#  935|       return CK_TRUE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1123]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:951:5: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(data_store)’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:946:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:947:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:951:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:951:5: danger: ‘opendir(data_store)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/146/codeFlows/0/threadFlows/0/locations/0)
#  949|           return CK_FALSE;
#  950|       }
#  951|->     closedir(dir);
#  952|   
#  953|       return CK_TRUE;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1124]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1198:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(config_file, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1194:12: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1195:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1198:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1198:11: throw: if ‘parse_configlib_file’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1198:11: danger: ‘fopen(config_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/147/codeFlows/0/threadFlows/0/locations/0)
# 1196|           return NULL;
# 1197|   
# 1198|->     ret = parse_configlib_file(file, &config, config_parse_error, track_comments);
# 1199|       fclose(file);
# 1200|       if (ret != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1125]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1198:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(config_file, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1194:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1195:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1198:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1198:11: throw: if ‘parse_configlib_file’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1198:11: danger: ‘fopen(config_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/148/codeFlows/0/threadFlows/0/locations/0)
# 1196|           return NULL;
# 1197|   
# 1198|->     ret = parse_configlib_file(file, &config, config_parse_error, track_comments);
# 1199|       fclose(file);
# 1200|       if (ret != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1126]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1891:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&iname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1866:14: enter_function: entry to ‘count_objects’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1882:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1883:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1883:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1890:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1891:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1893:15: call_function: calling ‘read_object’ from ‘count_objects’
# 1889|       /* Count objects and old objects */
# 1890|       while (fgets(tmp, PATH_MAX, fp)) {
# 1891|->         tmp[strlen(tmp) - 1] = 0;
# 1892|           (*num_objs)++;
# 1893|           ret = read_object(data_store, tmp, &obj, &obj_len, &version, &priv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1127]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1891:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&iname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1866:14: enter_function: entry to ‘count_objects’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1882:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1883:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1883:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1890:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1891:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1893:15: call_function: calling ‘read_object’ from ‘count_objects’
# 1889|       /* Count objects and old objects */
# 1890|       while (fgets(tmp, PATH_MAX, fp)) {
# 1891|->         tmp[strlen(tmp) - 1] = 0;
# 1892|           (*num_objs)++;
# 1893|           ret = read_object(data_store, tmp, &obj, &obj_len, &version, &priv);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1128]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1904:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&iname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1882:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1883:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1883:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1890:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1903:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1903:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1904:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1904:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1904:9: danger: ‘fopen(&iname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/165/codeFlows/0/threadFlows/0/locations/0)
# 1902|       /* OBJ.IDX must be at eof here */
# 1903|       if (!feof(fp)) {
# 1904|->         TRACE_WARN("OBJ.IDX is not at eof after object %s, should not happen.\n",
# 1905|                      tmp);
# 1906|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1129]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1904:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&iname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1882:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1883:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1883:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1890:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1903:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1903:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1904:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1904:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1904:9: danger: ‘fopen(&iname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/166/codeFlows/0/threadFlows/0/locations/0)
# 1902|       /* OBJ.IDX must be at eof here */
# 1903|       if (!feof(fp)) {
# 1904|->         TRACE_WARN("OBJ.IDX is not at eof after object %s, should not happen.\n",
# 1905|                      tmp);
# 1906|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1130]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1939:39: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1932:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1933:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1938:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1939:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1945:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1947:15: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1947:15: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1950:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1950:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1939:39: danger: ‘fopen(&fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/167/codeFlows/0/threadFlows/0/locations/0)
# 1937|   
# 1938|       fd = fileno(fp);
# 1939|->     if ((fstat(fd, &stbuf) != 0) || (!S_ISREG(stbuf.st_mode))) {
# 1940|           ret = CKR_FUNCTION_FAILED;
# 1941|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1131]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1939:39: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1932:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1933:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1938:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1939:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1945:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1947:15: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1947:15: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1950:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1950:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1939:39: danger: ‘fopen(&fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/168/codeFlows/0/threadFlows/0/locations/0)
# 1937|   
# 1938|       fd = fileno(fp);
# 1939|->     if ((fstat(fd, &stbuf) != 0) || (!S_ISREG(stbuf.st_mode))) {
# 1940|           ret = CKR_FUNCTION_FAILED;
# 1941|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1132]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2162:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&dst_file, "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2088:14: enter_function: entry to ‘update_opencryptoki_conf’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2103:14: call_function: calling ‘config_parse’ from ‘update_opencryptoki_conf’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2103:14: return_function: returning to ‘update_opencryptoki_conf’ from ‘config_parse’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2104:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2111:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2112:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2119:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2142:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2149:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2154:12: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2155:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2160:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2162:5: throw: if ‘confignode_dump’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2162:5: danger: ‘fopen(&dst_file, "w")’ leaks here; was opened at [(15)](sarif:/runs/0/results/169/codeFlows/0/threadFlows/0/locations/14)
# 2160|       fchmod(fileno(fp_w), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
# 2161|   
# 2162|->     confignode_dump(fp_w, config, NULL, 2);
# 2163|   
# 2164|       fclose(fp_w);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1133]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2162:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&dst_file, "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2088:14: enter_function: entry to ‘update_opencryptoki_conf’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2103:14: call_function: calling ‘config_parse’ from ‘update_opencryptoki_conf’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2103:14: return_function: returning to ‘update_opencryptoki_conf’ from ‘config_parse’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2104:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2111:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2112:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2119:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2142:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2149:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2154:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2155:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2160:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2162:5: throw: if ‘confignode_dump’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2162:5: danger: ‘fopen(&dst_file, "w")’ leaks here; was allocated at [(15)](sarif:/runs/0/results/170/codeFlows/0/threadFlows/0/locations/14)
# 2160|       fchmod(fileno(fp_w), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
# 2161|   
# 2162|->     confignode_dump(fp_w, config, NULL, 2);
# 2163|   
# 2164|       fclose(fp_w);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1134]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2246:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&src_file, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2237:12: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2238:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2245:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2246:64: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2246:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2246:9: danger: ‘fopen(&src_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/171/codeFlows/0/threadFlows/0/locations/0)
# 2244|       fp_w = fopen(dst_file, "w");
# 2245|       if (!fp_w) {
# 2246|->         warnx("fopen(%s) failed, errno=%s", dst_file, strerror(errno));
# 2247|           ret = CKR_FUNCTION_FAILED;
# 2248|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1135]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2246:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&src_file, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2237:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2238:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2245:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2246:64: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2246:9: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2246:9: danger: ‘fopen(&src_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/172/codeFlows/0/threadFlows/0/locations/0)
# 2244|       fp_w = fopen(dst_file, "w");
# 2245|       if (!fp_w) {
# 2246|->         warnx("fopen(%s) failed, errno=%s", dst_file, strerror(errno));
# 2247|           ret = CKR_FUNCTION_FAILED;
# 2248|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1136]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&dst_file, "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2238:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2245:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: throw: if ‘set_perm’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: danger: ‘fopen(&dst_file, "w")’ leaks here; was opened at [(3)](sarif:/runs/0/results/174/codeFlows/0/threadFlows/0/locations/2)
# 2248|           goto done;
# 2249|       }
# 2250|->     ret = set_perm(fileno(fp_w), token_group);
# 2251|       if (ret != CKR_OK)
# 2252|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1137]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&src_file, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2237:12: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2238:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2245:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: throw: if ‘set_perm’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: danger: ‘fopen(&src_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/173/codeFlows/0/threadFlows/0/locations/0)
# 2248|           goto done;
# 2249|       }
# 2250|->     ret = set_perm(fileno(fp_w), token_group);
# 2251|       if (ret != CKR_OK)
# 2252|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1138]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&dst_file, "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2238:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2245:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: throw: if ‘set_perm’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: danger: ‘fopen(&dst_file, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/176/codeFlows/0/threadFlows/0/locations/2)
# 2248|           goto done;
# 2249|       }
# 2250|->     ret = set_perm(fileno(fp_w), token_group);
# 2251|       if (ret != CKR_OK)
# 2252|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1139]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&src_file, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2237:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2238:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2245:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: throw: if ‘set_perm’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: danger: ‘fopen(&src_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/175/codeFlows/0/threadFlows/0/locations/0)
# 2248|           goto done;
# 2249|       }
# 2250|->     ret = set_perm(fileno(fp_w), token_group);
# 2251|       if (ret != CKR_OK)
# 2252|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1140]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2259:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&dst_file, "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2238:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2245:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2251:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2251:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2254:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2255:24: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2259:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2259:17: danger: ‘fopen(&dst_file, "w")’ leaks here; was opened at [(3)](sarif:/runs/0/results/178/codeFlows/0/threadFlows/0/locations/2)
# 2257|               written = fwrite(buf, 1, bytes, fp_w);
# 2258|               if (written != bytes) {
# 2259|->                 warnx("fwrite(%s) failed, errno=%s", dst_file,
# 2260|                         strerror(errno));
# 2261|                   ret = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1141]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2259:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&src_file, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2237:12: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2238:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2245:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2251:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2251:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2254:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2255:24: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2259:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2259:17: danger: ‘fopen(&src_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/177/codeFlows/0/threadFlows/0/locations/0)
# 2257|               written = fwrite(buf, 1, bytes, fp_w);
# 2258|               if (written != bytes) {
# 2259|->                 warnx("fwrite(%s) failed, errno=%s", dst_file,
# 2260|                         strerror(errno));
# 2261|                   ret = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1142]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2259:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&dst_file, "w")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2238:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2245:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2251:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2251:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2254:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2255:24: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2259:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2259:17: danger: ‘fopen(&dst_file, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/180/codeFlows/0/threadFlows/0/locations/2)
# 2257|               written = fwrite(buf, 1, bytes, fp_w);
# 2258|               if (written != bytes) {
# 2259|->                 warnx("fwrite(%s) failed, errno=%s", dst_file,
# 2260|                         strerror(errno));
# 2261|                   ret = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1143]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2259:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&src_file, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2237:12: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2238:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2244:12: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2245:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2250:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2251:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2251:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2254:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2255:24: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2259:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2259:17: danger: ‘fopen(&src_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/179/codeFlows/0/threadFlows/0/locations/0)
# 2257|               written = fwrite(buf, 1, bytes, fp_w);
# 2258|               if (written != bytes) {
# 2259|->                 warnx("fwrite(%s) failed, errno=%s", dst_file,
# 2260|                         strerror(errno));
# 2261|                   ret = CKR_FUNCTION_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1144]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2291:11: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(src)’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2319:14: enter_function: entry to ‘folder_copy’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2327:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2328:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2334:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2334:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2341:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2341:11: call_function: calling ‘change_owner’ from ‘folder_copy’
# 2289|   
# 2290|       /* Set group owner */
# 2291|->     grp = getgrnam(token_group);
# 2292|       if (grp) {
# 2293|           if (chown(dir, -1, grp->gr_gid)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1145]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2293:13: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(src)’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2327:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2328:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2334:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2334:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2341:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2342:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2342:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2349:21: throw: if ‘readdir’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2293:13: danger: ‘opendir(src)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/182/codeFlows/0/threadFlows/0/locations/0)
# 2291|       grp = getgrnam(token_group);
# 2292|       if (grp) {
# 2293|->         if (chown(dir, -1, grp->gr_gid)) {
# 2294|               ret = CKR_FUNCTION_FAILED;
# 2295|               goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1146]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2335:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(src)’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2327:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2328:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2334:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2334:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2335:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2335:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2335:9: danger: ‘opendir(src)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/183/codeFlows/0/threadFlows/0/locations/0)
# 2333|       /* Create dst */
# 2334|       if (mkdir(dst, 0) != 0) {
# 2335|->         TRACE_ERROR("Cannot create %s\n", dst);
# 2336|           ret = CKR_FUNCTION_FAILED;
# 2337|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1147]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2343:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(src)’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2327:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2328:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2334:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2334:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2341:11: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2342:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2343:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2343:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2343:9: danger: ‘opendir(src)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/184/codeFlows/0/threadFlows/0/locations/0)
# 2341|       ret = change_owner(dst, token_group);
# 2342|       if (ret != CKR_OK) {
# 2343|->         TRACE_ERROR("Cannot change owner and permissions for %s\n", dst);
# 2344|           ret = CKR_FUNCTION_FAILED;
# 2345|           goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1148]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2389:5: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(src)’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2327:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2328:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2334:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2389:5: danger: ‘opendir(src)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/185/codeFlows/0/threadFlows/0/locations/0)
# 2387|   done:
# 2388|   
# 2389|->     closedir(dir);
# 2390|   
# 2391|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1149]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2413:27: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(folder)’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2406:11: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2407:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2412:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2413:27: throw: if ‘readdir’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2413:27: danger: ‘opendir(folder)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/186/codeFlows/0/threadFlows/0/locations/0)
# 2411|   
# 2412|       path_len = strlen(folder);
# 2413|->     while (!ret && (ent = readdir(dir))) {
# 2414|           if (!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, ".."))
# 2415|               continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1150]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2522:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/run/opencryptoki/pkcsslotd.pid", "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2514:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2515:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2521:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2521:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2522:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2522:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2522:9: danger: ‘fopen("/run/opencryptoki/pkcsslotd.pid", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/187/codeFlows/0/threadFlows/0/locations/0)
# 2520|   
# 2521|       if (fgets(buf, sizeof(buf), fp) == NULL) {
# 2522|->         TRACE_WARN("Cannot read pid file '%s': %s\n", PID_FILE_PATH,
# 2523|                      strerror(errno));
# 2524|           fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1151]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2522:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/run/opencryptoki/pkcsslotd.pid", "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2514:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2515:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2521:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2521:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2522:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2522:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2522:9: danger: ‘fopen("/run/opencryptoki/pkcsslotd.pid", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/188/codeFlows/0/threadFlows/0/locations/0)
# 2520|   
# 2521|       if (fgets(buf, sizeof(buf), fp) == NULL) {
# 2522|->         TRACE_WARN("Cannot read pid file '%s': %s\n", PID_FILE_PATH,
# 2523|                      strerror(errno));
# 2524|           fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1152]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2544:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2515:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2521:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2521:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2527:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2530:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2536:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2537:10: acquire_resource: opened here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2538:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2543:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2543:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2544:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2544:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2544:9: danger: ‘fopen(&fname, "r")’ leaks here; was opened at [(7)](sarif:/runs/0/results/189/codeFlows/0/threadFlows/0/locations/6)
# 2542|   
# 2543|       if (fgets(buf, sizeof(buf), fp) == NULL) {
# 2544|->         TRACE_INFO("Failed to read '%s'\n", fname);
# 2545|           fclose(fp);
# 2546|           return CK_FALSE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1153]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2544:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fname, "r")’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2515:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2521:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2521:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2527:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2530:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2536:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2537:10: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2538:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2543:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2543:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2544:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2544:9: throw: if ‘pkcs_trace’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2544:9: danger: ‘fopen(&fname, "r")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/190/codeFlows/0/threadFlows/0/locations/6)
# 2542|   
# 2543|       if (fgets(buf, sizeof(buf), fp) == NULL) {
# 2544|->         TRACE_INFO("Failed to read '%s'\n", fname);
# 2545|           fclose(fp);
# 2546|           return CK_FALSE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1154]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2657:17: warning[-Wanalyzer-malloc-leak]: leak of ‘conf_dir’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2652:12: branch_true: following ‘true’ branch (when ‘opt != -1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2653:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2662:24: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2663:16: branch_false: following ‘false’ branch (when ‘conf_dir’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2663:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2652:12: branch_true: following ‘true’ branch (when ‘opt != -1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2653:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2656:16: branch_true: following ‘true’ branch (when ‘data_store’ is NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2657:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2657:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2657:17: danger: ‘conf_dir’ leaks here; was allocated at [(5)](sarif:/runs/0/results/191/codeFlows/0/threadFlows/0/locations/4)
# 2655|               data_store = strdup(optarg);
# 2656|               if (data_store == NULL) {
# 2657|->                 warnx("strdup failed.");
# 2658|                   exit(1);
# 2659|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1155]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2664:17: warning[-Wanalyzer-malloc-leak]: leak of ‘conf_dir’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2652:12: branch_true: following ‘true’ branch (when ‘opt != -1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2653:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2662:24: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2663:16: branch_false: following ‘false’ branch (when ‘conf_dir’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2663:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2652:12: branch_true: following ‘true’ branch (when ‘opt != -1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2653:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2663:16: branch_true: following ‘true’ branch (when ‘conf_dir’ is NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2664:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2664:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2664:17: danger: ‘conf_dir’ leaks here; was allocated at [(5)](sarif:/runs/0/results/192/codeFlows/0/threadFlows/0/locations/4)
# 2662|               conf_dir = strdup(optarg);
# 2663|               if (conf_dir == NULL) {
# 2664|->                 warnx("strdup failed.");
# 2665|                   exit(1);
# 2666|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1156]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2681:17: warning[-Wanalyzer-malloc-leak]: leak of ‘conf_dir’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2652:12: branch_true: following ‘true’ branch (when ‘opt != -1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2653:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2662:24: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2663:16: branch_false: following ‘false’ branch (when ‘conf_dir’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2663:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2652:12: branch_true: following ‘true’ branch (when ‘opt != -1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2653:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2680:16: branch_true: following ‘true’ branch (when ‘verbose’ is NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2681:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2681:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2681:17: danger: ‘conf_dir’ leaks here; was allocated at [(5)](sarif:/runs/0/results/193/codeFlows/0/threadFlows/0/locations/4)
# 2679|               verbose = strdup(optarg);
# 2680|               if (verbose == NULL) {
# 2681|->                 warnx("strdup failed.");
# 2682|                   exit(1);
# 2683|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1157]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2686:17: warning[-Wanalyzer-malloc-leak]: leak of ‘verbose’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2622:5: enter_function: entry to ‘main’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2652:12: branch_true: following ‘true’ branch (when ‘opt != -1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2653:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2679:23: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2680:16: branch_false: following ‘false’ branch (when ‘verbose’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2684:22: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2684:22: call_function: calling ‘verbose_str2level’ from ‘main’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2684:22: return_function: returning to ‘main’ from ‘verbose_str2level’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2685:16: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2686:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2686:17: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2686:17: danger: ‘verbose’ leaks here; was allocated at [(6)](sarif:/runs/0/results/194/codeFlows/0/threadFlows/0/locations/5)
# 2684|               vlevel = verbose_str2level(verbose);
# 2685|               if (vlevel < 0) {
# 2686|->                 warnx("Invalid verbose level '%s' specified.", verbose);
# 2687|                   usage(argv[0]);
# 2688|                   exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1158]
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2695:13: warning[-Wanalyzer-malloc-leak]: leak of ‘conf_dir’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2652:12: branch_true: following ‘true’ branch (when ‘opt != -1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2653:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2662:24: acquire_memory: allocated here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2663:16: branch_false: following ‘false’ branch (when ‘conf_dir’ is non-NULL)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2663:16: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2652:12: branch_true: following ‘true’ branch (when ‘opt != -1’)...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2653:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2695:13: throw: if ‘warnx’ throws an exception...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:2695:13: danger: ‘conf_dir’ leaks here; was allocated at [(5)](sarif:/runs/0/results/195/codeFlows/0/threadFlows/0/locations/4)
# 2693|               exit(0);
# 2694|           default:
# 2695|->             warnx("Parameters are required.");
# 2696|               usage(argv[0]);
# 2697|               exit(1);

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-195.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameopencryptoki-3.26.0-1.fc44
store-results-to/tmp/tmpla9qeugt/opencryptoki-3.26.0-1.fc44.tar.xz
time-created2026-01-08 19:57:56
time-finished2026-01-08 20:02:55
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpla9qeugt/opencryptoki-3.26.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpla9qeugt/opencryptoki-3.26.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9