libcomps-0.1.23-2.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libcomps-0.1.23/libcomps/src/comps_bradix.c:42:17: warning[-Wanalyzer-malloc-leak]: leak of ‘brtd’
libcomps-0.1.23/libcomps/src/comps_bradix.c:66:20: enter_function: entry to ‘comps_brtree_data_create_n’
libcomps-0.1.23/libcomps/src/comps_bradix.c:69:12: call_function: calling ‘__comps_brtree_data_create’ from ‘comps_brtree_data_create_n’
#   40|       if ((brtd = malloc(sizeof(COMPS_BRTreeData))) == NULL)
#   41|           return NULL;
#   42|->     brtd->key = brt->key_clone(key, keylen);
#   43|       if (!brtd->key) {
#   44|           free(brtd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libcomps-0.1.23/libcomps/src/comps_bradix.c:42:17: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_brtree_create(*brt.data_constructor, *brt.data_cloner, *brt.data_destructor, *brt.key_clone, *brt.key_destroy, *brt.key_cmp, *brt.key_len, *brt.subkey, *brt.key_concat)’
libcomps-0.1.23/libcomps/src/comps_bradix.c:144:16: enter_function: entry to ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:152:8: branch_false: following ‘false’ branch (when ‘brt’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:154:16: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: call_function: calling ‘comps_brtree_create’ from ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: return_function: returning to ‘comps_brtree_clone’ from ‘comps_brtree_create’
libcomps-0.1.23/libcomps/src/comps_bradix.c:167:37: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:169:59: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:168:19: call_function: calling ‘comps_brtree_data_create’ from ‘comps_brtree_clone’
#   40|       if ((brtd = malloc(sizeof(COMPS_BRTreeData))) == NULL)
#   41|           return NULL;
#   42|->     brtd->key = brt->key_clone(key, keylen);
#   43|       if (!brtd->key) {
#   44|           free(brtd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
libcomps-0.1.23/libcomps/src/comps_bradix.c:53:22: warning[-Wanalyzer-malloc-leak]: leak of ‘brtd’
libcomps-0.1.23/libcomps/src/comps_bradix.c:66:20: enter_function: entry to ‘comps_brtree_data_create_n’
libcomps-0.1.23/libcomps/src/comps_bradix.c:69:12: call_function: calling ‘__comps_brtree_data_create’ from ‘comps_brtree_data_create_n’
#   51|       }
#   52|       brtd->data_destructor = brt->data_destructor;
#   53|->     brtd->subnodes = comps_hslist_create();
#   54|       brtd->key_destroy = brt->key_destroy;
#   55|       comps_hslist_init(brtd->subnodes, NULL, NULL, &comps_brtree_data_destroy_v);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
libcomps-0.1.23/libcomps/src/comps_bradix.c:53:22: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_brtree_create(*brt.data_constructor, *brt.data_cloner, *brt.data_destructor, *brt.key_clone, *brt.key_destroy, *brt.key_cmp, *brt.key_len, *brt.subkey, *brt.key_concat)’
libcomps-0.1.23/libcomps/src/comps_bradix.c:144:16: enter_function: entry to ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:152:8: branch_false: following ‘false’ branch (when ‘brt’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:154:16: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: call_function: calling ‘comps_brtree_create’ from ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: return_function: returning to ‘comps_brtree_clone’ from ‘comps_brtree_create’
libcomps-0.1.23/libcomps/src/comps_bradix.c:167:37: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:169:59: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:168:19: call_function: calling ‘comps_brtree_data_create’ from ‘comps_brtree_clone’
#   51|       }
#   52|       brtd->data_destructor = brt->data_destructor;
#   53|->     brtd->subnodes = comps_hslist_create();
#   54|       brtd->key_destroy = brt->key_destroy;
#   55|       comps_hslist_init(brtd->subnodes, NULL, NULL, &comps_brtree_data_destroy_v);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
libcomps-0.1.23/libcomps/src/comps_bradix.c:55:5: warning[-Wanalyzer-malloc-leak]: leak of ‘brtd’
libcomps-0.1.23/libcomps/src/comps_bradix.c:66:20: enter_function: entry to ‘comps_brtree_data_create_n’
libcomps-0.1.23/libcomps/src/comps_bradix.c:69:12: call_function: calling ‘__comps_brtree_data_create’ from ‘comps_brtree_data_create_n’
#   53|       brtd->subnodes = comps_hslist_create();
#   54|       brtd->key_destroy = brt->key_destroy;
#   55|->     comps_hslist_init(brtd->subnodes, NULL, NULL, &comps_brtree_data_destroy_v);
#   56|       return brtd;
#   57|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
libcomps-0.1.23/libcomps/src/comps_bradix.c:55:5: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_brtree_create(*brt.data_constructor, *brt.data_cloner, *brt.data_destructor, *brt.key_clone, *brt.key_destroy, *brt.key_cmp, *brt.key_len, *brt.subkey, *brt.key_concat)’
libcomps-0.1.23/libcomps/src/comps_bradix.c:144:16: enter_function: entry to ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:152:8: branch_false: following ‘false’ branch (when ‘brt’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:154:16: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: call_function: calling ‘comps_brtree_create’ from ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: return_function: returning to ‘comps_brtree_clone’ from ‘comps_brtree_create’
libcomps-0.1.23/libcomps/src/comps_bradix.c:167:37: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:169:59: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:168:19: call_function: calling ‘comps_brtree_data_create’ from ‘comps_brtree_clone’
#   53|       brtd->subnodes = comps_hslist_create();
#   54|       brtd->key_destroy = brt->key_destroy;
#   55|->     comps_hslist_init(brtd->subnodes, NULL, NULL, &comps_brtree_data_destroy_v);
#   56|       return brtd;
#   57|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
libcomps-0.1.23/libcomps/src/comps_bradix.c:62:12: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_brtree_create(*brt.data_constructor, *brt.data_cloner, *brt.data_destructor, *brt.key_clone, *brt.key_destroy, *brt.key_cmp, *brt.key_len, *brt.subkey, *brt.key_concat)’
libcomps-0.1.23/libcomps/src/comps_bradix.c:144:16: enter_function: entry to ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:152:8: branch_false: following ‘false’ branch (when ‘brt’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:154:16: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: call_function: calling ‘comps_brtree_create’ from ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: return_function: returning to ‘comps_brtree_clone’ from ‘comps_brtree_create’
libcomps-0.1.23/libcomps/src/comps_bradix.c:167:37: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:169:59: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:168:19: call_function: calling ‘comps_brtree_data_create’ from ‘comps_brtree_clone’
#   60|                                             void * data) {
#   61|       COMPS_BRTreeData * brtd;
#   62|->     brtd = __comps_brtree_data_create(brt, key, brt->key_len(key), data);
#   63|       return brtd;
#   64|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
libcomps-0.1.23/libcomps/src/comps_bradix.c:91:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/src/comps_bradix.c:89:16: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:89:8: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:91:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:91:21: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#   89|       if ((ret = malloc(sizeof(COMPS_BRTree))) == NULL)
#   90|           return NULL;
#   91|->     ret->subnodes = comps_hslist_create();
#   92|       comps_hslist_init(ret->subnodes, NULL, NULL, &comps_brtree_data_destroy_v);
#   93|       if (ret->subnodes == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
libcomps-0.1.23/libcomps/src/comps_bradix.c:92:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/src/comps_bradix.c:89:16: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:89:8: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:91:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:92:5: danger: ‘ret’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#   90|           return NULL;
#   91|       ret->subnodes = comps_hslist_create();
#   92|->     comps_hslist_init(ret->subnodes, NULL, NULL, &comps_brtree_data_destroy_v);
#   93|       if (ret->subnodes == NULL) {
#   94|           free(ret);

Error: GCC_ANALYZER_WARNING (CWE-416): [#def10]
libcomps-0.1.23/libcomps/src/comps_bradix.c:182:39: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘*to_clone.first’
libcomps-0.1.23/libcomps/src/comps_bradix.c:152:8: branch_false: following ‘false’ branch (when ‘brt’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:154:16: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:167:37: branch_false: following ‘false’ branch (when ‘it’ is NULL)...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:180:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:182:39: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:187:35: branch_false: following ‘false’ branch (when ‘it’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:201:29: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:202:9: release_memory: freed here
libcomps-0.1.23/libcomps/src/comps_bradix.c:180:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:182:39: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:182:39: danger: use after ‘free’ of ‘*to_clone.first’; freed at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
#  180|       while (to_clone->first) {
#  181|           it2 = to_clone->first;
#  182|->         tmplist = ((COMPS_BRTreeData*)it2->data)->subnodes;
#  183|           comps_hslist_remove(to_clone, to_clone->first);
#  184|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
libcomps-0.1.23/libcomps/src/comps_bradix.c:183:9: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_brtree_create(*brt.data_constructor, *brt.data_cloner, *brt.data_destructor, *brt.key_clone, *brt.key_destroy, *brt.key_cmp, *brt.key_len, *brt.subkey, *brt.key_concat)’
libcomps-0.1.23/libcomps/src/comps_bradix.c:144:16: enter_function: entry to ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:152:8: branch_false: following ‘false’ branch (when ‘brt’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:154:16: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: call_function: calling ‘comps_brtree_create’ from ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: return_function: returning to ‘comps_brtree_clone’ from ‘comps_brtree_create’
libcomps-0.1.23/libcomps/src/comps_bradix.c:167:37: branch_false: following ‘false’ branch (when ‘it’ is NULL)...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:180:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:182:39: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:183:9: danger: ‘comps_brtree_create(*brt.data_constructor, *brt.data_cloner, *brt.data_destructor, *brt.key_clone, *brt.key_destroy, *brt.key_cmp, *brt.key_len, *brt.subkey, *brt.key_concat)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/5)
#  181|           it2 = to_clone->first;
#  182|           tmplist = ((COMPS_BRTreeData*)it2->data)->subnodes;
#  183|->         comps_hslist_remove(to_clone, to_clone->first);
#  184|   
#  185|           new_subnodes = comps_hslist_create();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
libcomps-0.1.23/libcomps/src/comps_bradix.c:185:24: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_brtree_create(*brt.data_constructor, *brt.data_cloner, *brt.data_destructor, *brt.key_clone, *brt.key_destroy, *brt.key_cmp, *brt.key_len, *brt.subkey, *brt.key_concat)’
libcomps-0.1.23/libcomps/src/comps_bradix.c:144:16: enter_function: entry to ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:152:8: branch_false: following ‘false’ branch (when ‘brt’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:154:16: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: call_function: calling ‘comps_brtree_create’ from ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: return_function: returning to ‘comps_brtree_clone’ from ‘comps_brtree_create’
libcomps-0.1.23/libcomps/src/comps_bradix.c:167:37: branch_false: following ‘false’ branch (when ‘it’ is NULL)...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:180:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:182:39: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:185:24: danger: ‘comps_brtree_create(*brt.data_constructor, *brt.data_cloner, *brt.data_destructor, *brt.key_clone, *brt.key_destroy, *brt.key_cmp, *brt.key_len, *brt.subkey, *brt.key_concat)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/5)
#  183|           comps_hslist_remove(to_clone, to_clone->first);
#  184|   
#  185|->         new_subnodes = comps_hslist_create();
#  186|           comps_hslist_init(new_subnodes, NULL, NULL, &comps_brtree_data_destroy_v);
#  187|           for (it = tmplist->first; it != NULL; it = it->next) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
libcomps-0.1.23/libcomps/src/comps_bradix.c:186:9: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_brtree_create(*brt.data_constructor, *brt.data_cloner, *brt.data_destructor, *brt.key_clone, *brt.key_destroy, *brt.key_cmp, *brt.key_len, *brt.subkey, *brt.key_concat)’
libcomps-0.1.23/libcomps/src/comps_bradix.c:144:16: enter_function: entry to ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:152:8: branch_false: following ‘false’ branch (when ‘brt’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:154:16: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: call_function: calling ‘comps_brtree_create’ from ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: return_function: returning to ‘comps_brtree_clone’ from ‘comps_brtree_create’
libcomps-0.1.23/libcomps/src/comps_bradix.c:167:37: branch_false: following ‘false’ branch (when ‘it’ is NULL)...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:180:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:182:39: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:186:9: danger: ‘comps_brtree_create(*brt.data_constructor, *brt.data_cloner, *brt.data_destructor, *brt.key_clone, *brt.key_destroy, *brt.key_cmp, *brt.key_len, *brt.subkey, *brt.key_concat)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/5)
#  184|   
#  185|           new_subnodes = comps_hslist_create();
#  186|->         comps_hslist_init(new_subnodes, NULL, NULL, &comps_brtree_data_destroy_v);
#  187|           for (it = tmplist->first; it != NULL; it = it->next) {
#  188|               brtdata = comps_brtree_data_create(brt,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
libcomps-0.1.23/libcomps/src/comps_bradix.c:204:5: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_brtree_create(*brt.data_constructor, *brt.data_cloner, *brt.data_destructor, *brt.key_clone, *brt.key_destroy, *brt.key_cmp, *brt.key_len, *brt.subkey, *brt.key_concat)’
libcomps-0.1.23/libcomps/src/comps_bradix.c:144:16: enter_function: entry to ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:152:8: branch_false: following ‘false’ branch (when ‘brt’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:154:16: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: call_function: calling ‘comps_brtree_create’ from ‘comps_brtree_clone’
libcomps-0.1.23/libcomps/src/comps_bradix.c:156:11: return_function: returning to ‘comps_brtree_clone’ from ‘comps_brtree_create’
libcomps-0.1.23/libcomps/src/comps_bradix.c:167:37: branch_false: following ‘false’ branch (when ‘it’ is NULL)...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:180:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:204:5: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:204:5: danger: ‘comps_brtree_create(*brt.data_constructor, *brt.data_cloner, *brt.data_destructor, *brt.key_clone, *brt.key_destroy, *brt.key_cmp, *brt.key_len, *brt.subkey, *brt.key_concat)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/5)
#  202|           free(it2);
#  203|       }
#  204|->     comps_hslist_destroy(&to_clone);
#  205|       return ret;
#  206|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
libcomps-0.1.23/libcomps/src/comps_bradix.c:268:13: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_brtree_data_create(brt, *brt.subkey(key,  offset, *brt.key_len(key)), ndata)’
libcomps-0.1.23/libcomps/src/comps_bradix.c:232:6: enter_function: entry to ‘comps_brtree_set’
libcomps-0.1.23/libcomps/src/comps_bradix.c:246:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:248:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:255:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:258:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:265:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:266:22: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:267:20: call_function: calling ‘comps_brtree_data_create’ from ‘comps_brtree_set’
libcomps-0.1.23/libcomps/src/comps_bradix.c:267:20: return_function: returning to ‘comps_brtree_set’ from ‘comps_brtree_data_create’
libcomps-0.1.23/libcomps/src/comps_bradix.c:268:13: danger: ‘comps_brtree_data_create(brt, *brt.subkey(key,  offset, *brt.key_len(key)), ndata)’ leaks here; was allocated at [(12)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/11)
#  266|               newkey = brt->subkey(key, offset, brt->key_len(key));
#  267|               brtd = comps_brtree_data_create(brt, newkey, ndata);
#  268|->             brt->key_destroy(newkey);
#  269|               comps_hslist_append(subnodes, brtd, 0);
#  270|               return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
libcomps-0.1.23/libcomps/src/comps_bradix.c:269:13: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_brtree_data_create(brt, *brt.subkey(key,  offset, *brt.key_len(key)), ndata)’
libcomps-0.1.23/libcomps/src/comps_bradix.c:232:6: enter_function: entry to ‘comps_brtree_set’
libcomps-0.1.23/libcomps/src/comps_bradix.c:246:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:248:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:255:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:258:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:265:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:266:22: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:267:20: call_function: calling ‘comps_brtree_data_create’ from ‘comps_brtree_set’
libcomps-0.1.23/libcomps/src/comps_bradix.c:267:20: return_function: returning to ‘comps_brtree_set’ from ‘comps_brtree_data_create’
libcomps-0.1.23/libcomps/src/comps_bradix.c:269:13: danger: ‘comps_brtree_data_create(brt, *brt.subkey(key,  offset, *brt.key_len(key)), ndata)’ leaks here; was allocated at [(12)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/11)
#  267|               brtd = comps_brtree_data_create(brt, newkey, ndata);
#  268|               brt->key_destroy(newkey);
#  269|->             comps_hslist_append(subnodes, brtd, 0);
#  270|               return;
#  271|           } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
libcomps-0.1.23/libcomps/src/comps_bradix.c:283:37: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_brtree_data_create(brt,  key,  ndata)’
libcomps-0.1.23/libcomps/src/comps_bradix.c:232:6: enter_function: entry to ‘comps_brtree_set’
libcomps-0.1.23/libcomps/src/comps_bradix.c:246:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:248:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:255:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:258:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:265:12: branch_false: following ‘false’ branch (when ‘found != 0’)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:272:44: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:274:16: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:278:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:278:23: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:279:17: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:281:24: call_function: calling ‘comps_brtree_data_create’ from ‘comps_brtree_set’
libcomps-0.1.23/libcomps/src/comps_bradix.c:281:24: return_function: returning to ‘comps_brtree_set’ from ‘comps_brtree_data_create’
libcomps-0.1.23/libcomps/src/comps_bradix.c:283:37: danger: ‘comps_brtree_data_create(brt,  key,  ndata)’ leaks here; was allocated at [(16)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/15)
#  281|                   brtd = comps_brtree_data_create(brt, key, ndata);
#  282|                   comps_hslist_append(subnodes, brtd, 0);
#  283|->                 ((COMPS_BRTreeData*)subnodes->last->data)->subnodes->last = it;
#  284|                   ((COMPS_BRTreeData*)subnodes->last->data)->subnodes->first = it;
#  285|                   len = brt->key_len(key) - offset;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
libcomps-0.1.23/libcomps/src/comps_bradix.c:301:26: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_brtree_data_create_n(brt, *brtdata.key, *brt.key_cmp(*(COMPS_BRTreeData *)it.23_14->data.key,  key, 1,  offset + 1, *brt.key_len(key), &ended), 0)’
libcomps-0.1.23/libcomps/src/comps_bradix.c:232:6: enter_function: entry to ‘comps_brtree_set’
libcomps-0.1.23/libcomps/src/comps_bradix.c:246:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:248:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:255:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:258:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:265:12: branch_false: following ‘false’ branch (when ‘found != 0’)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:272:44: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:274:16: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:278:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:278:23: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:293:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:298:24: call_function: calling ‘comps_brtree_data_create_n’ from ‘comps_brtree_set’
libcomps-0.1.23/libcomps/src/comps_bradix.c:298:24: return_function: returning to ‘comps_brtree_set’ from ‘comps_brtree_data_create_n’
libcomps-0.1.23/libcomps/src/comps_bradix.c:301:26: danger: ‘comps_brtree_data_create_n(brt, *brtdata.key, *brt.key_cmp(*(COMPS_BRTreeData *)it.23_14->data.key,  key, 1,  offset + 1, *brt.key_len(key), &ended), 0)’ leaks here; was allocated at [(16)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/15)
#  299|                   comps_hslist_append(subnodes, brtd, 0);
#  300|   
#  301|->                 newkey = brt->subkey(key, offset+x, brt->key_len(key));
#  302|                   brtd = comps_brtree_data_create(brt, newkey, ndata);
#  303|                   brt->key_destroy(newkey);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
libcomps-0.1.23/libcomps/src/comps_bradix.c:477:9: warning[-Wanalyzer-malloc-leak]: leak of ‘relation’
libcomps-0.1.23/libcomps/src/comps_bradix.c:403:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:406:5: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:411:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:413:14: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:413:36: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:414:17: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:420:12: branch_false: following ‘false’ branch (when ‘found != 0’)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:424:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:426:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:465:17: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:465:17: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:465:30: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:470:25: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:470:12: branch_false: following ‘false’ branch (when ‘relation’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:474:40: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:477:9: danger: ‘relation’ leaks here; was allocated at [(13)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/12)
#  475|           relation->parent_nodes = subnodes;
#  476|           relation->child_it = it;
#  477|->         comps_hslist_append(path, (void*)relation, 0);
#  478|       }
#  479|       comps_hslist_destroy(&path);

Error: CPPCHECK_WARNING (CWE-476): [#def20]
libcomps-0.1.23/libcomps/src/comps_bradix.c:517: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  515|   
#  516|       pair = malloc(sizeof(struct Pair));
#  517|->     pair->subnodes = brt->subnodes;
#  518|       pair->key = NULL;
#  519|       pair->added = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
libcomps-0.1.23/libcomps/src/comps_bradix.c:517:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:516:12: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_bradix.c:517:5: danger: ‘pair’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  515|   
#  516|       pair = malloc(sizeof(struct Pair));
#  517|->     pair->subnodes = brt->subnodes;
#  518|       pair->key = NULL;
#  519|       pair->added = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def22]
libcomps-0.1.23/libcomps/src/comps_bradix.c:518: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  516|       pair = malloc(sizeof(struct Pair));
#  517|       pair->subnodes = brt->subnodes;
#  518|->     pair->key = NULL;
#  519|       pair->added = 0;
#  520|   

Error: CPPCHECK_WARNING (CWE-476): [#def23]
libcomps-0.1.23/libcomps/src/comps_bradix.c:519: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  517|       pair->subnodes = brt->subnodes;
#  518|       pair->key = NULL;
#  519|->     pair->added = 0;
#  520|   
#  521|       tmplist = comps_hslist_create();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
libcomps-0.1.23/libcomps/src/comps_bradix.c:521:15: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:516:12: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:521:15: danger: ‘pair’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  519|       pair->added = 0;
#  520|   
#  521|->     tmplist = comps_hslist_create();
#  522|       comps_hslist_init(tmplist, NULL, NULL, &free);
#  523|       ret = comps_hslist_create();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libcomps-0.1.23/libcomps/src/comps_bradix.c:522:5: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:516:12: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:522:5: danger: ‘pair’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  520|   
#  521|       tmplist = comps_hslist_create();
#  522|->     comps_hslist_init(tmplist, NULL, NULL, &free);
#  523|       ret = comps_hslist_create();
#  524|       if (pairorkey == 1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
libcomps-0.1.23/libcomps/src/comps_bradix.c:523:11: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:516:12: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:523:11: danger: ‘pair’ leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  521|       tmplist = comps_hslist_create();
#  522|       comps_hslist_init(tmplist, NULL, NULL, &free);
#  523|->     ret = comps_hslist_create();
#  524|       if (pairorkey == 1)
#  525|           comps_hslist_init(ret, NULL, NULL, &free);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
libcomps-0.1.23/libcomps/src/comps_bradix.c:525:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:516:12: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:524:8: branch_true: following ‘true’ branch (when ‘pairorkey == 1’)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:525:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:525:9: danger: ‘pair’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  523|       ret = comps_hslist_create();
#  524|       if (pairorkey == 1)
#  525|->         comps_hslist_init(ret, NULL, NULL, &free);
#  526|       else
#  527|           comps_hslist_init(ret, NULL, NULL, &comps_brtree_pair_destroy_v);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
libcomps-0.1.23/libcomps/src/comps_bradix.c:527:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:516:12: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:524:8: branch_false: following ‘false’ branch (when ‘pairorkey != 1’)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:527:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:527:9: danger: ‘pair’ leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  525|           comps_hslist_init(ret, NULL, NULL, &free);
#  526|       else
#  527|->         comps_hslist_init(ret, NULL, NULL, &comps_brtree_pair_destroy_v);
#  528|   
#  529|       comps_hslist_append(tmplist, pair, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
libcomps-0.1.23/libcomps/src/comps_bradix.c:529:5: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:516:12: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:529:5: danger: ‘pair’ leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
#  527|           comps_hslist_init(ret, NULL, NULL, &comps_brtree_pair_destroy_v);
#  528|   
#  529|->     comps_hslist_append(tmplist, pair, 0);
#  530|   
#  531|       while (tmplist->first != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-416): [#def30]
libcomps-0.1.23/libcomps/src/comps_bradix.c:534:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘**tmplist.first.data’
libcomps-0.1.23/libcomps/src/comps_bradix.c:531:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:533:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:581:9: release_memory: freed here
libcomps-0.1.23/libcomps/src/comps_bradix.c:531:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:533:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:534:9: danger: use after ‘free’ of ‘*tmplist.73_35->first.data’; freed at [(4)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/3)
#  532|           it = tmplist->first;
#  533|           comps_hslist_remove(tmplist, tmplist->first);
#  534|->         tmp_subnodes = ((struct Pair*)it->data)->subnodes;
#  535|           parent_pair = (struct Pair*) it->data;
#  536|           free(it);

Error: CPPCHECK_WARNING (CWE-476): [#def31]
libcomps-0.1.23/libcomps/src/comps_bradix.c:540: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  538|           for (it = tmp_subnodes->first; it != NULL; it=it->next) {
#  539|               pair = malloc(sizeof(struct Pair));
#  540|->             pair->subnodes = ((COMPS_BRTreeData*)it->data)->subnodes;
#  541|               pair->added = 0;
#  542|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
libcomps-0.1.23/libcomps/src/comps_bradix.c:540:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:531:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:533:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:538:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_bradix.c:540:13: danger: ‘pair’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/4)
#  538|           for (it = tmp_subnodes->first; it != NULL; it=it->next) {
#  539|               pair = malloc(sizeof(struct Pair));
#  540|->             pair->subnodes = ((COMPS_BRTreeData*)it->data)->subnodes;
#  541|               pair->added = 0;
#  542|   

Error: CPPCHECK_WARNING (CWE-476): [#def33]
libcomps-0.1.23/libcomps/src/comps_bradix.c:541: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  539|               pair = malloc(sizeof(struct Pair));
#  540|               pair->subnodes = ((COMPS_BRTreeData*)it->data)->subnodes;
#  541|->             pair->added = 0;
#  542|   
#  543|               if (parent_pair->key != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
libcomps-0.1.23/libcomps/src/comps_bradix.c:544:29: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:531:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:533:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:538:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:543:16: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:544:29: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:544:29: danger: ‘pair’ leaks here; was allocated at [(5)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/4)
#  542|   
#  543|               if (parent_pair->key != NULL) {
#  544|->                 pair->key = brt->key_concat(parent_pair->key,
#  545|                                               ((COMPS_BRTreeData*)it->data)->key);
#  546|               } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
libcomps-0.1.23/libcomps/src/comps_bradix.c:547:29: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:531:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:533:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:538:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:543:16: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:547:29: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:547:29: danger: ‘pair’ leaks here; was allocated at [(5)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/4)
#  545|                                               ((COMPS_BRTreeData*)it->data)->key);
#  546|               } else {
#  547|->                 pair->key = brt->key_clone(((COMPS_BRTreeData*)it->data)->key,
#  548|                                              brt->key_len(((COMPS_BRTreeData*)
#  549|                                                           it->data)->key));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
libcomps-0.1.23/libcomps/src/comps_bradix.c:553:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:531:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:533:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:538:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:552:20: branch_true: following ‘true’ branch (when ‘pairorkey == 1’)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:553:21: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:553:21: danger: ‘pair’ leaks here; was allocated at [(5)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/4)
#  551|               if (((COMPS_BRTreeData*)it->data)->data != NULL) {
#  552|                   if (pairorkey == 1) {
#  553|->                     comps_hslist_append(ret, pair->key, 0);
#  554|                   } else {
#  555|                       rtpair = malloc(sizeof(COMPS_BRTreePair));

Error: CPPCHECK_WARNING (CWE-476): [#def37]
libcomps-0.1.23/libcomps/src/comps_bradix.c:556: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rtpair
#  554|                   } else {
#  555|                       rtpair = malloc(sizeof(COMPS_BRTreePair));
#  556|->                     rtpair->key = pair->key;
#  557|                       rtpair->data = ((COMPS_BRTreeData*)it->data)->data;
#  558|                       rtpair->key_destroy = brt->key_destroy;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
libcomps-0.1.23/libcomps/src/comps_bradix.c:556:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rtpair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:531:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:533:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:538:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:555:30: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_bradix.c:556:21: danger: ‘rtpair’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/4)
#  554|                   } else {
#  555|                       rtpair = malloc(sizeof(COMPS_BRTreePair));
#  556|->                     rtpair->key = pair->key;
#  557|                       rtpair->data = ((COMPS_BRTreeData*)it->data)->data;
#  558|                       rtpair->key_destroy = brt->key_destroy;

Error: CPPCHECK_WARNING (CWE-476): [#def39]
libcomps-0.1.23/libcomps/src/comps_bradix.c:557: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rtpair
#  555|                       rtpair = malloc(sizeof(COMPS_BRTreePair));
#  556|                       rtpair->key = pair->key;
#  557|->                     rtpair->data = ((COMPS_BRTreeData*)it->data)->data;
#  558|                       rtpair->key_destroy = brt->key_destroy;
#  559|                       comps_hslist_append(ret, rtpair, 0);

Error: CPPCHECK_WARNING (CWE-476): [#def40]
libcomps-0.1.23/libcomps/src/comps_bradix.c:558: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rtpair
#  556|                       rtpair->key = pair->key;
#  557|                       rtpair->data = ((COMPS_BRTreeData*)it->data)->data;
#  558|->                     rtpair->key_destroy = brt->key_destroy;
#  559|                       comps_hslist_append(ret, rtpair, 0);
#  560|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
libcomps-0.1.23/libcomps/src/comps_bradix.c:559:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:531:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:533:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:538:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:559:21: danger: ‘pair’ leaks here; was allocated at [(5)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/4)
#  557|                       rtpair->data = ((COMPS_BRTreeData*)it->data)->data;
#  558|                       rtpair->key_destroy = brt->key_destroy;
#  559|->                     comps_hslist_append(ret, rtpair, 0);
#  560|                   }
#  561|                   pair->added = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
libcomps-0.1.23/libcomps/src/comps_bradix.c:559:21: warning[-Wanalyzer-malloc-leak]: leak of ‘rtpair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:531:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:533:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:538:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:555:30: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:559:21: danger: ‘rtpair’ leaks here; was allocated at [(5)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/4)
#  557|                       rtpair->data = ((COMPS_BRTreeData*)it->data)->data;
#  558|                       rtpair->key_destroy = brt->key_destroy;
#  559|->                     comps_hslist_append(ret, rtpair, 0);
#  560|                   }
#  561|                   pair->added = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
libcomps-0.1.23/libcomps/src/comps_bradix.c:563:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:531:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:533:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:538:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:552:20: branch_true: following ‘true’ branch (when ‘pairorkey == 1’)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:553:21: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:563:21: danger: ‘pair’ leaks here; was allocated at [(5)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/4)
#  561|                   pair->added = 1;
#  562|                   if (((COMPS_BRTreeData*)it->data)->subnodes->first != NULL) {
#  563|->                     comps_hslist_append(tmplist, pair, 0);
#  564|                   } else {
#  565|                       free(pair);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
libcomps-0.1.23/libcomps/src/comps_bradix.c:570:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:531:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:533:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:538:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:570:21: danger: ‘pair’ leaks here; was allocated at [(5)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/4)
#  568|               } else {
#  569|                   if (((COMPS_BRTreeData*)it->data)->subnodes->first) {
#  570|->                     comps_hslist_append(tmplist, pair, 0);
#  571|                   } else {
#  572|                       brt->key_destroy(pair->key);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
libcomps-0.1.23/libcomps/src/comps_bradix.c:572:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_bradix.c:531:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:533:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:538:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:539:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_bradix.c:569:20: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_bradix.c:572:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_bradix.c:572:21: danger: ‘pair’ leaks here; was allocated at [(5)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/4)
#  570|                       comps_hslist_append(tmplist, pair, 0);
#  571|                   } else {
#  572|->                     brt->key_destroy(pair->key);
#  573|                       free(pair);
#  574|                   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def46]
libcomps-0.1.23/libcomps/src/comps_doc.c:903:13: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘str’ where non-null expected
libcomps-0.1.23/libcomps/src/comps_doc.c:894:10: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_doc.c:896:18: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_doc.c:897:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_doc.c:898:17: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_doc.c:898:16: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_doc.c:900:26: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_doc.c:902:19: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_doc.c:903:13: danger: argument 1 (‘str’) from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected
#argument 1 of ‘__builtin_sprintf’ must be non-null
#  901|               }
#  902|               str = malloc(digits_count(x)*(sizeof(char)+2));
#  903|->             sprintf(str, "%zu.", x);
#  904|               comps_valgenres_prefix(tmpres, str);
#  905|               free(str);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
libcomps-0.1.23/libcomps/src/comps_doc.c:904:13: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
libcomps-0.1.23/libcomps/src/comps_doc.c:894:10: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_doc.c:896:18: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_doc.c:897:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_doc.c:898:17: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_doc.c:898:16: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_doc.c:900:26: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_doc.c:902:19: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_doc.c:904:13: danger: ‘str’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  902|               str = malloc(digits_count(x)*(sizeof(char)+2));
#  903|               sprintf(str, "%zu.", x);
#  904|->             comps_valgenres_prefix(tmpres, str);
#  905|               free(str);
#  906|               comps_valgenres_concat(&valres, tmpres);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def48]
libcomps-0.1.23/libcomps/src/comps_docgroupid.c:97:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected
libcomps-0.1.23/libcomps/src/comps_docgroupid.c:96:17: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_docgroupid.c:97:5: danger: argument 1 (‘ret’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#argument 1 of ‘__builtin_sprintf’ must be non-null
#   95|       char *def = ((COMPS_DocGroupId*)docgroupid)->def?"True":"False";
#   96|       char *ret = malloc(sizeof(char)*(len+strlen(name)+strlen(def)+1));
#   97|->     sprintf(ret, "<COMPS_DocGroupId name='%s' default='%s'>", name, def);
#   98|       free(name);
#   99|       return ret;

Error: CPPCHECK_WARNING (CWE-476): [#def49]
libcomps-0.1.23/libcomps/src/comps_docpackage.c:220: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  218|       char *ret = malloc(sizeof(char)*(total_len));
#  219|       
#  220|->     snprintf(ret, total_len, "<COMPS_DocGroupPackage name='%s' type='%s'"
#  221|                                " requires='%s' basearchonly='%s'>",
#  222|                    name, type, requires, basearchonly);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
libcomps-0.1.23/libcomps/src/comps_elem.c:914:19: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_elem.c:899:8: branch_false: following ‘false’ branch (when ‘elem’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_elem.c:902:5: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:903:8: branch_true: following ‘true’ branch (when ‘type == 0’)...
libcomps-0.1.23/libcomps/src/comps_elem.c:904:50: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:904:27: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_elem.c:904:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_elem.c:908:32: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:914:19: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  912|   
#  913|       /* Add attributes to elem */
#  914|->     elem->attrs = comps_dict_create(NULL, NULL, &free);
#  915|       if (attrs != NULL) {
#  916|           for (; *attrs != NULL; attrs += 2) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
libcomps-0.1.23/libcomps/src/comps_elem.c:914:19: warning[-Wanalyzer-malloc-leak]: leak of ‘elem’
libcomps-0.1.23/libcomps/src/comps_elem.c:899:17: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_elem.c:899:8: branch_false: following ‘false’ branch (when ‘elem’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_elem.c:902:5: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:903:8: branch_false: following ‘false’ branch (when ‘type != 0’)...
libcomps-0.1.23/libcomps/src/comps_elem.c:910:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:914:19: danger: ‘elem’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  912|   
#  913|       /* Add attributes to elem */
#  914|->     elem->attrs = comps_dict_create(NULL, NULL, &free);
#  915|       if (attrs != NULL) {
#  916|           for (; *attrs != NULL; attrs += 2) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
libcomps-0.1.23/libcomps/src/comps_elem.c:919:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_elem.c:899:8: branch_false: following ‘false’ branch (when ‘elem’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_elem.c:902:5: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:903:8: branch_true: following ‘true’ branch (when ‘type == 0’)...
libcomps-0.1.23/libcomps/src/comps_elem.c:904:50: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:904:27: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_elem.c:904:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_elem.c:908:32: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:915:8: branch_true: following ‘true’ branch (when ‘attrs’ is non-NULL)...
 branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:916:16: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_elem.c:917:27: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:918:16: branch_true: following ‘true’ branch (when ‘val’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_elem.c:919:17: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:919:17: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  917|               val = malloc((strlen(*(attrs+1))+1)*sizeof(char));
#  918|               if (val == NULL) {
#  919|->                 comps_dict_destroy(elem->attrs);
#  920|                   free(elem->name);
#  921|                   free(elem);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
libcomps-0.1.23/libcomps/src/comps_elem.c:919:17: warning[-Wanalyzer-malloc-leak]: leak of ‘elem’
libcomps-0.1.23/libcomps/src/comps_elem.c:899:17: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_elem.c:899:8: branch_false: following ‘false’ branch (when ‘elem’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_elem.c:902:5: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:903:8: branch_false: following ‘false’ branch (when ‘type != 0’)...
libcomps-0.1.23/libcomps/src/comps_elem.c:910:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:915:8: branch_true: following ‘true’ branch (when ‘attrs’ is non-NULL)...
 branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:916:16: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_elem.c:917:27: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:918:16: branch_true: following ‘true’ branch (when ‘val’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_elem.c:919:17: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:919:17: danger: ‘elem’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  917|               val = malloc((strlen(*(attrs+1))+1)*sizeof(char));
#  918|               if (val == NULL) {
#  919|->                 comps_dict_destroy(elem->attrs);
#  920|                   free(elem->name);
#  921|                   free(elem);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
libcomps-0.1.23/libcomps/src/comps_elem.c:925:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_elem.c:899:8: branch_false: following ‘false’ branch (when ‘elem’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_elem.c:902:5: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:903:8: branch_true: following ‘true’ branch (when ‘type == 0’)...
libcomps-0.1.23/libcomps/src/comps_elem.c:904:50: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:904:27: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_elem.c:904:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_elem.c:908:32: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:915:8: branch_true: following ‘true’ branch (when ‘attrs’ is non-NULL)...
 branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:916:16: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_elem.c:917:27: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:918:16: branch_false: following ‘false’ branch (when ‘val’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_elem.c:924:53: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:925:13: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  923|               }
#  924|               memcpy(val, *(attrs+1), sizeof(char) * (strlen(*(attrs+1))+1));
#  925|->             comps_dict_set(elem->attrs, (char*)*attrs, val);
#  926|           }
#  927|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
libcomps-0.1.23/libcomps/src/comps_elem.c:925:13: warning[-Wanalyzer-malloc-leak]: leak of ‘elem’
libcomps-0.1.23/libcomps/src/comps_elem.c:899:17: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_elem.c:899:8: branch_false: following ‘false’ branch (when ‘elem’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_elem.c:902:5: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:903:8: branch_false: following ‘false’ branch (when ‘type != 0’)...
libcomps-0.1.23/libcomps/src/comps_elem.c:910:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:915:8: branch_true: following ‘true’ branch (when ‘attrs’ is non-NULL)...
 branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:916:16: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_elem.c:917:27: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:918:16: branch_false: following ‘false’ branch (when ‘val’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_elem.c:924:53: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:925:13: danger: ‘elem’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  923|               }
#  924|               memcpy(val, *(attrs+1), sizeof(char) * (strlen(*(attrs+1))+1));
#  925|->             comps_dict_set(elem->attrs, (char*)*attrs, val);
#  926|           }
#  927|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
libcomps-0.1.23/libcomps/src/comps_elem.c:925:13: warning[-Wanalyzer-malloc-leak]: leak of ‘val’
libcomps-0.1.23/libcomps/src/comps_elem.c:899:8: branch_false: following ‘false’ branch (when ‘elem’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_elem.c:902:5: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:903:8: branch_false: following ‘false’ branch (when ‘type != 0’)...
libcomps-0.1.23/libcomps/src/comps_elem.c:910:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:915:8: branch_true: following ‘true’ branch (when ‘attrs’ is non-NULL)...
 branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:916:16: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_elem.c:917:27: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:917:19: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_elem.c:918:16: branch_false: following ‘false’ branch (when ‘val’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_elem.c:924:53: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_elem.c:925:13: danger: ‘val’ leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
#  923|               }
#  924|               memcpy(val, *(attrs+1), sizeof(char) * (strlen(*(attrs+1))+1));
#  925|->             comps_dict_set(elem->attrs, (char*)*attrs, val);
#  926|           }
#  927|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
libcomps-0.1.23/libcomps/src/comps_hslist.c:55:20: warning[-Wanalyzer-malloc-leak]: leak of ‘it’
libcomps-0.1.23/libcomps/src/comps_hslist.c:52:15: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_hslist.c:52:8: branch_false: following ‘false’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_hslist.c:54:8: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_hslist.c:54:8: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_hslist.c:55:20: danger: ‘it’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   53|           return;
#   54|       if (construct && hslist->data_constructor) {
#   55|->         it->data = hslist->data_constructor(data);
#   56|       } else {
#   57|           it->data = data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
libcomps-0.1.23/libcomps/src/comps_hslist.c:79:17: warning[-Wanalyzer-malloc-leak]: leak of ‘it’
libcomps-0.1.23/libcomps/src/comps_hslist.c:74:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_hslist.c:76:15: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_hslist.c:76:15: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_hslist.c:76:8: branch_false: following ‘false’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_hslist.c:78:8: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_hslist.c:78:8: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_hslist.c:79:17: danger: ‘it’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   77|           return;
#   78|       if (construct && hslist->data_constructor) {
#   79|->         ndata = hslist->data_constructor(data);
#   80|       } else {
#   81|           ndata = data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
libcomps-0.1.23/libcomps/src/comps_hslist.c:101:23: warning[-Wanalyzer-malloc-leak]: leak of ‘newit’
libcomps-0.1.23/libcomps/src/comps_hslist.c:96:8: branch_false: following ‘false’ branch (when ‘hslist’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_hslist.c:98:18: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_hslist.c:98:18: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_hslist.c:98:8: branch_false: following ‘false’ branch (when ‘newit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_hslist.c:100:8: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_hslist.c:100:8: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_hslist.c:101:23: danger: ‘newit’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   99|           return 0;
#  100|       if (construct && hslist->data_constructor) {
#  101|->         newit->data = hslist->data_constructor(data);
#  102|       } else {
#  103|           newit->data = data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
libcomps-0.1.23/libcomps/src/comps_hslist.c:119:13: warning[-Wanalyzer-malloc-leak]: leak of ‘newit’
libcomps-0.1.23/libcomps/src/comps_hslist.c:96:8: branch_false: following ‘false’ branch (when ‘hslist’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_hslist.c:98:18: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_hslist.c:98:18: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_hslist.c:98:8: branch_false: following ‘false’ branch (when ‘newit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_hslist.c:100:8: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_hslist.c:109:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_hslist.c:114:15: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_hslist.c:114:15: branch_false: following ‘false’ branch (when ‘n != pos’)...
libcomps-0.1.23/libcomps/src/comps_hslist.c:118:13: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_hslist.c:118:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_hslist.c:119:13: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_hslist.c:119:13: danger: ‘newit’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  117|       } else {
#  118|           if (hslist->data_destructor)
#  119|->             hslist->data_destructor(newit->data);
#  120|           free(newit);
#  121|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
libcomps-0.1.23/libcomps/src/comps_hslist.c:134:17: warning[-Wanalyzer-malloc-leak]: leak of ‘it’
libcomps-0.1.23/libcomps/src/comps_hslist.c:129:8: branch_false: following ‘false’ branch (when ‘hslist’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_hslist.c:131:15: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_hslist.c:131:15: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_hslist.c:131:8: branch_false: following ‘false’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_hslist.c:133:8: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_hslist.c:133:8: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_hslist.c:134:17: danger: ‘it’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  132|           return;
#  133|       if (construct && hslist->data_constructor) {
#  134|->         ndata = hslist->data_constructor(data);
#  135|       } else {
#  136|           ndata = data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
libcomps-0.1.23/libcomps/src/comps_hslist.c:249:9: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_hslist_create()’
libcomps-0.1.23/libcomps/src/comps_hslist.c:240:15: enter_function: entry to ‘comps_hslist_clone’
libcomps-0.1.23/libcomps/src/comps_hslist.c:244:11: call_function: calling ‘comps_hslist_create’ from ‘comps_hslist_clone’
libcomps-0.1.23/libcomps/src/comps_hslist.c:244:11: return_function: returning to ‘comps_hslist_clone’ from ‘comps_hslist_create’
libcomps-0.1.23/libcomps/src/comps_hslist.c:245:5: call_function: calling ‘comps_hslist_init’ from ‘comps_hslist_clone’
libcomps-0.1.23/libcomps/src/comps_hslist.c:245:5: return_function: returning to ‘comps_hslist_clone’ from ‘comps_hslist_init’
libcomps-0.1.23/libcomps/src/comps_hslist.c:248:30: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_hslist.c:249:34: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_hslist.c:249:9: danger: ‘comps_hslist_create()’ leaks here; was allocated at [(4)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/3)
#  247|                              hslist->data_destructor);
#  248|       for (it = hslist->first; it != NULL; it = it->next) {
#  249|->         comps_hslist_append(ret, hslist->data_cloner(it->data), 0);
#  250|       }
#  251|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def63]
libcomps-0.1.23/libcomps/src/comps_log.c:94:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘comps_log_entry_create()’
libcomps-0.1.23/libcomps/src/comps_log.c:157:6: enter_function: entry to ‘comps_log_warning_x’
libcomps-0.1.23/libcomps/src/comps_log.c:160:5: call_function: calling ‘__comps_log_entry_x’ from ‘comps_log_warning_x’
#   92|       entry = comps_log_entry_create();
#   93|   
#   94|->     entry->args = malloc(sizeof(COMPS_Object*) * n);
#   95|       entry->arg_count = n;
#   96|       entry->code = code;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def64]
libcomps-0.1.23/libcomps/src/comps_log.c:110:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*<unknown>.args + (long unsigned int)i * 8’
libcomps-0.1.23/libcomps/src/comps_log.c:151:6: enter_function: entry to ‘comps_log_warning’
libcomps-0.1.23/libcomps/src/comps_log.c:154:5: call_function: calling ‘__comps_log_entry’ from ‘comps_log_warning’
#  108|       for (int i=0; i<n; i++) {
#  109|           val = va_arg(va, COMPS_Object*);
#  110|->         entry->args[i] = comps_object_copy(val);
#  111|       }
#  112|       if (log->std_out) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
libcomps-0.1.23/libcomps/src/comps_log.c:110:26: warning[-Wanalyzer-malloc-leak]: leak of ‘*<unknown>.args + (long unsigned int)i * 8’
libcomps-0.1.23/libcomps/src/comps_log.c:151:6: enter_function: entry to ‘comps_log_warning’
libcomps-0.1.23/libcomps/src/comps_log.c:154:5: call_function: calling ‘__comps_log_entry’ from ‘comps_log_warning’
#  108|       for (int i=0; i<n; i++) {
#  109|           val = va_arg(va, COMPS_Object*);
#  110|->         entry->args[i] = comps_object_copy(val);
#  111|       }
#  112|       if (log->std_out) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
libcomps-0.1.23/libcomps/src/comps_log.c:110:26: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_log.c:151:6: enter_function: entry to ‘comps_log_warning’
libcomps-0.1.23/libcomps/src/comps_log.c:154:5: call_function: calling ‘__comps_log_entry’ from ‘comps_log_warning’
#  108|       for (int i=0; i<n; i++) {
#  109|           val = va_arg(va, COMPS_Object*);
#  110|->         entry->args[i] = comps_object_copy(val);
#  111|       }
#  112|       if (log->std_out) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
libcomps-0.1.23/libcomps/src/comps_log.c:110:26: warning[-Wanalyzer-malloc-leak]: leak of ‘__comps_log_entry_prep(code,  type,  n)’
libcomps-0.1.23/libcomps/src/comps_log.c:151:6: enter_function: entry to ‘comps_log_warning’
libcomps-0.1.23/libcomps/src/comps_log.c:154:5: call_function: calling ‘__comps_log_entry’ from ‘comps_log_warning’
#  108|       for (int i=0; i<n; i++) {
#  109|           val = va_arg(va, COMPS_Object*);
#  110|->         entry->args[i] = comps_object_copy(val);
#  111|       }
#  112|       if (log->std_out) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def68]
libcomps-0.1.23/libcomps/src/comps_log.c:110:26: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libcomps-0.1.23/libcomps/src/comps_log.c:151:6: enter_function: entry to ‘comps_log_warning’
libcomps-0.1.23/libcomps/src/comps_log.c:153:5: acquire_resource: ‘va_start’ called here
libcomps-0.1.23/libcomps/src/comps_log.c:154:5: call_function: calling ‘__comps_log_entry’ from ‘comps_log_warning’
#  108|       for (int i=0; i<n; i++) {
#  109|           val = va_arg(va, COMPS_Object*);
#  110|->         entry->args[i] = comps_object_copy(val);
#  111|       }
#  112|       if (log->std_out) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
libcomps-0.1.23/libcomps/src/comps_log.c:118:1: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_log.c:151:6: enter_function: entry to ‘comps_log_warning’
libcomps-0.1.23/libcomps/src/comps_log.c:154:5: call_function: calling ‘__comps_log_entry’ from ‘comps_log_warning’
#  116|       }
#  117|       comps_hslist_append(log->entries, entry, 0);
#  118|-> }
#  119|   
#  120|   static void __comps_log_entry_x(COMPS_Log *log, int code, int type, int n,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
libcomps-0.1.23/libcomps/src/comps_log.c:118:1: warning[-Wanalyzer-malloc-leak]: leak of ‘__comps_log_entry_prep(code,  type,  n)’
libcomps-0.1.23/libcomps/src/comps_log.c:151:6: enter_function: entry to ‘comps_log_warning’
libcomps-0.1.23/libcomps/src/comps_log.c:154:5: call_function: calling ‘__comps_log_entry’ from ‘comps_log_warning’
#  116|       }
#  117|       comps_hslist_append(log->entries, entry, 0);
#  118|-> }
#  119|   
#  120|   static void __comps_log_entry_x(COMPS_Log *log, int code, int type, int n,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def71]
libcomps-0.1.23/libcomps/src/comps_log.c:128:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*<unknown>.args + (long unsigned int)i * 8’
libcomps-0.1.23/libcomps/src/comps_log.c:157:6: enter_function: entry to ‘comps_log_warning_x’
libcomps-0.1.23/libcomps/src/comps_log.c:160:5: call_function: calling ‘__comps_log_entry_x’ from ‘comps_log_warning_x’
#  126|       for (int i=0; i<n; i++) {
#  127|           val = va_arg(va, COMPS_Object*);
#  128|->         entry->args[i] = val;
#  129|       }
#  130|       if (log->std_out) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def72]
libcomps-0.1.23/libcomps/src/comps_log.c:135:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libcomps-0.1.23/libcomps/src/comps_log.c:157:6: enter_function: entry to ‘comps_log_warning_x’
libcomps-0.1.23/libcomps/src/comps_log.c:159:5: acquire_resource: ‘va_start’ called here
libcomps-0.1.23/libcomps/src/comps_log.c:160:5: call_function: calling ‘__comps_log_entry_x’ from ‘comps_log_warning_x’
#  133|           free(str);
#  134|       }
#  135|->     comps_hslist_append(log->entries, entry, 0);
#  136|   }
#  137|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
libcomps-0.1.23/libcomps/src/comps_log.c:136:1: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_log.c:157:6: enter_function: entry to ‘comps_log_warning_x’
libcomps-0.1.23/libcomps/src/comps_log.c:160:5: call_function: calling ‘__comps_log_entry_x’ from ‘comps_log_warning_x’
#  134|       }
#  135|       comps_hslist_append(log->entries, entry, 0);
#  136|-> }
#  137|   
#  138|   void comps_log_error(COMPS_Log *log, int code, int n, ...) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
libcomps-0.1.23/libcomps/src/comps_log.c:136:1: warning[-Wanalyzer-malloc-leak]: leak of ‘__comps_log_entry_prep(code,  type,  n)’
libcomps-0.1.23/libcomps/src/comps_log.c:157:6: enter_function: entry to ‘comps_log_warning_x’
libcomps-0.1.23/libcomps/src/comps_log.c:160:5: call_function: calling ‘__comps_log_entry_x’ from ‘comps_log_warning_x’
#  134|       }
#  135|       comps_hslist_append(log->entries, entry, 0);
#  136|-> }
#  137|   
#  138|   void comps_log_error(COMPS_Log *log, int code, int n, ...) {

Error: CPPCHECK_WARNING (CWE-476): [#def75]
libcomps-0.1.23/libcomps/src/comps_log.c:171: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: args
#  169|   
#  170|       for (int i = 0; i < log_entry->arg_count; i++) {
#  171|->         args[i] = comps_object_tostr((COMPS_Object*)log_entry->args[i]);
#  172|           *total_len += strlen(args[i]);
#  173|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def76]
libcomps-0.1.23/libcomps/src/comps_log.c:171:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘args’
libcomps-0.1.23/libcomps/src/comps_log.c:167:12: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_log.c:170:21: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_log.c:171:53: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_log.c:171:9: danger: ‘args + (long unsigned int)i * 8’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  169|   
#  170|       for (int i = 0; i < log_entry->arg_count; i++) {
#  171|->         args[i] = comps_object_tostr((COMPS_Object*)log_entry->args[i]);
#  172|           *total_len += strlen(args[i]);
#  173|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
libcomps-0.1.23/libcomps/src/comps_log.c:171:19: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_log.c:157:6: enter_function: entry to ‘comps_log_warning_x’
libcomps-0.1.23/libcomps/src/comps_log.c:160:5: call_function: calling ‘__comps_log_entry_x’ from ‘comps_log_warning_x’
#  169|   
#  170|       for (int i = 0; i < log_entry->arg_count; i++) {
#  171|->         args[i] = comps_object_tostr((COMPS_Object*)log_entry->args[i]);
#  172|           *total_len += strlen(args[i]);
#  173|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
libcomps-0.1.23/libcomps/src/comps_log.c:171:19: warning[-Wanalyzer-malloc-leak]: leak of ‘__comps_log_entry_prep(code,  type,  n)’
libcomps-0.1.23/libcomps/src/comps_log.c:157:6: enter_function: entry to ‘comps_log_warning_x’
libcomps-0.1.23/libcomps/src/comps_log.c:160:5: call_function: calling ‘__comps_log_entry_x’ from ‘comps_log_warning_x’
#  169|   
#  170|       for (int i = 0; i < log_entry->arg_count; i++) {
#  171|->         args[i] = comps_object_tostr((COMPS_Object*)log_entry->args[i]);
#  172|           *total_len += strlen(args[i]);
#  173|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
libcomps-0.1.23/libcomps/src/comps_log.c:171:19: warning[-Wanalyzer-malloc-leak]: leak of ‘args’
libcomps-0.1.23/libcomps/src/comps_log.c:167:12: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_log.c:170:21: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_log.c:171:53: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_log.c:171:19: danger: ‘args’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  169|   
#  170|       for (int i = 0; i < log_entry->arg_count; i++) {
#  171|->         args[i] = comps_object_tostr((COMPS_Object*)log_entry->args[i]);
#  172|           *total_len += strlen(args[i]);
#  173|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def80]
libcomps-0.1.23/libcomps/src/comps_log.c:171:19: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libcomps-0.1.23/libcomps/src/comps_log.c:157:6: enter_function: entry to ‘comps_log_warning_x’
libcomps-0.1.23/libcomps/src/comps_log.c:159:5: acquire_resource: ‘va_start’ called here
libcomps-0.1.23/libcomps/src/comps_log.c:160:5: call_function: calling ‘__comps_log_entry_x’ from ‘comps_log_warning_x’
#  169|   
#  170|       for (int i = 0; i < log_entry->arg_count; i++) {
#  171|->         args[i] = comps_object_tostr((COMPS_Object*)log_entry->args[i]);
#  172|           *total_len += strlen(args[i]);
#  173|       }

Error: CPPCHECK_WARNING (CWE-476): [#def81]
libcomps-0.1.23/libcomps/src/comps_log.c:172: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: args
#  170|       for (int i = 0; i < log_entry->arg_count; i++) {
#  171|           args[i] = comps_object_tostr((COMPS_Object*)log_entry->args[i]);
#  172|->         *total_len += strlen(args[i]);
#  173|       }
#  174|       return args;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
libcomps-0.1.23/libcomps/src/comps_log.c:185:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_log.c:157:6: enter_function: entry to ‘comps_log_warning_x’
libcomps-0.1.23/libcomps/src/comps_log.c:160:5: call_function: calling ‘__comps_log_entry_x’ from ‘comps_log_warning_x’
#  183|       ret = malloc(sizeof(char) * (strlen(COMPS_LogCodeFormat[log_entry->code]) +
#  184|                                    total_len + 1 - (2*log_entry->arg_count)));
#  185|->     expand_s(ret, COMPS_LogCodeFormat[log_entry->code],
#  186|              args,
#  187|              log_entry->arg_count);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
libcomps-0.1.23/libcomps/src/comps_log.c:185:5: warning[-Wanalyzer-malloc-leak]: leak of ‘__comps_log_entry_out(log_entry, & total_len)’
libcomps-0.1.23/libcomps/src/comps_log.c:177:7: enter_function: entry to ‘comps_log_entry_str’
libcomps-0.1.23/libcomps/src/comps_log.c:182:12: call_function: calling ‘__comps_log_entry_out’ from ‘comps_log_entry_str’
libcomps-0.1.23/libcomps/src/comps_log.c:182:12: return_function: returning to ‘comps_log_entry_str’ from ‘__comps_log_entry_out’
libcomps-0.1.23/libcomps/src/comps_log.c:185:5: danger: ‘__comps_log_entry_out(log_entry, & total_len)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/3)
#  183|       ret = malloc(sizeof(char) * (strlen(COMPS_LogCodeFormat[log_entry->code]) +
#  184|                                    total_len + 1 - (2*log_entry->arg_count)));
#  185|->     expand_s(ret, COMPS_LogCodeFormat[log_entry->code],
#  186|              args,
#  187|              log_entry->arg_count);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
libcomps-0.1.23/libcomps/src/comps_log.c:185:5: warning[-Wanalyzer-malloc-leak]: leak of ‘__comps_log_entry_prep(code,  type,  n)’
libcomps-0.1.23/libcomps/src/comps_log.c:157:6: enter_function: entry to ‘comps_log_warning_x’
libcomps-0.1.23/libcomps/src/comps_log.c:160:5: call_function: calling ‘__comps_log_entry_x’ from ‘comps_log_warning_x’
#  183|       ret = malloc(sizeof(char) * (strlen(COMPS_LogCodeFormat[log_entry->code]) +
#  184|                                    total_len + 1 - (2*log_entry->arg_count)));
#  185|->     expand_s(ret, COMPS_LogCodeFormat[log_entry->code],
#  186|              args,
#  187|              log_entry->arg_count);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
libcomps-0.1.23/libcomps/src/comps_log.c:185:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/src/comps_log.c:177:7: enter_function: entry to ‘comps_log_entry_str’
libcomps-0.1.23/libcomps/src/comps_log.c:182:12: call_function: calling ‘__comps_log_entry_out’ from ‘comps_log_entry_str’
libcomps-0.1.23/libcomps/src/comps_log.c:182:12: return_function: returning to ‘comps_log_entry_str’ from ‘__comps_log_entry_out’
libcomps-0.1.23/libcomps/src/comps_log.c:183:11: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_log.c:185:5: danger: ‘ret’ leaks here; was allocated at [(9)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/8)
#  183|       ret = malloc(sizeof(char) * (strlen(COMPS_LogCodeFormat[log_entry->code]) +
#  184|                                    total_len + 1 - (2*log_entry->arg_count)));
#  185|->     expand_s(ret, COMPS_LogCodeFormat[log_entry->code],
#  186|              args,
#  187|              log_entry->arg_count);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def86]
libcomps-0.1.23/libcomps/src/comps_log.c:185:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libcomps-0.1.23/libcomps/src/comps_log.c:157:6: enter_function: entry to ‘comps_log_warning_x’
libcomps-0.1.23/libcomps/src/comps_log.c:159:5: acquire_resource: ‘va_start’ called here
libcomps-0.1.23/libcomps/src/comps_log.c:160:5: call_function: calling ‘__comps_log_entry_x’ from ‘comps_log_warning_x’
#  183|       ret = malloc(sizeof(char) * (strlen(COMPS_LogCodeFormat[log_entry->code]) +
#  184|                                    total_len + 1 - (2*log_entry->arg_count)));
#  185|->     expand_s(ret, COMPS_LogCodeFormat[log_entry->code],
#  186|              args,
#  187|              log_entry->arg_count);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
libcomps-0.1.23/libcomps/src/comps_log.c:200:5: warning[-Wanalyzer-malloc-leak]: leak of ‘__comps_log_entry_out(log_entry, & total_len)’
libcomps-0.1.23/libcomps/src/comps_log.c:195:6: enter_function: entry to ‘comps_log_entry_print’
libcomps-0.1.23/libcomps/src/comps_log.c:199:12: call_function: calling ‘__comps_log_entry_out’ from ‘comps_log_entry_print’
libcomps-0.1.23/libcomps/src/comps_log.c:199:12: return_function: returning to ‘comps_log_entry_print’ from ‘__comps_log_entry_out’
libcomps-0.1.23/libcomps/src/comps_log.c:200:5: danger: ‘__comps_log_entry_out(log_entry, & total_len)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/3)
#  198|   
#  199|       args = __comps_log_entry_out(log_entry, &total_len);
#  200|->     expand_out(COMPS_LogCodeFormat[log_entry->code],
#  201|              args,
#  202|              log_entry->arg_count);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
libcomps-0.1.23/libcomps/src/comps_mradix.c:46:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_mradix.c:325:6: enter_function: entry to ‘__comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:337:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_mradix.c:339:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:345:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:348:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:354:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: call_function: calling ‘comps_mrtree_data_create’ from ‘__comps_mrtree_set’
#   44|       rtd->key[keylen] = 0;
#   45|       rtd->is_leaf = 1;
#   46|->     rtd->data = comps_hslist_create();
#   47|       comps_hslist_init(rtd->data, NULL, tree->data_cloner,
#   48|                                          tree->data_destructor);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
libcomps-0.1.23/libcomps/src/comps_mradix.c:46:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rtd’
libcomps-0.1.23/libcomps/src/comps_mradix.c:325:6: enter_function: entry to ‘__comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:337:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_mradix.c:339:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:345:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:348:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:354:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: call_function: calling ‘comps_mrtree_data_create’ from ‘__comps_mrtree_set’
#   44|       rtd->key[keylen] = 0;
#   45|       rtd->is_leaf = 1;
#   46|->     rtd->data = comps_hslist_create();
#   47|       comps_hslist_init(rtd->data, NULL, tree->data_cloner,
#   48|                                          tree->data_destructor);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
libcomps-0.1.23/libcomps/src/comps_mradix.c:47:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_mradix.c:325:6: enter_function: entry to ‘__comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:337:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_mradix.c:339:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:345:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:348:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:354:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: call_function: calling ‘comps_mrtree_data_create’ from ‘__comps_mrtree_set’
#   45|       rtd->is_leaf = 1;
#   46|       rtd->data = comps_hslist_create();
#   47|->     comps_hslist_init(rtd->data, NULL, tree->data_cloner,
#   48|                                          tree->data_destructor);
#   49|       if (data)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
libcomps-0.1.23/libcomps/src/comps_mradix.c:47:5: warning[-Wanalyzer-malloc-leak]: leak of ‘rtd’
libcomps-0.1.23/libcomps/src/comps_mradix.c:325:6: enter_function: entry to ‘__comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:337:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_mradix.c:339:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:345:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:348:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:354:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: call_function: calling ‘comps_mrtree_data_create’ from ‘__comps_mrtree_set’
#   45|       rtd->is_leaf = 1;
#   46|       rtd->data = comps_hslist_create();
#   47|->     comps_hslist_init(rtd->data, NULL, tree->data_cloner,
#   48|                                          tree->data_destructor);
#   49|       if (data)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
libcomps-0.1.23/libcomps/src/comps_mradix.c:50:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_mradix.c:325:6: enter_function: entry to ‘__comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:337:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_mradix.c:339:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:345:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:348:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:354:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: call_function: calling ‘comps_mrtree_data_create’ from ‘__comps_mrtree_set’
#   48|                                          tree->data_destructor);
#   49|       if (data)
#   50|->         comps_hslist_append(rtd->data, data, 0);
#   51|       rtd->subnodes = comps_hslist_create();
#   52|       comps_hslist_init(rtd->subnodes, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
libcomps-0.1.23/libcomps/src/comps_mradix.c:50:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rtd’
libcomps-0.1.23/libcomps/src/comps_mradix.c:325:6: enter_function: entry to ‘__comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:337:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_mradix.c:339:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:345:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:348:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:354:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: call_function: calling ‘comps_mrtree_data_create’ from ‘__comps_mrtree_set’
#   48|                                          tree->data_destructor);
#   49|       if (data)
#   50|->         comps_hslist_append(rtd->data, data, 0);
#   51|       rtd->subnodes = comps_hslist_create();
#   52|       comps_hslist_init(rtd->subnodes, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
libcomps-0.1.23/libcomps/src/comps_mradix.c:51:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_mradix.c:325:6: enter_function: entry to ‘__comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:337:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_mradix.c:339:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:345:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:348:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:354:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: call_function: calling ‘comps_mrtree_data_create’ from ‘__comps_mrtree_set’
#   49|       if (data)
#   50|           comps_hslist_append(rtd->data, data, 0);
#   51|->     rtd->subnodes = comps_hslist_create();
#   52|       comps_hslist_init(rtd->subnodes, NULL,
#   53|                                        NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
libcomps-0.1.23/libcomps/src/comps_mradix.c:51:21: warning[-Wanalyzer-malloc-leak]: leak of ‘rtd’
libcomps-0.1.23/libcomps/src/comps_mradix.c:325:6: enter_function: entry to ‘__comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:337:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_mradix.c:339:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:345:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:348:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:354:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: call_function: calling ‘comps_mrtree_data_create’ from ‘__comps_mrtree_set’
#   49|       if (data)
#   50|           comps_hslist_append(rtd->data, data, 0);
#   51|->     rtd->subnodes = comps_hslist_create();
#   52|       comps_hslist_init(rtd->subnodes, NULL,
#   53|                                        NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
libcomps-0.1.23/libcomps/src/comps_mradix.c:52:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_mradix.c:325:6: enter_function: entry to ‘__comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:337:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_mradix.c:339:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:345:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:348:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:354:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: call_function: calling ‘comps_mrtree_data_create’ from ‘__comps_mrtree_set’
#   50|           comps_hslist_append(rtd->data, data, 0);
#   51|       rtd->subnodes = comps_hslist_create();
#   52|->     comps_hslist_init(rtd->subnodes, NULL,
#   53|                                        NULL,
#   54|                                        &comps_mrtree_data_destroy_v);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
libcomps-0.1.23/libcomps/src/comps_mradix.c:52:5: warning[-Wanalyzer-malloc-leak]: leak of ‘rtd’
libcomps-0.1.23/libcomps/src/comps_mradix.c:325:6: enter_function: entry to ‘__comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:337:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_mradix.c:339:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:345:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:348:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:354:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:355:19: call_function: calling ‘comps_mrtree_data_create’ from ‘__comps_mrtree_set’
#   50|           comps_hslist_append(rtd->data, data, 0);
#   51|       rtd->subnodes = comps_hslist_create();
#   52|->     comps_hslist_init(rtd->subnodes, NULL,
#   53|                                        NULL,
#   54|                                        &comps_mrtree_data_destroy_v);

Error: CPPCHECK_WARNING (CWE-476): [#def98]
libcomps-0.1.23/libcomps/src/comps_mradix.c:183: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  181|   
#  182|       pair = malloc(sizeof(struct Pair));
#  183|->     pair->subnodes = rt2->subnodes;
#  184|       pair->key = NULL;
#  185|   

Error: CPPCHECK_WARNING (CWE-476): [#def99]
libcomps-0.1.23/libcomps/src/comps_mradix.c:184: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  182|       pair = malloc(sizeof(struct Pair));
#  183|       pair->subnodes = rt2->subnodes;
#  184|->     pair->key = NULL;
#  185|   
#  186|       tmplist = comps_hslist_create();

Error: CPPCHECK_WARNING (CWE-476): [#def100]
libcomps-0.1.23/libcomps/src/comps_mradix.c:199: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  197|           for (it = tmp_subnodes->first; it != NULL; it=it->next) {
#  198|               pair = malloc(sizeof(struct Pair));
#  199|->             pair->subnodes = ((COMPS_MRTreeData*)it->data)->subnodes;
#  200|   
#  201|               if (parent_pair->key != NULL) {

Error: CPPCHECK_WARNING (CWE-476): [#def101]
libcomps-0.1.23/libcomps/src/comps_mradix.c:257: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  255|   
#  256|       pair = malloc(sizeof(struct Pair));
#  257|->     pair->subnodes = rt->subnodes;
#  258|       pair->key = NULL;
#  259|       pair->added = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def102]
libcomps-0.1.23/libcomps/src/comps_mradix.c:258: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  256|       pair = malloc(sizeof(struct Pair));
#  257|       pair->subnodes = rt->subnodes;
#  258|->     pair->key = NULL;
#  259|       pair->added = 0;
#  260|   

Error: CPPCHECK_WARNING (CWE-476): [#def103]
libcomps-0.1.23/libcomps/src/comps_mradix.c:259: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  257|       pair->subnodes = rt->subnodes;
#  258|       pair->key = NULL;
#  259|->     pair->added = 0;
#  260|   
#  261|       tmplist = comps_hslist_create();

Error: CPPCHECK_WARNING (CWE-476): [#def104]
libcomps-0.1.23/libcomps/src/comps_mradix.c:276: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  274|           for (it = tmp_subnodes->first; it != NULL; it=it->next) {
#  275|               pair = malloc(sizeof(struct Pair));
#  276|->             pair->subnodes = ((COMPS_MRTreeData*)it->data)->subnodes;
#  277|               pair->added = 0;
#  278|   

Error: CPPCHECK_WARNING (CWE-476): [#def105]
libcomps-0.1.23/libcomps/src/comps_mradix.c:277: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  275|               pair = malloc(sizeof(struct Pair));
#  276|               pair->subnodes = ((COMPS_MRTreeData*)it->data)->subnodes;
#  277|->             pair->added = 0;
#  278|   
#  279|               if (parent_pair->key != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
libcomps-0.1.23/libcomps/src/comps_mradix.c:375:37: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_mradix.c:418:6: enter_function: entry to ‘comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:420:5: call_function: calling ‘__comps_mrtree_set’ from ‘comps_mrtree_set’
#  373|                   rtd = comps_mrtree_data_create(rt, key+offset,  ndata);
#  374|                   comps_hslist_append(subnodes, rtd, 0);
#  375|->                 ((COMPS_MRTreeData*)subnodes->last->data)->subnodes->last = it;
#  376|                   ((COMPS_MRTreeData*)subnodes->last->data)->subnodes->first = it;
#  377|                   _len = strlen(key + offset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
libcomps-0.1.23/libcomps/src/comps_mradix.c:375:37: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_mrtree_data_create(rt,  key + offset,  ndata)’
libcomps-0.1.23/libcomps/src/comps_mradix.c:418:6: enter_function: entry to ‘comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:420:5: call_function: calling ‘__comps_mrtree_set’ from ‘comps_mrtree_set’
#  373|                   rtd = comps_mrtree_data_create(rt, key+offset,  ndata);
#  374|                   comps_hslist_append(subnodes, rtd, 0);
#  375|->                 ((COMPS_MRTreeData*)subnodes->last->data)->subnodes->last = it;
#  376|                   ((COMPS_MRTreeData*)subnodes->last->data)->subnodes->first = it;
#  377|                   _len = strlen(key + offset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
libcomps-0.1.23/libcomps/src/comps_mradix.c:397:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_mradix.c:418:6: enter_function: entry to ‘comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:420:5: call_function: calling ‘__comps_mrtree_set’ from ‘comps_mrtree_set’
#  395|                   if (cmpret > 0) {
#  396|                       rtd = comps_mrtree_data_create(rt, rtdata->key+x, tmpdata);
#  397|->                     comps_hslist_destroy(&rtd->subnodes);
#  398|                       rtd->subnodes = tmpnodes;
#  399|                       comps_hslist_append(rtdata->subnodes, rtd, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
libcomps-0.1.23/libcomps/src/comps_mradix.c:397:21: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_mrtree_data_create(rt, *rtdata.key + (sizetype)x,  tmpdata)’
libcomps-0.1.23/libcomps/src/comps_mradix.c:418:6: enter_function: entry to ‘comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:420:5: call_function: calling ‘__comps_mrtree_set’ from ‘comps_mrtree_set’
#  395|                   if (cmpret > 0) {
#  396|                       rtd = comps_mrtree_data_create(rt, rtdata->key+x, tmpdata);
#  397|->                     comps_hslist_destroy(&rtd->subnodes);
#  398|                       rtd->subnodes = tmpnodes;
#  399|                       comps_hslist_append(rtdata->subnodes, rtd, 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def110]
libcomps-0.1.23/libcomps/src/comps_mradix.c:398:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libcomps-0.1.23/libcomps/src/comps_mradix.c:418:6: enter_function: entry to ‘comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:420:5: call_function: calling ‘__comps_mrtree_set’ from ‘comps_mrtree_set’
#  396|                       rtd = comps_mrtree_data_create(rt, rtdata->key+x, tmpdata);
#  397|                       comps_hslist_destroy(&rtd->subnodes);
#  398|->                     rtd->subnodes = tmpnodes;
#  399|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  400|                       rtd = comps_mrtree_data_create(rt, key+offset+x, ndata);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
libcomps-0.1.23/libcomps/src/comps_mradix.c:405:62: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_mradix.c:418:6: enter_function: entry to ‘comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:420:5: call_function: calling ‘__comps_mrtree_set’ from ‘comps_mrtree_set’
#  403|                       rtd = comps_mrtree_data_create(rt, key+offset+x, ndata);
#  404|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  405|->                     rtd = comps_mrtree_data_create(rt, rtdata->key+x, tmpdata);
#  406|                       comps_hslist_destroy(&rtd->subnodes);
#  407|                       rtd->subnodes = tmpnodes;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def112]
libcomps-0.1.23/libcomps/src/comps_mradix.c:405:62: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_mrtree_data_create(rt,  key + ((sizetype)x + offset), ndata)’
libcomps-0.1.23/libcomps/src/comps_mradix.c:418:6: enter_function: entry to ‘comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:420:5: call_function: calling ‘__comps_mrtree_set’ from ‘comps_mrtree_set’
#  403|                       rtd = comps_mrtree_data_create(rt, key+offset+x, ndata);
#  404|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  405|->                     rtd = comps_mrtree_data_create(rt, rtdata->key+x, tmpdata);
#  406|                       comps_hslist_destroy(&rtd->subnodes);
#  407|                       rtd->subnodes = tmpnodes;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def113]
libcomps-0.1.23/libcomps/src/comps_mradix.c:407:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libcomps-0.1.23/libcomps/src/comps_mradix.c:418:6: enter_function: entry to ‘comps_mrtree_set’
libcomps-0.1.23/libcomps/src/comps_mradix.c:420:5: call_function: calling ‘__comps_mrtree_set’ from ‘comps_mrtree_set’
#  405|                       rtd = comps_mrtree_data_create(rt, rtdata->key+x, tmpdata);
#  406|                       comps_hslist_destroy(&rtd->subnodes);
#  407|->                     rtd->subnodes = tmpnodes;
#  408|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  409|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
libcomps-0.1.23/libcomps/src/comps_mradix.c:596:9: warning[-Wanalyzer-malloc-leak]: leak of ‘relation’
libcomps-0.1.23/libcomps/src/comps_mradix.c:525:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:527:14: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:527:36: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:528:37: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:533:12: branch_false: following ‘false’ branch (when ‘found != 0’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:537:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:546:12: branch_false: following ‘false’ branch (when ‘ended != 3’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:584:17: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:584:17: branch_true: following ‘true’ branch (when ‘ended == 1’)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:584:30: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:589:25: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_mradix.c:589:12: branch_false: following ‘false’ branch (when ‘relation’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_mradix.c:593:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_mradix.c:596:9: danger: ‘relation’ leaks here; was allocated at [(11)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/10)
#  594|           relation->parent_nodes = subnodes;
#  595|           relation->child_it = it;
#  596|->         comps_hslist_append(path, (void*)relation, 0);
#  597|       }
#  598|       comps_hslist_destroy(&path);

Error: CPPCHECK_WARNING (CWE-476): [#def115]
libcomps-0.1.23/libcomps/src/comps_obj.c:10: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: obj
#    8|       COMPS_Object *obj;
#    9|       obj = malloc(obj_info->obj_size);
#   10|->     obj->obj_info = obj_info;
#   11|       obj->refc = comps_refc_create((void*)obj,
#   12|                                    (void (*)(void*)) obj_info->destructor);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def116]
libcomps-0.1.23/libcomps/src/comps_obj.c:10:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘obj’
libcomps-0.1.23/libcomps/src/comps_obj.c:9:11: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_obj.c:10:5: danger: ‘obj’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#    8|       COMPS_Object *obj;
#    9|       obj = malloc(obj_info->obj_size);
#   10|->     obj->obj_info = obj_info;
#   11|       obj->refc = comps_refc_create((void*)obj,
#   12|                                    (void (*)(void*)) obj_info->destructor);

Error: CPPCHECK_WARNING (CWE-476): [#def117]
libcomps-0.1.23/libcomps/src/comps_obj.c:11: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: obj
#    9|       obj = malloc(obj_info->obj_size);
#   10|       obj->obj_info = obj_info;
#   11|->     obj->refc = comps_refc_create((void*)obj,
#   12|                                    (void (*)(void*)) obj_info->destructor);
#   13|       if (obj_info->constructor)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
libcomps-0.1.23/libcomps/src/comps_obj.c:11:17: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
libcomps-0.1.23/libcomps/src/comps_obj.c:9:11: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_obj.c:11:17: danger: ‘obj’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#    9|       obj = malloc(obj_info->obj_size);
#   10|       obj->obj_info = obj_info;
#   11|->     obj->refc = comps_refc_create((void*)obj,
#   12|                                    (void (*)(void*)) obj_info->destructor);
#   13|       if (obj_info->constructor)

Error: CPPCHECK_WARNING (CWE-476): [#def119]
libcomps-0.1.23/libcomps/src/comps_obj.c:36: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: obj
#   34|       COMPS_Object *obj;
#   35|       obj = malloc(comps_obj->obj_info->obj_size);
#   36|->     obj->refc = comps_refc_create((void*)obj,
#   37|                                (void (*)(void*)) comps_obj->obj_info->destructor);
#   38|       obj->obj_info = comps_obj->obj_info;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
libcomps-0.1.23/libcomps/src/comps_obj.c:36:17: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
libcomps-0.1.23/libcomps/src/comps_obj.c:33:8: branch_false: following ‘false’ branch (when ‘comps_obj’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_obj.c:35:18: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_obj.c:35:11: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_obj.c:36:17: danger: ‘obj’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   34|       COMPS_Object *obj;
#   35|       obj = malloc(comps_obj->obj_info->obj_size);
#   36|->     obj->refc = comps_refc_create((void*)obj,
#   37|                                (void (*)(void*)) comps_obj->obj_info->destructor);
#   38|       obj->obj_info = comps_obj->obj_info;

Error: CPPCHECK_WARNING (CWE-476): [#def121]
libcomps-0.1.23/libcomps/src/comps_obj.c:38: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: obj
#   36|       obj->refc = comps_refc_create((void*)obj,
#   37|                                (void (*)(void*)) comps_obj->obj_info->destructor);
#   38|->     obj->obj_info = comps_obj->obj_info;
#   39|       comps_obj->obj_info->copy(obj, comps_obj);
#   40|       return obj;

Error: CPPCHECK_WARNING (CWE-476): [#def122]
libcomps-0.1.23/libcomps/src/comps_obj.c:69: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   67|       } else {
#   68|           ret = malloc(sizeof(char));
#   69|->         ret[0]=0;
#   70|           return ret;;
#   71|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def123]
libcomps-0.1.23/libcomps/src/comps_obj.c:69:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
libcomps-0.1.23/libcomps/src/comps_obj.c:68:15: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_obj.c:69:9: danger: ‘ret’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   67|       } else {
#   68|           ret = malloc(sizeof(char));
#   69|->         ret[0]=0;
#   70|           return ret;;
#   71|       }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def124]
libcomps-0.1.23/libcomps/src/comps_obj.c:105:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected
libcomps-0.1.23/libcomps/src/comps_obj.c:104:11: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_obj.c:105:5: danger: argument 1 (‘ret’) from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#argument 1 of ‘__builtin_sprintf’ must be non-null
#  103|           x = (int)(log10(((COMPS_Num*)num)->val)) + 1;
#  104|       ret = malloc(sizeof(char)*(x+1));
#  105|->     sprintf(ret, "%d", ((COMPS_Num*)num)->val);
#  106|       return ret;
#  107|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def125]
libcomps-0.1.23/libcomps/src/comps_obj.c:117:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc(strlen(*(COMPS_Str *)*args_10(D).val) + 1)’ where non-null expected
libcomps-0.1.23/libcomps/src/comps_obj.c:114:8: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_obj.c:115:34: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_obj.c:117:9: danger: argument 1 (‘malloc(strlen(*(COMPS_Str *)*args_10(D).val) + 1)’) from [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  115|           ((COMPS_Str*)str)->val = malloc(sizeof(char) *
#  116|                                           (strlen(((COMPS_Str*)args[0])->val)+1));
#  117|->         strcpy(((COMPS_Str*)str)->val, ((COMPS_Str*)args[0])->val);
#  118|       }
#  119|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def126]
libcomps-0.1.23/libcomps/src/comps_obj.c:126:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc(strlen(*(COMPS_Str *)str_src.val) + 1)’ where non-null expected
libcomps-0.1.23/libcomps/src/comps_obj.c:122:8: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_obj.c:125:31: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_obj.c:124:23: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_obj.c:126:9: danger: argument 1 (‘malloc(strlen(*(COMPS_Str *)str_src.val) + 1)’) from [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  124|                         malloc(sizeof(char) *
#  125|                                (strlen(((COMPS_Str*)str_src)->val) + 1));
#  126|->         strcpy(((COMPS_Str*)str_dst)->val, ((COMPS_Str*)str_src)->val);
#  127|       } else
#  128|           ((COMPS_Str*)str_dst)->val = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def127]
libcomps-0.1.23/libcomps/src/comps_obj.c:139: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  137|       if (((COMPS_Str*)str)->val) {
#  138|           ret = malloc(sizeof(char)*(strlen(((COMPS_Str*)str)->val)+1));
#  139|->         strcpy(ret, ((COMPS_Str*)str)->val);
#  140|       } else {
#  141|           ret = malloc(sizeof(char));

Error: GCC_ANALYZER_WARNING (CWE-688): [#def128]
libcomps-0.1.23/libcomps/src/comps_obj.c:139:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected
libcomps-0.1.23/libcomps/src/comps_obj.c:137:8: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_obj.c:138:36: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_obj.c:138:15: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_obj.c:139:9: danger: argument 1 (‘ret’) from [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  137|       if (((COMPS_Str*)str)->val) {
#  138|           ret = malloc(sizeof(char)*(strlen(((COMPS_Str*)str)->val)+1));
#  139|->         strcpy(ret, ((COMPS_Str*)str)->val);
#  140|       } else {
#  141|           ret = malloc(sizeof(char));

Error: CPPCHECK_WARNING (CWE-476): [#def129]
libcomps-0.1.23/libcomps/src/comps_obj.c:142: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  140|       } else {
#  141|           ret = malloc(sizeof(char));
#  142|->         ret[0] = 0;
#  143|       }
#  144|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def130]
libcomps-0.1.23/libcomps/src/comps_obj.c:142:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
libcomps-0.1.23/libcomps/src/comps_obj.c:141:15: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_obj.c:142:9: danger: ‘ret’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  140|       } else {
#  141|           ret = malloc(sizeof(char));
#  142|->         ret[0] = 0;
#  143|       }
#  144|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def131]
libcomps-0.1.23/libcomps/src/comps_obj.c:167:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc(strlen(s) + 1)’ where non-null expected
libcomps-0.1.23/libcomps/src/comps_obj.c:163:12: enter_function: entry to ‘comps_str’
libcomps-0.1.23/libcomps/src/comps_obj.c:164:22: call_function: calling ‘comps_object_create’ from ‘comps_str’
libcomps-0.1.23/libcomps/src/comps_obj.c:164:22: return_function: returning to ‘comps_str’ from ‘comps_object_create’
libcomps-0.1.23/libcomps/src/comps_obj.c:165:8: branch_true: following ‘true’ branch (when ‘s’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_obj.c:166:44: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_obj.c:166:20: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_obj.c:167:9: danger: argument 1 (‘malloc(strlen(s) + 1)’) from [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8) could be NULL where non-null expected
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  165|       if (s) {
#  166|           ret->val = malloc(sizeof(char) * ((strlen(s)+1)));
#  167|->         strcpy(ret->val, s);
#  168|       } else 
#  169|           ret->val = NULL;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def132]
libcomps-0.1.23/libcomps/src/comps_obj.c:180:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*str.val’ where non-null expected
libcomps-0.1.23/libcomps/src/comps_obj.c:179:16: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_obj.c:180:5: danger: argument 1 (‘malloc(strlen(s) + 1)’) from [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  178|       free(str->val);
#  179|       str->val = malloc(sizeof(char) * ((strlen(s)+1)));
#  180|->     strcpy(str->val, s);
#  181|   }
#  182|   signed char comps_str_fnmatch(COMPS_Str *str, char *pattern, int flags) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
libcomps-0.1.23/libcomps/src/comps_objlist.c:13:24: warning[-Wanalyzer-malloc-leak]: leak of ‘objit’
libcomps-0.1.23/libcomps/src/comps_objlist.c:241:5: enter_function: entry to ‘comps_objlist_insert_at’
libcomps-0.1.23/libcomps/src/comps_objlist.c:244:8: branch_false: following ‘false’ branch (when ‘objlist’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objlist.c:245:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:245:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:246:30: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:246:30: call_function: calling ‘comps_objlist_it_create’ from ‘comps_objlist_insert_at’
#   11|       if (!objit) return NULL;
#   12|   
#   13|->     objit->comps_obj = comps_object_incref(obj);
#   14|       objit->next = NULL;
#   15|       return objit;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
libcomps-0.1.23/libcomps/src/comps_objlist.c:144:9: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objlist_it_create(obj)’
libcomps-0.1.23/libcomps/src/comps_objlist.c:409:6: enter_function: entry to ‘comps_objlist_concat_in’
libcomps-0.1.23/libcomps/src/comps_objlist.c:411:29: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objlist.c:412:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:412:9: call_function: calling ‘comps_objlist_append’ from ‘comps_objlist_concat_in’
#  142|   
#  143|   static int __comps_objlist_append(COMPS_ObjList *objlist, COMPS_ObjListIt *objit) {
#  144|->     if (!objlist || !objit) return 0;
#  145|       if (objlist->first == NULL) {
#  146|           objlist->first = objit;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def135]
libcomps-0.1.23/libcomps/src/comps_objlist.c:211:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘newit’
libcomps-0.1.23/libcomps/src/comps_objlist.c:241:5: enter_function: entry to ‘comps_objlist_insert_at’
libcomps-0.1.23/libcomps/src/comps_objlist.c:244:8: branch_false: following ‘false’ branch (when ‘objlist’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objlist.c:245:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:245:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:246:30: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:246:30: call_function: calling ‘comps_objlist_it_create’ from ‘comps_objlist_insert_at’
libcomps-0.1.23/libcomps/src/comps_objlist.c:246:30: return_function: returning to ‘comps_objlist_insert_at’ from ‘comps_objlist_it_create’
libcomps-0.1.23/libcomps/src/comps_objlist.c:247:12: call_function: calling ‘__comps_objlist_insert_at’ from ‘comps_objlist_insert_at’
#  209|       unsigned int i;
#  210|       if (pos == 0) {
#  211|->         newit->next = objlist->first;
#  212|           objlist->first = newit;
#  213|           if (!objlist->last) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def136]
libcomps-0.1.23/libcomps/src/comps_objlist.c:217:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘newit’
libcomps-0.1.23/libcomps/src/comps_objlist.c:241:5: enter_function: entry to ‘comps_objlist_insert_at’
libcomps-0.1.23/libcomps/src/comps_objlist.c:244:8: branch_false: following ‘false’ branch (when ‘objlist’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objlist.c:245:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:245:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:246:30: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:246:30: call_function: calling ‘comps_objlist_it_create’ from ‘comps_objlist_insert_at’
libcomps-0.1.23/libcomps/src/comps_objlist.c:246:30: return_function: returning to ‘comps_objlist_insert_at’ from ‘comps_objlist_it_create’
libcomps-0.1.23/libcomps/src/comps_objlist.c:247:12: call_function: calling ‘__comps_objlist_insert_at’ from ‘comps_objlist_insert_at’
#  215|           }
#  216|       } else if (pos == objlist->len){
#  217|->         newit->next = NULL;
#  218|           objlist->last->next = newit;
#  219|           objlist->last = newit;

Error: CPPCHECK_WARNING (CWE-476): [#def137]
libcomps-0.1.23/libcomps/src/comps_objlist.c:227: warning[nullPointer]: Possible null pointer dereference: oldit
#  225|               oldit = tmpit;
#  226|           }
#  227|->         newit->next = oldit->next;
#  228|           oldit->next = newit; 
#  229|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def138]
libcomps-0.1.23/libcomps/src/comps_objlist.c:227:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘oldit’
libcomps-0.1.23/libcomps/src/comps_objlist.c:241:5: enter_function: entry to ‘comps_objlist_insert_at’
libcomps-0.1.23/libcomps/src/comps_objlist.c:244:8: branch_false: following ‘false’ branch (when ‘objlist’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objlist.c:245:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:245:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:246:30: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:246:30: call_function: calling ‘comps_objlist_it_create’ from ‘comps_objlist_insert_at’
libcomps-0.1.23/libcomps/src/comps_objlist.c:246:30: return_function: returning to ‘comps_objlist_insert_at’ from ‘comps_objlist_it_create’
libcomps-0.1.23/libcomps/src/comps_objlist.c:247:12: call_function: calling ‘__comps_objlist_insert_at’ from ‘comps_objlist_insert_at’
#  225|               oldit = tmpit;
#  226|           }
#  227|->         newit->next = oldit->next;
#  228|           oldit->next = newit; 
#  229|       }

Error: CPPCHECK_WARNING (CWE-476): [#def139]
libcomps-0.1.23/libcomps/src/comps_objlist.c:228: warning[nullPointer]: Possible null pointer dereference: oldit
#  226|           }
#  227|           newit->next = oldit->next;
#  228|->         oldit->next = newit; 
#  229|       }
#  230|       objlist->len++;

Error: CPPCHECK_WARNING (CWE-476): [#def140]
libcomps-0.1.23/libcomps/src/comps_objlist.c:469: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  467|       //total2=0;
#  468|       ret = malloc(sizeof(char) * (total_strlen));
#  469|->     ret[0]=0;
#  470|       strcat(ret, "[");
#  471|       //total2 += strlen("[");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def141]
libcomps-0.1.23/libcomps/src/comps_objlist.c:469:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
libcomps-0.1.23/libcomps/src/comps_objlist.c:468:11: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_objlist.c:469:5: danger: ‘ret’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  467|       //total2=0;
#  468|       ret = malloc(sizeof(char) * (total_strlen));
#  469|->     ret[0]=0;
#  470|       strcat(ret, "[");
#  471|       //total2 += strlen("[");

Error: CPPCHECK_WARNING (CWE-476): [#def142]
libcomps-0.1.23/libcomps/src/comps_objlist.c:470: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  468|       ret = malloc(sizeof(char) * (total_strlen));
#  469|       ret[0]=0;
#  470|->     strcat(ret, "[");
#  471|       //total2 += strlen("[");
#  472|       if (((COMPS_ObjList*)list)->len) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def143]
libcomps-0.1.23/libcomps/src/comps_objlist.c:474:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*items[i]’
libcomps-0.1.23/libcomps/src/comps_objlist.c:455:8: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
 branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:456:16: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:457:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:456:16: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:461:16: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:472:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:473:21: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:474:25: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:473:21: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:474:25: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:473:21: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:474:25: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:474:25: danger: use of uninitialized value ‘*items[i]’ here
#  472|       if (((COMPS_ObjList*)list)->len) {
#  473|           for (i = 0; i < (int)(((COMPS_ObjList*)list)->len-1); i++) {
#  474|->             strcat(ret, items[i]);
#  475|               //total2 += strlen(items[i]);
#  476|               strcat(ret, ", ");

Error: GCC_ANALYZER_WARNING (CWE-457): [#def144]
libcomps-0.1.23/libcomps/src/comps_objlist.c:480:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*items[i]’
libcomps-0.1.23/libcomps/src/comps_objlist.c:455:8: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
 branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:456:16: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:457:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:456:16: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:461:16: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:472:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:473:21: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:474:25: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:473:21: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:474:25: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:473:21: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objlist.c:480:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objlist.c:480:21: danger: use of uninitialized value ‘*items[i]’ here
#  478|               free(items[i]);
#  479|           }
#  480|->         strcat(ret, items[i]);
#  481|           //total2 += strlen(items[i]);
#  482|           free(items[i]);

Error: CPPCHECK_WARNING (CWE-476): [#def145]
libcomps-0.1.23/libcomps/src/comps_objlist.c:484: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  482|           free(items[i]);
#  483|       }
#  484|->     strcat(ret, "]");
#  485|       //total2 += strlen("]");
#  486|       //printf("total len2:%d\n", total2);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:49:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:36: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
#   47|       rtd->key[keylen] = '\0';
#   48|       rtd->is_leaf = 1;
#   49|->     rtd->data = COMPS_OBJECT_CREATE(COMPS_ObjList, NULL);
#   50|       if (data)
#   51|           comps_objlist_append_x(rtd->data, data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:49:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rtd’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:36: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
#   47|       rtd->key[keylen] = '\0';
#   48|       rtd->is_leaf = 1;
#   49|->     rtd->data = COMPS_OBJECT_CREATE(COMPS_ObjList, NULL);
#   50|       if (data)
#   51|           comps_objlist_append_x(rtd->data, data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:51:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
#   49|       rtd->data = COMPS_OBJECT_CREATE(COMPS_ObjList, NULL);
#   50|       if (data)
#   51|->         comps_objlist_append_x(rtd->data, data);
#   52|       rtd->subnodes = comps_hslist_create();
#   53|       comps_hslist_init(rtd->subnodes, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:51:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rtd’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
#   49|       rtd->data = COMPS_OBJECT_CREATE(COMPS_ObjList, NULL);
#   50|       if (data)
#   51|->         comps_objlist_append_x(rtd->data, data);
#   52|       rtd->subnodes = comps_hslist_create();
#   53|       comps_hslist_init(rtd->subnodes, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:52:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
#   50|       if (data)
#   51|           comps_objlist_append_x(rtd->data, data);
#   52|->     rtd->subnodes = comps_hslist_create();
#   53|       comps_hslist_init(rtd->subnodes, NULL,
#   54|                                        NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:52:21: warning[-Wanalyzer-malloc-leak]: leak of ‘rtd’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
#   50|       if (data)
#   51|           comps_objlist_append_x(rtd->data, data);
#   52|->     rtd->subnodes = comps_hslist_create();
#   53|       comps_hslist_init(rtd->subnodes, NULL,
#   54|                                        NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:53:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
#   51|           comps_objlist_append_x(rtd->data, data);
#   52|       rtd->subnodes = comps_hslist_create();
#   53|->     comps_hslist_init(rtd->subnodes, NULL,
#   54|                                        NULL,
#   55|                                        &comps_objmrtree_data_destroy_v);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:53:5: warning[-Wanalyzer-malloc-leak]: leak of ‘rtd’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
#   51|           comps_objlist_append_x(rtd->data, data);
#   52|       rtd->subnodes = comps_hslist_create();
#   53|->     comps_hslist_init(rtd->subnodes, NULL,
#   54|                                        NULL,
#   55|                                        &comps_objmrtree_data_destroy_v);

Error: CPPCHECK_WARNING (CWE-476): [#def154]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:291: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  289|   
#  290|       pair = malloc(sizeof(struct Pair));
#  291|->     pair->subnodes = rt2->subnodes;
#  292|       pair->key = NULL;
#  293|   

Error: CPPCHECK_WARNING (CWE-476): [#def155]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:292: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  290|       pair = malloc(sizeof(struct Pair));
#  291|       pair->subnodes = rt2->subnodes;
#  292|->     pair->key = NULL;
#  293|   
#  294|       tmplist = comps_hslist_create();

Error: CPPCHECK_WARNING (CWE-476): [#def156]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:307: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  305|           for (it = tmp_subnodes->first; it != NULL; it=it->next) {
#  306|               pair = malloc(sizeof(struct Pair));
#  307|->             pair->subnodes = ((COMPS_ObjMRTreeData*)it->data)->subnodes;
#  308|   
#  309|               if (parent_pair->key != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:389:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: return_function: returning to ‘__comps_objmrtree_set’ from ‘comps_objmrtree_data_create’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:389:13: danger: ‘<unknown>’ leaks here; was allocated at [(14)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/13)
#  387|               rtd = comps_objmrtree_data_create(key+offset, ndata);
#  388|               comps_hslist_append(subnodes, rtd, 0);
#  389|->             rt->len++;
#  390|               return;
#  391|           } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def158]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:389:13: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objmrtree_data_create(key + offset,  ndata)’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:387:19: return_function: returning to ‘__comps_objmrtree_set’ from ‘comps_objmrtree_data_create’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:389:13: danger: ‘comps_objmrtree_data_create(key + offset,  ndata)’ leaks here; was allocated at [(12)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/11)
#  387|               rtd = comps_objmrtree_data_create(key+offset, ndata);
#  388|               comps_hslist_append(subnodes, rtd, 0);
#  389|->             rt->len++;
#  390|               return;
#  391|           } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:409:40: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:36: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:381:40: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_false: following ‘false’ branch (when ‘found != 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:392:44: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:400:16: branch_false: following ‘false’ branch (when ‘ended != 3’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:404:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:404:23: branch_true: following ‘true’ branch (when ‘ended == 2’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:405:17: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:407:23: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:407:23: return_function: returning to ‘__comps_objmrtree_set’ from ‘comps_objmrtree_data_create’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:409:40: danger: ‘<unknown>’ leaks here; was allocated at [(20)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/19)
#  407|                   rtd = comps_objmrtree_data_create(key+offset, ndata);
#  408|                   comps_hslist_append(subnodes, rtd, 0);
#  409|->                 ((COMPS_ObjMRTreeData*)subnodes->last->data)->subnodes->last = it;
#  410|                   ((COMPS_ObjMRTreeData*)subnodes->last->data)->subnodes->first = it;
#  411|                   _len = strlen(key + offset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:409:40: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objmrtree_data_create(key + offset,  ndata)’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:36: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:381:40: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_false: following ‘false’ branch (when ‘found != 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:392:44: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:400:16: branch_false: following ‘false’ branch (when ‘ended != 3’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:404:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:404:23: branch_true: following ‘true’ branch (when ‘ended == 2’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:405:17: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:407:23: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:407:23: return_function: returning to ‘__comps_objmrtree_set’ from ‘comps_objmrtree_data_create’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:409:40: danger: ‘comps_objmrtree_data_create(key + offset,  ndata)’ leaks here; was allocated at [(18)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/17)
#  407|                   rtd = comps_objmrtree_data_create(key+offset, ndata);
#  408|                   comps_hslist_append(subnodes, rtd, 0);
#  409|->                 ((COMPS_ObjMRTreeData*)subnodes->last->data)->subnodes->last = it;
#  410|                   ((COMPS_ObjMRTreeData*)subnodes->last->data)->subnodes->first = it;
#  411|                   _len = strlen(key + offset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:435:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:36: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:381:40: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_false: following ‘false’ branch (when ‘found != 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:392:44: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:400:16: branch_false: following ‘false’ branch (when ‘ended != 3’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:404:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:404:23: branch_false: following ‘false’ branch (when ‘ended != 2’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:419:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:432:20: branch_true: following ‘true’ branch (when ‘cmpret > 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:433:61: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:433:27: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:433:27: return_function: returning to ‘__comps_objmrtree_set’ from ‘comps_objmrtree_data_create’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:435:21: danger: ‘<unknown>’ leaks here; was allocated at [(22)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/21)
#  433|                       rtd = comps_objmrtree_data_create(rtdata->key+x,
#  434|                                                         (COMPS_Object*)tmpdata);
#  435|->                     comps_hslist_destroy(&rtd->subnodes);
#  436|                       rtd->subnodes = tmphslist;
#  437|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:435:21: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objmrtree_data_create(*rtdata.key + (sizetype)x,  tmpdata)’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:362:6: enter_function: entry to ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:36: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:381:40: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_false: following ‘false’ branch (when ‘found != 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:392:44: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:400:16: branch_false: following ‘false’ branch (when ‘ended != 3’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:404:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:404:23: branch_false: following ‘false’ branch (when ‘ended != 2’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:419:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:432:20: branch_true: following ‘true’ branch (when ‘cmpret > 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:433:61: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:433:27: call_function: calling ‘comps_objmrtree_data_create’ from ‘__comps_objmrtree_set’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:433:27: return_function: returning to ‘__comps_objmrtree_set’ from ‘comps_objmrtree_data_create’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:435:21: danger: ‘comps_objmrtree_data_create(*rtdata.key + (sizetype)x,  tmpdata)’ leaks here; was allocated at [(20)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/19)
#  433|                       rtd = comps_objmrtree_data_create(rtdata->key+x,
#  434|                                                         (COMPS_Object*)tmpdata);
#  435|->                     comps_hslist_destroy(&rtd->subnodes);
#  436|                       rtd->subnodes = tmphslist;
#  437|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def163]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:436:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:373:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:377:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:380:36: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:381:40: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:386:12: branch_false: following ‘false’ branch (when ‘found != 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:392:44: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:400:16: branch_false: following ‘false’ branch (when ‘ended != 3’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:404:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:404:23: branch_false: following ‘false’ branch (when ‘ended != 2’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:419:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:432:20: branch_true: following ‘true’ branch (when ‘cmpret > 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:433:61: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:436:21: danger: dereference of NULL ‘comps_objmrtree_data_create(*rtdata.key + (sizetype)x,  tmpdata)’
#  434|                                                         (COMPS_Object*)tmpdata);
#  435|                       comps_hslist_destroy(&rtd->subnodes);
#  436|->                     rtd->subnodes = tmphslist;
#  437|   
#  438|                       comps_hslist_append(rtdata->subnodes, rtd, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:447:61: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:462:6: enter_function: entry to ‘comps_objmrtree_set_n’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:464:5: call_function: calling ‘__comps_objmrtree_set’ from ‘comps_objmrtree_set_n’
#  445|                                                        (COMPS_Object*)ndata);
#  446|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  447|->                     rtd = comps_objmrtree_data_create(rtdata->key+x,
#  448|                                                        (COMPS_Object*)tmpdata);
#  449|                       comps_hslist_destroy(&rtd->subnodes);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:447:61: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objmrtree_data_create(key + ((sizetype)x + offset), ndata)’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:462:6: enter_function: entry to ‘comps_objmrtree_set_n’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:464:5: call_function: calling ‘__comps_objmrtree_set’ from ‘comps_objmrtree_set_n’
#  445|                                                        (COMPS_Object*)ndata);
#  446|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  447|->                     rtd = comps_objmrtree_data_create(rtdata->key+x,
#  448|                                                        (COMPS_Object*)tmpdata);
#  449|                       comps_hslist_destroy(&rtd->subnodes);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def166]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:450:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:462:6: enter_function: entry to ‘comps_objmrtree_set_n’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:464:5: call_function: calling ‘__comps_objmrtree_set’ from ‘comps_objmrtree_set_n’
#  448|                                                        (COMPS_Object*)tmpdata);
#  449|                       comps_hslist_destroy(&rtd->subnodes);
#  450|->                     rtd->subnodes = tmphslist;
#  451|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  452|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:597:9: warning[-Wanalyzer-malloc-leak]: leak of ‘relation’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:526:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:528:14: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:528:36: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:529:40: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:534:12: branch_false: following ‘false’ branch (when ‘found != 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:538:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:547:12: branch_false: following ‘false’ branch (when ‘ended != 3’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:585:17: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:585:17: branch_true: following ‘true’ branch (when ‘ended == 1’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:585:30: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:590:25: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:590:12: branch_false: following ‘false’ branch (when ‘relation’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:594:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:597:9: danger: ‘relation’ leaks here; was allocated at [(11)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/10)
#  595|           relation->parent_nodes = subnodes;
#  596|           relation->child_it = it;
#  597|->         comps_hslist_append(path, (void*)relation, 0);
#  598|       }
#  599|       comps_hslist_destroy(&path);

Error: CPPCHECK_WARNING (CWE-476): [#def168]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:632: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  630|       for (hsit = rt->subnodes->first; hsit != NULL; hsit = hsit->next) {
#  631|           pair = malloc(sizeof(struct Pair));
#  632|->         pair->key = __comps_strcpy(((COMPS_ObjMRTreeData*)hsit->data)->key);
#  633|           pair->data = ((COMPS_ObjMRTreeData*)hsit->data)->data;
#  634|           pair->subnodes = ((COMPS_ObjMRTreeData*)hsit->data)->subnodes;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def169]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:632:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pair’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:630:38: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:631:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:631:16: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_objmradix.c:632:9: danger: ‘pair’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
#  630|       for (hsit = rt->subnodes->first; hsit != NULL; hsit = hsit->next) {
#  631|           pair = malloc(sizeof(struct Pair));
#  632|->         pair->key = __comps_strcpy(((COMPS_ObjMRTreeData*)hsit->data)->key);
#  633|           pair->data = ((COMPS_ObjMRTreeData*)hsit->data)->data;
#  634|           pair->subnodes = ((COMPS_ObjMRTreeData*)hsit->data)->subnodes;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:632:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:630:38: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:631:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:631:16: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:632:21: danger: ‘pair’ leaks here; was allocated at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
#  630|       for (hsit = rt->subnodes->first; hsit != NULL; hsit = hsit->next) {
#  631|           pair = malloc(sizeof(struct Pair));
#  632|->         pair->key = __comps_strcpy(((COMPS_ObjMRTreeData*)hsit->data)->key);
#  633|           pair->data = ((COMPS_ObjMRTreeData*)hsit->data)->data;
#  634|           pair->subnodes = ((COMPS_ObjMRTreeData*)hsit->data)->subnodes;

Error: CPPCHECK_WARNING (CWE-476): [#def171]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:633: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  631|           pair = malloc(sizeof(struct Pair));
#  632|           pair->key = __comps_strcpy(((COMPS_ObjMRTreeData*)hsit->data)->key);
#  633|->         pair->data = ((COMPS_ObjMRTreeData*)hsit->data)->data;
#  634|           pair->subnodes = ((COMPS_ObjMRTreeData*)hsit->data)->subnodes;
#  635|           comps_hslist_append(to_process, pair, 0);

Error: CPPCHECK_WARNING (CWE-476): [#def172]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:634: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  632|           pair->key = __comps_strcpy(((COMPS_ObjMRTreeData*)hsit->data)->key);
#  633|           pair->data = ((COMPS_ObjMRTreeData*)hsit->data)->data;
#  634|->         pair->subnodes = ((COMPS_ObjMRTreeData*)hsit->data)->subnodes;
#  635|           comps_hslist_append(to_process, pair, 0);
#  636|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:635:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:630:38: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:631:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:631:16: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:635:9: danger: ‘pair’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  633|           pair->data = ((COMPS_ObjMRTreeData*)hsit->data)->data;
#  634|           pair->subnodes = ((COMPS_ObjMRTreeData*)hsit->data)->subnodes;
#  635|->         comps_hslist_append(to_process, pair, 0);
#  636|       }
#  637|       while (to_process->first) {

Error: GCC_ANALYZER_WARNING (CWE-416): [#def174]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:639:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘*to_process.first’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:637:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:639:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:642:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:654:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:655:14: branch_false: following ‘false’ branch (when ‘hsit’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:663:14: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:665:9: release_memory: freed here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:637:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:639:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:639:9: danger: use after ‘free’ of ‘*to_process.first’; freed at [(7)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/6)
#  637|       while (to_process->first) {
#  638|           //oldpair = current_pair;
#  639|->         current_pair = to_process->first->data;
#  640|           oldit = to_process->first;
#  641|           comps_hslist_remove(to_process, to_process->first);

Error: GCC_ANALYZER_WARNING (CWE-416): [#def175]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:642:13: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘current_pair’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:637:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:639:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:642:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:654:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:655:14: branch_false: following ‘false’ branch (when ‘hsit’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:663:14: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:664:9: release_memory: freed here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:637:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:639:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:642:13: danger: use after ‘free’ of ‘current_pair’; freed at [(8)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/7)
#  640|           oldit = to_process->first;
#  641|           comps_hslist_remove(to_process, to_process->first);
#  642|->         if (current_pair->data) {
#  643|               if (keyvalpair == 0) {
#  644|                   comps_hslist_append(ret, __comps_strcpy(current_pair->key), 0);

Error: CPPCHECK_WARNING (CWE-476): [#def176]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:649: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rtpair
#  647|               } else {
#  648|                   rtpair = malloc(sizeof(COMPS_ObjMRTreePair));
#  649|->                 rtpair->key = __comps_strcpy(current_pair->key);
#  650|                   rtpair->data = current_pair->data;
#  651|                   comps_hslist_append(ret, rtpair, 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def177]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:649:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rtpair’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:637:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:639:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:642:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:643:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:643:16: branch_false: following ‘false’ branch (when ‘keyvalpair != 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:645:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:645:23: branch_false: following ‘false’ branch (when ‘keyvalpair != 1’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:648:26: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:648:26: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_objmradix.c:649:17: danger: ‘rtpair’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/8)
#  647|               } else {
#  648|                   rtpair = malloc(sizeof(COMPS_ObjMRTreePair));
#  649|->                 rtpair->key = __comps_strcpy(current_pair->key);
#  650|                   rtpair->data = current_pair->data;
#  651|                   comps_hslist_append(ret, rtpair, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def178]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:649:31: warning[-Wanalyzer-malloc-leak]: leak of ‘rtpair’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:637:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:639:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:642:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:643:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:643:16: branch_false: following ‘false’ branch (when ‘keyvalpair != 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:645:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:645:23: branch_false: following ‘false’ branch (when ‘keyvalpair != 1’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:648:26: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:648:26: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:649:31: danger: ‘rtpair’ leaks here; was allocated at [(9)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/8)
#  647|               } else {
#  648|                   rtpair = malloc(sizeof(COMPS_ObjMRTreePair));
#  649|->                 rtpair->key = __comps_strcpy(current_pair->key);
#  650|                   rtpair->data = current_pair->data;
#  651|                   comps_hslist_append(ret, rtpair, 0);

Error: CPPCHECK_WARNING (CWE-476): [#def179]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:650: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rtpair
#  648|                   rtpair = malloc(sizeof(COMPS_ObjMRTreePair));
#  649|                   rtpair->key = __comps_strcpy(current_pair->key);
#  650|->                 rtpair->data = current_pair->data;
#  651|                   comps_hslist_append(ret, rtpair, 0);
#  652|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:651:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rtpair’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:637:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:639:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:642:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:643:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:643:16: branch_false: following ‘false’ branch (when ‘keyvalpair != 0’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:645:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:645:23: branch_false: following ‘false’ branch (when ‘keyvalpair != 1’)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:648:26: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:648:26: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:651:17: danger: ‘rtpair’ leaks here; was allocated at [(9)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/8)
#  649|                   rtpair->key = __comps_strcpy(current_pair->key);
#  650|                   rtpair->data = current_pair->data;
#  651|->                 comps_hslist_append(ret, rtpair, 0);
#  652|               }
#  653|           }

Error: CPPCHECK_WARNING (CWE-476): [#def181]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:657: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  655|                hsit != NULL; hsit = hsit->next, x++) {
#  656|               pair = malloc(sizeof(struct Pair));
#  657|->             pair->key = __comps_strcat(current_pair->key,
#  658|                                          ((COMPS_ObjMRTreeData*)hsit->data)->key);
#  659|               pair->data = ((COMPS_ObjMRTreeData*)hsit->data)->data;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def182]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:657:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pair’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:637:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:639:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:642:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:654:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:655:14: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:656:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:656:20: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_objmradix.c:657:13: danger: ‘pair’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/6)
#  655|                hsit != NULL; hsit = hsit->next, x++) {
#  656|               pair = malloc(sizeof(struct Pair));
#  657|->             pair->key = __comps_strcat(current_pair->key,
#  658|                                          ((COMPS_ObjMRTreeData*)hsit->data)->key);
#  659|               pair->data = ((COMPS_ObjMRTreeData*)hsit->data)->data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def183]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:657:25: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:637:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:639:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:642:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:654:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:655:14: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:656:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:656:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:657:25: danger: ‘pair’ leaks here; was allocated at [(7)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/6)
#  655|                hsit != NULL; hsit = hsit->next, x++) {
#  656|               pair = malloc(sizeof(struct Pair));
#  657|->             pair->key = __comps_strcat(current_pair->key,
#  658|                                          ((COMPS_ObjMRTreeData*)hsit->data)->key);
#  659|               pair->data = ((COMPS_ObjMRTreeData*)hsit->data)->data;

Error: CPPCHECK_WARNING (CWE-476): [#def184]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:659: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  657|               pair->key = __comps_strcat(current_pair->key,
#  658|                                          ((COMPS_ObjMRTreeData*)hsit->data)->key);
#  659|->             pair->data = ((COMPS_ObjMRTreeData*)hsit->data)->data;
#  660|               pair->subnodes = ((COMPS_ObjMRTreeData*)hsit->data)->subnodes;
#  661|               comps_hslist_insert_at(to_process, x, pair, 0);

Error: CPPCHECK_WARNING (CWE-476): [#def185]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:660: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  658|                                          ((COMPS_ObjMRTreeData*)hsit->data)->key);
#  659|               pair->data = ((COMPS_ObjMRTreeData*)hsit->data)->data;
#  660|->             pair->subnodes = ((COMPS_ObjMRTreeData*)hsit->data)->subnodes;
#  661|               comps_hslist_insert_at(to_process, x, pair, 0);
#  662|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:661:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:637:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:639:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:642:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:654:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:655:14: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objmradix.c:656:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:656:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objmradix.c:661:13: danger: ‘pair’ leaks here; was allocated at [(7)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/6)
#  659|               pair->data = ((COMPS_ObjMRTreeData*)hsit->data)->data;
#  660|               pair->subnodes = ((COMPS_ObjMRTreeData*)hsit->data)->subnodes;
#  661|->             comps_hslist_insert_at(to_process, x, pair, 0);
#  662|           }
#  663|           free(current_pair->key);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def187]
libcomps-0.1.23/libcomps/src/comps_objmradix.c:663:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘((struct Pair)*(void *)((void *)current_pair)).key’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:672:15: enter_function: entry to ‘comps_objmrtree_keys’
libcomps-0.1.23/libcomps/src/comps_objmradix.c:673:12: call_function: calling ‘__comps_objmrtree_all’ from ‘comps_objmrtree_keys’
#  661|               comps_hslist_insert_at(to_process, x, pair, 0);
#  662|           }
#  663|->         free(current_pair->key);
#  664|           free(current_pair);
#  665|           free(oldit);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
libcomps-0.1.23/libcomps/src/comps_objradix.c:51:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#   49|           rtd->is_leaf = 1;
#   50|       }
#   51|->     rtd->subnodes = comps_hslist_create();
#   52|       comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_objrtree_data_destroy_v);
#   53|       return rtd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
libcomps-0.1.23/libcomps/src/comps_objradix.c:51:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#   49|           rtd->is_leaf = 1;
#   50|       }
#   51|->     rtd->subnodes = comps_hslist_create();
#   52|       comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_objrtree_data_destroy_v);
#   53|       return rtd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
libcomps-0.1.23/libcomps/src/comps_objradix.c:51:21: warning[-Wanalyzer-malloc-leak]: leak of ‘rtd’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#   49|           rtd->is_leaf = 1;
#   50|       }
#   51|->     rtd->subnodes = comps_hslist_create();
#   52|       comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_objrtree_data_destroy_v);
#   53|       return rtd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
libcomps-0.1.23/libcomps/src/comps_objradix.c:52:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#   50|       }
#   51|       rtd->subnodes = comps_hslist_create();
#   52|->     comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_objrtree_data_destroy_v);
#   53|       return rtd;
#   54|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
libcomps-0.1.23/libcomps/src/comps_objradix.c:52:5: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#   50|       }
#   51|       rtd->subnodes = comps_hslist_create();
#   52|->     comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_objrtree_data_destroy_v);
#   53|       return rtd;
#   54|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
libcomps-0.1.23/libcomps/src/comps_objradix.c:52:5: warning[-Wanalyzer-malloc-leak]: leak of ‘rtd’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#   50|       }
#   51|       rtd->subnodes = comps_hslist_create();
#   52|->     comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_objrtree_data_destroy_v);
#   53|       return rtd;
#   54|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
libcomps-0.1.23/libcomps/src/comps_objradix.c:110:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#  108|                                       ((COMPS_ObjRTreeData*)it->data)->key, NULL);
#  109|           if (((COMPS_ObjRTreeData*)it->data)->data != NULL)
#  110|->             new_data = comps_object_copy(((COMPS_ObjRTreeData*)it->data)->data);
#  111|           else
#  112|               new_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
libcomps-0.1.23/libcomps/src/comps_objradix.c:110:24: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objrtree_data_create(*(COMPS_ObjRTreeData *)it_24->data.key, 0)’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#  108|                                       ((COMPS_ObjRTreeData*)it->data)->key, NULL);
#  109|           if (((COMPS_ObjRTreeData*)it->data)->data != NULL)
#  110|->             new_data = comps_object_copy(((COMPS_ObjRTreeData*)it->data)->data);
#  111|           else
#  112|               new_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
libcomps-0.1.23/libcomps/src/comps_objradix.c:113:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#  111|           else
#  112|               new_data = NULL;
#  113|->         comps_hslist_destroy(&rtdata->subnodes);
#  114|           rtdata->subnodes = ((COMPS_ObjRTreeData*)it->data)->subnodes;
#  115|           rtdata->data = new_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
libcomps-0.1.23/libcomps/src/comps_objradix.c:113:9: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objrtree_data_create(*(COMPS_ObjRTreeData *)it_24->data.key, 0)’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#  111|           else
#  112|               new_data = NULL;
#  113|->         comps_hslist_destroy(&rtdata->subnodes);
#  114|           rtdata->subnodes = ((COMPS_ObjRTreeData*)it->data)->subnodes;
#  115|           rtdata->data = new_data;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def198]
libcomps-0.1.23/libcomps/src/comps_objradix.c:114:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#  112|               new_data = NULL;
#  113|           comps_hslist_destroy(&rtdata->subnodes);
#  114|->         rtdata->subnodes = ((COMPS_ObjRTreeData*)it->data)->subnodes;
#  115|           rtdata->data = new_data;
#  116|           comps_hslist_append(ret->subnodes, rtdata, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
libcomps-0.1.23/libcomps/src/comps_objradix.c:131:28: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#  129|                                         ((COMPS_ObjRTreeData*)it->data)->key, NULL);
#  130|               if (((COMPS_ObjRTreeData*)it->data)->data != NULL)
#  131|->                 new_data = comps_object_copy(((COMPS_ObjRTreeData*)it->data)->data);
#  132|               else
#  133|                   new_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
libcomps-0.1.23/libcomps/src/comps_objradix.c:131:28: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objrtree_data_create(*(COMPS_ObjRTreeData *)it_25->data.key, 0)’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#  129|                                         ((COMPS_ObjRTreeData*)it->data)->key, NULL);
#  130|               if (((COMPS_ObjRTreeData*)it->data)->data != NULL)
#  131|->                 new_data = comps_object_copy(((COMPS_ObjRTreeData*)it->data)->data);
#  132|               else
#  133|                   new_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def201]
libcomps-0.1.23/libcomps/src/comps_objradix.c:134:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#  132|               else
#  133|                   new_data = NULL;
#  134|->             comps_hslist_destroy(&rtdata->subnodes);
#  135|               rtdata->subnodes = ((COMPS_ObjRTreeData*)it->data)->subnodes;
#  136|               rtdata->data = new_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
libcomps-0.1.23/libcomps/src/comps_objradix.c:134:13: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objrtree_data_create(*(COMPS_ObjRTreeData *)it_25->data.key, 0)’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#  132|               else
#  133|                   new_data = NULL;
#  134|->             comps_hslist_destroy(&rtdata->subnodes);
#  135|               rtdata->subnodes = ((COMPS_ObjRTreeData*)it->data)->subnodes;
#  136|               rtdata->data = new_data;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def203]
libcomps-0.1.23/libcomps/src/comps_objradix.c:135:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libcomps-0.1.23/libcomps/src/comps_objradix.c:744:17: enter_function: entry to ‘comps_objrtree_union’
libcomps-0.1.23/libcomps/src/comps_objradix.c:746:11: call_function: calling ‘comps_objrtree_clone’ from ‘comps_objrtree_union’
#  133|                   new_data = NULL;
#  134|               comps_hslist_destroy(&rtdata->subnodes);
#  135|->             rtdata->subnodes = ((COMPS_ObjRTreeData*)it->data)->subnodes;
#  136|               rtdata->data = new_data;
#  137|               comps_hslist_append(new_subnodes, rtdata, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def204]
libcomps-0.1.23/libcomps/src/comps_objradix.c:372:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:457:6: enter_function: entry to ‘comps_objrtree_set_nx’
libcomps-0.1.23/libcomps/src/comps_objradix.c:459:5: call_function: calling ‘__comps_objrtree_set’ from ‘comps_objrtree_set_nx’
#  370|               rtd = comps_objrtree_data_create_n(key+offset, len-offset, ndata);
#  371|               if (!lesser) {
#  372|->                 comps_hslist_prepend(subnodes, rtd, 0);
#  373|               } else {
#  374|                   comps_hslist_insert_after(subnodes, lesser, rtd, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def205]
libcomps-0.1.23/libcomps/src/comps_objradix.c:372:17: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objrtree_data_create_n(key + offset,  len - offset,  ndata)’
libcomps-0.1.23/libcomps/src/comps_objradix.c:457:6: enter_function: entry to ‘comps_objrtree_set_nx’
libcomps-0.1.23/libcomps/src/comps_objradix.c:459:5: call_function: calling ‘__comps_objrtree_set’ from ‘comps_objrtree_set_nx’
#  370|               rtd = comps_objrtree_data_create_n(key+offset, len-offset, ndata);
#  371|               if (!lesser) {
#  372|->                 comps_hslist_prepend(subnodes, rtd, 0);
#  373|               } else {
#  374|                   comps_hslist_insert_after(subnodes, lesser, rtd, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def206]
libcomps-0.1.23/libcomps/src/comps_objradix.c:372:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  370|               rtd = comps_objrtree_data_create_n(key+offset, len-offset, ndata);
#  371|               if (!lesser) {
#  372|->                 comps_hslist_prepend(subnodes, rtd, 0);
#  373|               } else {
#  374|                   comps_hslist_insert_after(subnodes, lesser, rtd, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def207]
libcomps-0.1.23/libcomps/src/comps_objradix.c:374:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:457:6: enter_function: entry to ‘comps_objrtree_set_nx’
libcomps-0.1.23/libcomps/src/comps_objradix.c:459:5: call_function: calling ‘__comps_objrtree_set’ from ‘comps_objrtree_set_nx’
#  372|                   comps_hslist_prepend(subnodes, rtd, 0);
#  373|               } else {
#  374|->                 comps_hslist_insert_after(subnodes, lesser, rtd, 0);
#  375|               }
#  376|               rt->len++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
libcomps-0.1.23/libcomps/src/comps_objradix.c:374:17: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objrtree_data_create_n(key + offset,  len - offset,  ndata)’
libcomps-0.1.23/libcomps/src/comps_objradix.c:457:6: enter_function: entry to ‘comps_objrtree_set_nx’
libcomps-0.1.23/libcomps/src/comps_objradix.c:459:5: call_function: calling ‘__comps_objrtree_set’ from ‘comps_objrtree_set_nx’
#  372|                   comps_hslist_prepend(subnodes, rtd, 0);
#  373|               } else {
#  374|->                 comps_hslist_insert_after(subnodes, lesser, rtd, 0);
#  375|               }
#  376|               rt->len++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
libcomps-0.1.23/libcomps/src/comps_objradix.c:374:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  372|                   comps_hslist_prepend(subnodes, rtd, 0);
#  373|               } else {
#  374|->                 comps_hslist_insert_after(subnodes, lesser, rtd, 0);
#  375|               }
#  376|               rt->len++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
libcomps-0.1.23/libcomps/src/comps_objradix.c:388:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:712:29: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  386|               }
#  387|               if (ended == 3) { //keys equals; data replacement
#  388|->                 comps_object_destroy(rtdata->data);
#  389|                   rtdata->data = ndata;
#  390|                   return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
libcomps-0.1.23/libcomps/src/comps_objradix.c:388:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  386|               }
#  387|               if (ended == 3) { //keys equals; data replacement
#  388|->                 comps_object_destroy(rtdata->data);
#  389|                   rtdata->data = ndata;
#  390|                   return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
libcomps-0.1.23/libcomps/src/comps_objradix.c:397:39: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  395|                   rtd = comps_objrtree_data_create_n(key+offset, len-offset, ndata);
#  396|                   comps_hslist_append(subnodes, rtd, 0);
#  397|->                 ((COMPS_ObjRTreeData*)subnodes->last->data)->subnodes->last = it;
#  398|                   ((COMPS_ObjRTreeData*)subnodes->last->data)->subnodes->first = it;
#  399|                   _len = len - offset;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def213]
libcomps-0.1.23/libcomps/src/comps_objradix.c:397:39: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objrtree_data_create_n(key + offset,  len - offset,  ndata)’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  395|                   rtd = comps_objrtree_data_create_n(key+offset, len-offset, ndata);
#  396|                   comps_hslist_append(subnodes, rtd, 0);
#  397|->                 ((COMPS_ObjRTreeData*)subnodes->last->data)->subnodes->last = it;
#  398|                   ((COMPS_ObjRTreeData*)subnodes->last->data)->subnodes->first = it;
#  399|                   _len = len - offset;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
libcomps-0.1.23/libcomps/src/comps_objradix.c:423:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  421|                   if (cmpret > 0) {
#  422|                       rtd = comps_objrtree_data_create(rtdata->key+x, tmpdata);
#  423|->                     comps_hslist_destroy(&rtd->subnodes);
#  424|                       rtd->subnodes = tmphslist;
#  425|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
libcomps-0.1.23/libcomps/src/comps_objradix.c:423:21: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objrtree_data_create(*rtdata.key + (sizetype)x,  tmpdata)’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  421|                   if (cmpret > 0) {
#  422|                       rtd = comps_objrtree_data_create(rtdata->key+x, tmpdata);
#  423|->                     comps_hslist_destroy(&rtd->subnodes);
#  424|                       rtd->subnodes = tmphslist;
#  425|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def216]
libcomps-0.1.23/libcomps/src/comps_objradix.c:424:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  422|                       rtd = comps_objrtree_data_create(rtdata->key+x, tmpdata);
#  423|                       comps_hslist_destroy(&rtd->subnodes);
#  424|->                     rtd->subnodes = tmphslist;
#  425|   
#  426|                       comps_hslist_append(rtdata->subnodes,rtd, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def217]
libcomps-0.1.23/libcomps/src/comps_objradix.c:428:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  426|                       comps_hslist_append(rtdata->subnodes,rtd, 0);
#  427|                       rtd = comps_objrtree_data_create(key+offset+x, ndata);
#  428|->                     comps_hslist_append(rtdata->subnodes, rtd, 0);
#  429|   
#  430|                   } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
libcomps-0.1.23/libcomps/src/comps_objradix.c:428:21: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objrtree_data_create(key + ((sizetype)x + offset), ndata)’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  426|                       comps_hslist_append(rtdata->subnodes,rtd, 0);
#  427|                       rtd = comps_objrtree_data_create(key+offset+x, ndata);
#  428|->                     comps_hslist_append(rtdata->subnodes, rtd, 0);
#  429|   
#  430|                   } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
libcomps-0.1.23/libcomps/src/comps_objradix.c:433:60: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  431|                       rtd = comps_objrtree_data_create(key+offset+x, ndata);
#  432|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  433|->                     rtd = comps_objrtree_data_create(rtdata->key+x, tmpdata);
#  434|                       comps_hslist_destroy(&rtd->subnodes);
#  435|                       rtd->subnodes = tmphslist;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def220]
libcomps-0.1.23/libcomps/src/comps_objradix.c:433:60: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_objrtree_data_create(key + ((sizetype)x + offset), ndata)’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  431|                       rtd = comps_objrtree_data_create(key+offset+x, ndata);
#  432|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  433|->                     rtd = comps_objrtree_data_create(rtdata->key+x, tmpdata);
#  434|                       comps_hslist_destroy(&rtd->subnodes);
#  435|                       rtd->subnodes = tmphslist;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def221]
libcomps-0.1.23/libcomps/src/comps_objradix.c:435:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  433|                       rtd = comps_objrtree_data_create(rtdata->key+x, tmpdata);
#  434|                       comps_hslist_destroy(&rtd->subnodes);
#  435|->                     rtd->subnodes = tmphslist;
#  436|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  437|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def222]
libcomps-0.1.23/libcomps/src/comps_objradix.c:451:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:712:29: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  449|   }
#  450|   void comps_objrtree_set(COMPS_ObjRTree *rt, char *key, COMPS_Object *data) {
#  451|->     __comps_objrtree_set(rt, key, strlen(key), comps_object_incref(data));
#  452|   }
#  453|   void comps_objrtree_set_n(COMPS_ObjRTree *rt, char *key, size_t len,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
libcomps-0.1.23/libcomps/src/comps_objradix.c:451:5: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#  449|   }
#  450|   void comps_objrtree_set(COMPS_ObjRTree *rt, char *key, COMPS_Object *data) {
#  451|->     __comps_objrtree_set(rt, key, strlen(key), comps_object_incref(data));
#  452|   }
#  453|   void comps_objrtree_set_n(COMPS_ObjRTree *rt, char *key, size_t len,

Error: GCC_ANALYZER_WARNING (CWE-688): [#def224]
libcomps-0.1.23/libcomps/src/comps_objradix.c:451:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘key’ where non-null expected
libcomps-0.1.23/libcomps/src/comps_objradix.c:683:6: enter_function: entry to ‘comps_objrtree_unite’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:712:29: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_objradix.c:728:21: call_function: calling ‘comps_objrtree_set’ from ‘comps_objrtree_unite’
#argument 1 of ‘__builtin_strlen’ must be non-null
#  449|   }
#  450|   void comps_objrtree_set(COMPS_ObjRTree *rt, char *key, COMPS_Object *data) {
#  451|->     __comps_objrtree_set(rt, key, strlen(key), comps_object_incref(data));
#  452|   }
#  453|   void comps_objrtree_set_n(COMPS_ObjRTree *rt, char *key, size_t len,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
libcomps-0.1.23/libcomps/src/comps_objradix.c:607:9: warning[-Wanalyzer-malloc-leak]: leak of ‘relation’
libcomps-0.1.23/libcomps/src/comps_objradix.c:535:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:537:14: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:537:36: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:538:39: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:543:12: branch_false: following ‘false’ branch (when ‘found != 0’)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:547:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:556:12: branch_false: following ‘false’ branch (when ‘ended != 3’)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:595:17: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:595:17: branch_true: following ‘true’ branch (when ‘ended == 1’)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:595:30: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:600:25: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:600:12: branch_false: following ‘false’ branch (when ‘relation’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:604:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:607:9: danger: ‘relation’ leaks here; was allocated at [(11)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/10)
#  605|           relation->parent_nodes = subnodes;
#  606|           relation->child_it = it;
#  607|->         comps_hslist_append(path, (void*)relation, 0);
#  608|       }
#  609|       comps_hslist_destroy(&path);

Error: CPPCHECK_WARNING (CWE-476): [#def226]
libcomps-0.1.23/libcomps/src/comps_objradix.c:643: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  641|       for (hsit = rt->subnodes->first; hsit != NULL; hsit = hsit->next) {
#  642|           pair = malloc(sizeof(struct Pair));
#  643|->         pair->key = __comps_strcpy(((COMPS_ObjRTreeData*)hsit->data)->key);
#  644|           pair->data = ((COMPS_ObjRTreeData*)hsit->data)->data;
#  645|           pair->subnodes = ((COMPS_ObjRTreeData*)hsit->data)->subnodes;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def227]
libcomps-0.1.23/libcomps/src/comps_objradix.c:643:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:641:38: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:642:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:642:16: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_objradix.c:643:9: danger: ‘pair’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/2)
#  641|       for (hsit = rt->subnodes->first; hsit != NULL; hsit = hsit->next) {
#  642|           pair = malloc(sizeof(struct Pair));
#  643|->         pair->key = __comps_strcpy(((COMPS_ObjRTreeData*)hsit->data)->key);
#  644|           pair->data = ((COMPS_ObjRTreeData*)hsit->data)->data;
#  645|           pair->subnodes = ((COMPS_ObjRTreeData*)hsit->data)->subnodes;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def228]
libcomps-0.1.23/libcomps/src/comps_objradix.c:643:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:641:38: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:642:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:642:16: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:643:21: danger: ‘pair’ leaks here; was allocated at [(3)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/2)
#  641|       for (hsit = rt->subnodes->first; hsit != NULL; hsit = hsit->next) {
#  642|           pair = malloc(sizeof(struct Pair));
#  643|->         pair->key = __comps_strcpy(((COMPS_ObjRTreeData*)hsit->data)->key);
#  644|           pair->data = ((COMPS_ObjRTreeData*)hsit->data)->data;
#  645|           pair->subnodes = ((COMPS_ObjRTreeData*)hsit->data)->subnodes;

Error: CPPCHECK_WARNING (CWE-476): [#def229]
libcomps-0.1.23/libcomps/src/comps_objradix.c:644: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  642|           pair = malloc(sizeof(struct Pair));
#  643|           pair->key = __comps_strcpy(((COMPS_ObjRTreeData*)hsit->data)->key);
#  644|->         pair->data = ((COMPS_ObjRTreeData*)hsit->data)->data;
#  645|           pair->subnodes = ((COMPS_ObjRTreeData*)hsit->data)->subnodes;
#  646|           comps_hslist_append(to_process, pair, 0);

Error: CPPCHECK_WARNING (CWE-476): [#def230]
libcomps-0.1.23/libcomps/src/comps_objradix.c:645: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  643|           pair->key = __comps_strcpy(((COMPS_ObjRTreeData*)hsit->data)->key);
#  644|           pair->data = ((COMPS_ObjRTreeData*)hsit->data)->data;
#  645|->         pair->subnodes = ((COMPS_ObjRTreeData*)hsit->data)->subnodes;
#  646|           comps_hslist_append(to_process, pair, 0);
#  647|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
libcomps-0.1.23/libcomps/src/comps_objradix.c:646:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:641:38: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:642:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:642:16: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:646:9: danger: ‘pair’ leaks here; was allocated at [(3)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/2)
#  644|           pair->data = ((COMPS_ObjRTreeData*)hsit->data)->data;
#  645|           pair->subnodes = ((COMPS_ObjRTreeData*)hsit->data)->subnodes;
#  646|->         comps_hslist_append(to_process, pair, 0);
#  647|       }
#  648|       while (to_process->first) {

Error: GCC_ANALYZER_WARNING (CWE-416): [#def232]
libcomps-0.1.23/libcomps/src/comps_objradix.c:650:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘*to_process.first’
libcomps-0.1.23/libcomps/src/comps_objradix.c:648:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:650:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:653:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:665:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:666:14: branch_false: following ‘false’ branch (when ‘hsit’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:674:14: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:676:9: release_memory: freed here
libcomps-0.1.23/libcomps/src/comps_objradix.c:648:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:650:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:650:9: danger: use after ‘free’ of ‘*to_process.first’; freed at [(7)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/6)
#  648|       while (to_process->first) {
#  649|           //oldpair = current_pair;
#  650|->         current_pair = to_process->first->data;
#  651|           oldit = to_process->first;
#  652|           comps_hslist_remove(to_process, to_process->first);

Error: GCC_ANALYZER_WARNING (CWE-416): [#def233]
libcomps-0.1.23/libcomps/src/comps_objradix.c:653:13: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘current_pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:648:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:650:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:653:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:665:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:666:14: branch_false: following ‘false’ branch (when ‘hsit’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:674:14: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:675:9: release_memory: freed here
libcomps-0.1.23/libcomps/src/comps_objradix.c:648:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:650:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:653:13: danger: use after ‘free’ of ‘current_pair’; freed at [(8)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/7)
#  651|           oldit = to_process->first;
#  652|           comps_hslist_remove(to_process, to_process->first);
#  653|->         if (current_pair->data) {
#  654|               if (keyvalpair == 0) {
#  655|                   comps_hslist_append(ret, __comps_strcpy(current_pair->key), 0);

Error: CPPCHECK_WARNING (CWE-476): [#def234]
libcomps-0.1.23/libcomps/src/comps_objradix.c:660: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rtpair
#  658|               } else {
#  659|                   rtpair = malloc(sizeof(COMPS_ObjRTreePair));
#  660|->                 rtpair->key = __comps_strcpy(current_pair->key);
#  661|                   rtpair->data = current_pair->data;
#  662|                   comps_hslist_append(ret, rtpair, 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def235]
libcomps-0.1.23/libcomps/src/comps_objradix.c:660:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rtpair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:648:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:650:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:653:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:654:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:654:16: branch_false: following ‘false’ branch (when ‘keyvalpair != 0’)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:656:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:656:23: branch_false: following ‘false’ branch (when ‘keyvalpair != 1’)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:659:26: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:659:26: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_objradix.c:660:17: danger: ‘rtpair’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/8)
#  658|               } else {
#  659|                   rtpair = malloc(sizeof(COMPS_ObjRTreePair));
#  660|->                 rtpair->key = __comps_strcpy(current_pair->key);
#  661|                   rtpair->data = current_pair->data;
#  662|                   comps_hslist_append(ret, rtpair, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def236]
libcomps-0.1.23/libcomps/src/comps_objradix.c:660:31: warning[-Wanalyzer-malloc-leak]: leak of ‘rtpair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:648:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:650:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:653:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:654:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:654:16: branch_false: following ‘false’ branch (when ‘keyvalpair != 0’)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:656:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:656:23: branch_false: following ‘false’ branch (when ‘keyvalpair != 1’)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:659:26: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:659:26: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:660:31: danger: ‘rtpair’ leaks here; was allocated at [(9)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/8)
#  658|               } else {
#  659|                   rtpair = malloc(sizeof(COMPS_ObjRTreePair));
#  660|->                 rtpair->key = __comps_strcpy(current_pair->key);
#  661|                   rtpair->data = current_pair->data;
#  662|                   comps_hslist_append(ret, rtpair, 0);

Error: CPPCHECK_WARNING (CWE-476): [#def237]
libcomps-0.1.23/libcomps/src/comps_objradix.c:661: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rtpair
#  659|                   rtpair = malloc(sizeof(COMPS_ObjRTreePair));
#  660|                   rtpair->key = __comps_strcpy(current_pair->key);
#  661|->                 rtpair->data = current_pair->data;
#  662|                   comps_hslist_append(ret, rtpair, 0);
#  663|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def238]
libcomps-0.1.23/libcomps/src/comps_objradix.c:662:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rtpair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:648:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:650:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:653:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:654:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:654:16: branch_false: following ‘false’ branch (when ‘keyvalpair != 0’)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:656:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:656:23: branch_false: following ‘false’ branch (when ‘keyvalpair != 1’)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:659:26: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:659:26: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:662:17: danger: ‘rtpair’ leaks here; was allocated at [(9)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/8)
#  660|                   rtpair->key = __comps_strcpy(current_pair->key);
#  661|                   rtpair->data = current_pair->data;
#  662|->                 comps_hslist_append(ret, rtpair, 0);
#  663|               }
#  664|           }

Error: CPPCHECK_WARNING (CWE-476): [#def239]
libcomps-0.1.23/libcomps/src/comps_objradix.c:668: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  666|                hsit != NULL; hsit = hsit->next, x++) {
#  667|               pair = malloc(sizeof(struct Pair));
#  668|->             pair->key = __comps_strcat(current_pair->key,
#  669|                                          ((COMPS_ObjRTreeData*)hsit->data)->key);
#  670|               pair->data = ((COMPS_ObjRTreeData*)hsit->data)->data;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def240]
libcomps-0.1.23/libcomps/src/comps_objradix.c:668:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:648:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:650:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:653:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:665:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:666:14: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:667:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:667:20: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_objradix.c:668:13: danger: ‘pair’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/6)
#  666|                hsit != NULL; hsit = hsit->next, x++) {
#  667|               pair = malloc(sizeof(struct Pair));
#  668|->             pair->key = __comps_strcat(current_pair->key,
#  669|                                          ((COMPS_ObjRTreeData*)hsit->data)->key);
#  670|               pair->data = ((COMPS_ObjRTreeData*)hsit->data)->data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def241]
libcomps-0.1.23/libcomps/src/comps_objradix.c:668:25: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:648:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:650:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:653:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:665:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:666:14: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:667:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:667:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:668:25: danger: ‘pair’ leaks here; was allocated at [(7)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/6)
#  666|                hsit != NULL; hsit = hsit->next, x++) {
#  667|               pair = malloc(sizeof(struct Pair));
#  668|->             pair->key = __comps_strcat(current_pair->key,
#  669|                                          ((COMPS_ObjRTreeData*)hsit->data)->key);
#  670|               pair->data = ((COMPS_ObjRTreeData*)hsit->data)->data;

Error: CPPCHECK_WARNING (CWE-476): [#def242]
libcomps-0.1.23/libcomps/src/comps_objradix.c:670: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  668|               pair->key = __comps_strcat(current_pair->key,
#  669|                                          ((COMPS_ObjRTreeData*)hsit->data)->key);
#  670|->             pair->data = ((COMPS_ObjRTreeData*)hsit->data)->data;
#  671|               pair->subnodes = ((COMPS_ObjRTreeData*)hsit->data)->subnodes;
#  672|               comps_hslist_insert_at(to_process, x, pair, 0);

Error: CPPCHECK_WARNING (CWE-476): [#def243]
libcomps-0.1.23/libcomps/src/comps_objradix.c:671: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  669|                                          ((COMPS_ObjRTreeData*)hsit->data)->key);
#  670|               pair->data = ((COMPS_ObjRTreeData*)hsit->data)->data;
#  671|->             pair->subnodes = ((COMPS_ObjRTreeData*)hsit->data)->subnodes;
#  672|               comps_hslist_insert_at(to_process, x, pair, 0);
#  673|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def244]
libcomps-0.1.23/libcomps/src/comps_objradix.c:672:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:648:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:650:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:653:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:665:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:666:14: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:667:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:667:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:672:13: danger: ‘pair’ leaks here; was allocated at [(7)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/6)
#  670|               pair->data = ((COMPS_ObjRTreeData*)hsit->data)->data;
#  671|               pair->subnodes = ((COMPS_ObjRTreeData*)hsit->data)->subnodes;
#  672|->             comps_hslist_insert_at(to_process, x, pair, 0);
#  673|           }
#  674|           free(current_pair->key);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def245]
libcomps-0.1.23/libcomps/src/comps_objradix.c:674:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘((struct Pair)*(void *)((void *)current_pair)).key’
libcomps-0.1.23/libcomps/src/comps_objradix.c:752:15: enter_function: entry to ‘comps_objrtree_keys’
libcomps-0.1.23/libcomps/src/comps_objradix.c:753:12: call_function: calling ‘__comps_objrtree_all’ from ‘comps_objrtree_keys’
#  672|               comps_hslist_insert_at(to_process, x, pair, 0);
#  673|           }
#  674|->         free(current_pair->key);
#  675|           free(current_pair);
#  676|           free(oldit);

Error: CPPCHECK_WARNING (CWE-476): [#def246]
libcomps-0.1.23/libcomps/src/comps_objradix.c:692: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  690|   
#  691|       pair = malloc(sizeof(struct Pair));
#  692|->     pair->subnodes = rt2->subnodes;
#  693|       pair->key = NULL;
#  694|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def247]
libcomps-0.1.23/libcomps/src/comps_objradix.c:692:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:691:12: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_objradix.c:692:5: danger: ‘pair’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/0)
#  690|   
#  691|       pair = malloc(sizeof(struct Pair));
#  692|->     pair->subnodes = rt2->subnodes;
#  693|       pair->key = NULL;
#  694|   

Error: CPPCHECK_WARNING (CWE-476): [#def248]
libcomps-0.1.23/libcomps/src/comps_objradix.c:693: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  691|       pair = malloc(sizeof(struct Pair));
#  692|       pair->subnodes = rt2->subnodes;
#  693|->     pair->key = NULL;
#  694|   
#  695|       tmplist = comps_hslist_create();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def249]
libcomps-0.1.23/libcomps/src/comps_objradix.c:695:15: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:691:12: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:695:15: danger: ‘pair’ leaks here; was allocated at [(1)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/0)
#  693|       pair->key = NULL;
#  694|   
#  695|->     tmplist = comps_hslist_create();
#  696|       comps_hslist_init(tmplist, NULL, NULL, &free);
#  697|       comps_hslist_append(tmplist, pair, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
libcomps-0.1.23/libcomps/src/comps_objradix.c:696:5: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:691:12: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:696:5: danger: ‘pair’ leaks here; was allocated at [(1)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/0)
#  694|   
#  695|       tmplist = comps_hslist_create();
#  696|->     comps_hslist_init(tmplist, NULL, NULL, &free);
#  697|       comps_hslist_append(tmplist, pair, 0);
#  698|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def251]
libcomps-0.1.23/libcomps/src/comps_objradix.c:697:5: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:691:12: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:697:5: danger: ‘pair’ leaks here; was allocated at [(1)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/0)
#  695|       tmplist = comps_hslist_create();
#  696|       comps_hslist_init(tmplist, NULL, NULL, &free);
#  697|->     comps_hslist_append(tmplist, pair, 0);
#  698|   
#  699|       while (tmplist->first != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-416): [#def252]
libcomps-0.1.23/libcomps/src/comps_objradix.c:702:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘**tmplist.first.data’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:739:9: release_memory: freed here
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:702:9: danger: use after ‘free’ of ‘*tmplist.95_41->first.data’; freed at [(4)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/3)
#  700|           it = tmplist->first;
#  701|           comps_hslist_remove(tmplist, tmplist->first);
#  702|->         tmp_subnodes = ((struct Pair*)it->data)->subnodes;
#  703|           parent_pair = (struct Pair*) it->data;
#  704|           //printf("key-part:%s\n", parent_pair->key);

Error: CPPCHECK_WARNING (CWE-476): [#def253]
libcomps-0.1.23/libcomps/src/comps_objradix.c:709: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  707|           for (it = tmp_subnodes->first; it != NULL; it=it->next) {
#  708|               pair = malloc(sizeof(struct Pair));
#  709|->             pair->subnodes = ((COMPS_ObjRTreeData*)it->data)->subnodes;
#  710|   
#  711|               if (parent_pair->key != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def254]
libcomps-0.1.23/libcomps/src/comps_objradix.c:709:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_objradix.c:709:13: danger: ‘pair’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/4)
#  707|           for (it = tmp_subnodes->first; it != NULL; it=it->next) {
#  708|               pair = malloc(sizeof(struct Pair));
#  709|->             pair->subnodes = ((COMPS_ObjRTreeData*)it->data)->subnodes;
#  710|   
#  711|               if (parent_pair->key != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
libcomps-0.1.23/libcomps/src/comps_objradix.c:732:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:712:29: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:727:16: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:731:39: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:732:17: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/4)
#  730|               }
#  731|               if (((COMPS_ObjRTreeData*)it->data)->subnodes->first) {
#  732|->                 comps_hslist_append(tmplist, pair, 0);
#  733|               } else {
#  734|                   free(pair->key);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
libcomps-0.1.23/libcomps/src/comps_objradix.c:732:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:708:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_objradix.c:727:16: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:731:39: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:732:17: danger: ‘pair’ leaks here; was allocated at [(5)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/4)
#  730|               }
#  731|               if (((COMPS_ObjRTreeData*)it->data)->subnodes->first) {
#  732|->                 comps_hslist_append(tmplist, pair, 0);
#  733|               } else {
#  734|                   free(pair->key);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def257]
libcomps-0.1.23/libcomps/src/comps_objradix.c:738:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘((struct Pair)*(void *)**tmplist.first.data).key’
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:738:9: release_memory: first ‘free’ here
libcomps-0.1.23/libcomps/src/comps_objradix.c:699:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_objradix.c:701:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:707:40: branch_false: following ‘false’ branch (when ‘it’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_objradix.c:738:14: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_objradix.c:738:9: danger: second ‘free’ here; first ‘free’ was at [(3)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/2)
#  736|               }
#  737|           }
#  738|->         free(parent_pair->key);
#  739|           free(parent_pair);
#  740|       }

Error: COMPILER_WARNING (CWE-563): [#def258]
libcomps-0.1.23/libcomps/src/comps_parse.c: scope_hint: In function ‘comps_parse_start_doctype’
libcomps-0.1.23/libcomps/src/comps_parse.c:133:36: warning[-Wunused-parameter]: unused parameter ‘standalone’
#  133 |                                int standalone) {
#      |                                ~~~~^~~~~~~~~~
#  131|                                  const XML_Char *sysid,
#  132|                                  const XML_Char *pubid,
#  133|->                                int standalone) {
#  134|       #define parsed ((COMPS_Parsed*)userData)
#  135|       parsed->doctype_name = comps_str(doctypeName);

Error: COMPILER_WARNING (CWE-704): [#def259]
libcomps-0.1.23/libcomps/src/comps_parse.c: scope_hint: In function ‘comps_parse_validate_dtd’
libcomps-0.1.23/libcomps/src/comps_parse.c:168:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  168 |         err = xmlGetLastError();
#      |             ^
#  166|       ret = xmlValidateDtd(vctxt, fptr, dtd_ptr);
#  167|       if (!ret) {
#  168|->         err = xmlGetLastError();
#  169|           printf("%s\n", err->message);
#  170|           ret = -err->code;

Error: COMPILER_WARNING (CWE-704): [#def260]
libcomps-0.1.23/libcomps/src/comps_parse.c:168:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  166|       ret = xmlValidateDtd(vctxt, fptr, dtd_ptr);
#  167|       if (!ret) {
#  168|->         err = xmlGetLastError();
#  169|           printf("%s\n", err->message);
#  170|           ret = -err->code;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def261]
libcomps-0.1.23/libcomps/src/comps_parse.c:293:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘alltext’
libcomps-0.1.23/libcomps/src/comps_parse.c:287:8: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_parse.c:288:39: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:288:19: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_parse.c:289:12: release_memory: assuming ‘alltext’ is NULL
libcomps-0.1.23/libcomps/src/comps_parse.c:289:12: branch_true: following ‘true’ branch (when ‘alltext’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_parse.c:290:13: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:293:9: danger: dereference of NULL ‘alltext’
#  291|               raise(SIGABRT);
#  292|           }
#  293|->         alltext[0]=0;
#  294|       }
#  295|       while ((data = comps_hslist_shift(parsed->text_buffer)) != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def262]
libcomps-0.1.23/libcomps/src/comps_parse.c:295:20: warning[-Wanalyzer-malloc-leak]: leak of ‘alltext’
libcomps-0.1.23/libcomps/src/comps_parse.c:287:8: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_parse.c:288:39: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:288:19: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_parse.c:289:12: branch_false: following ‘false’ branch (when ‘alltext’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_parse.c:293:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:295:20: danger: ‘alltext’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  293|           alltext[0]=0;
#  294|       }
#  295|->     while ((data = comps_hslist_shift(parsed->text_buffer)) != NULL) {
#  296|           //item_len = strlen((char*)data);
#  297|           alltext = strcat(alltext, data);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def263]
libcomps-0.1.23/libcomps/src/comps_parse.c:297:19: warning[-Wanalyzer-null-argument]: use of NULL ‘alltext’ where non-null expected
libcomps-0.1.23/libcomps/src/comps_parse.c:287:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:295:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_parse.c:297:19: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:297:19: danger: argument 1 (‘alltext’) NULL where non-null expected
#argument 1 of ‘__builtin_strcat’ must be non-null
#  295|       while ((data = comps_hslist_shift(parsed->text_buffer)) != NULL) {
#  296|           //item_len = strlen((char*)data);
#  297|->         alltext = strcat(alltext, data);
#  298|           free(data);
#  299|           //index += item_len;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def264]
libcomps-0.1.23/libcomps/src/comps_parse.c:434:5: warning[-Wanalyzer-malloc-leak]: leak of ‘c’
libcomps-0.1.23/libcomps/src/comps_parse.c:421:14: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_parse.c:421:8: branch_false: following ‘false’ branch (when ‘c’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_parse.c:429:5: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:434:5: danger: ‘c’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  432|       ((COMPS_Parsed*)userData)->text_buffer_len += len;
#  433|   
#  434|->     comps_hslist_append(((COMPS_Parsed*)userData)->text_buffer, c, 0);
#  435|   
#  436|   }

Error: GCC_ANALYZER_WARNING (CWE-416): [#def265]
libcomps-0.1.23/libcomps/src/comps_parse.c:449:31: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘it’
libcomps-0.1.23/libcomps/src/comps_parse.c:447:20: branch_true: following ‘true’ branch (when ‘attr_count > x’)...
libcomps-0.1.23/libcomps/src/comps_parse.c:448:41: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:448:50: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_parse.c:449:41: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:449:16: branch_true: following ‘true’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/src/comps_parse.c:450:21: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:459:17: release_memory: freed here
libcomps-0.1.23/libcomps/src/comps_parse.c:447:20: branch_true: following ‘true’ branch (when ‘attr_count > x’)...
libcomps-0.1.23/libcomps/src/comps_parse.c:448:41: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:448:50: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_parse.c:449:41: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:449:31: danger: use after ‘free’ of ‘it’; freed at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  447|       for (int x =0; x<attr_count; x++) {
#  448|           for (COMPS_HSListItem *it = keys->first; it != NULL; it = it->next) {
#  449|->             if (strcmp((char*)it->data, info->attributes[x]->name) == 0) {
#  450|                   if (info->attributes[x]->val_check) {
#  451|                       val = comps_dict_get(elem->attrs, it->data);

Error: GCC_ANALYZER_WARNING (CWE-416): [#def266]
libcomps-0.1.23/libcomps/src/comps_parse.c:466:39: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘it’
libcomps-0.1.23/libcomps/src/comps_parse.c:447:20: branch_true: following ‘true’ branch (when ‘attr_count > x’)...
libcomps-0.1.23/libcomps/src/comps_parse.c:448:41: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:448:50: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_parse.c:449:41: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:449:16: branch_true: following ‘true’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/src/comps_parse.c:450:21: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:459:17: release_memory: freed here
libcomps-0.1.23/libcomps/src/comps_parse.c:447:20: branch_false: following ‘false’ branch (when ‘attr_count <= x’)...
libcomps-0.1.23/libcomps/src/comps_parse.c:464:37: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:464:46: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_parse.c:468:39: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_parse.c:466:39: danger: use after ‘free’ of ‘it’; freed at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  464|       for (COMPS_HSListItem *it = keys->first; it != NULL; it = it->next) {
#  465|           comps_log_warning_x(parsed->log, COMPS_ERR_ATTR_UNKNOWN, 4,
#  466|->                             comps_str(it->data), comps_str(info->name),
#  467|                               comps_num(XML_GetCurrentLineNumber(parsed->parser)),
#  468|                               comps_num(XML_GetCurrentColumnNumber(parsed->parser)));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def267]
libcomps-0.1.23/libcomps/src/comps_radix.c:54:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#   52|       }
#   53|       rtd->data_destructor = &rt->data_destructor;
#   54|->     rtd->subnodes = comps_hslist_create();
#   55|       comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_rtree_data_destroy_v);
#   56|       return rtd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
libcomps-0.1.23/libcomps/src/comps_radix.c:54:21: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_create(*rt.data_constructor, *rt.data_cloner, *rt.data_destructor)’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#   52|       }
#   53|       rtd->data_destructor = &rt->data_destructor;
#   54|->     rtd->subnodes = comps_hslist_create();
#   55|       comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_rtree_data_destroy_v);
#   56|       return rtd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def269]
libcomps-0.1.23/libcomps/src/comps_radix.c:54:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#   52|       }
#   53|       rtd->data_destructor = &rt->data_destructor;
#   54|->     rtd->subnodes = comps_hslist_create();
#   55|       comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_rtree_data_destroy_v);
#   56|       return rtd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
libcomps-0.1.23/libcomps/src/comps_radix.c:54:21: warning[-Wanalyzer-malloc-leak]: leak of ‘rtd’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#   52|       }
#   53|       rtd->data_destructor = &rt->data_destructor;
#   54|->     rtd->subnodes = comps_hslist_create();
#   55|       comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_rtree_data_destroy_v);
#   56|       return rtd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def271]
libcomps-0.1.23/libcomps/src/comps_radix.c:55:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#   53|       rtd->data_destructor = &rt->data_destructor;
#   54|       rtd->subnodes = comps_hslist_create();
#   55|->     comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_rtree_data_destroy_v);
#   56|       return rtd;
#   57|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
libcomps-0.1.23/libcomps/src/comps_radix.c:55:5: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_create(*rt.data_constructor, *rt.data_cloner, *rt.data_destructor)’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#   53|       rtd->data_destructor = &rt->data_destructor;
#   54|       rtd->subnodes = comps_hslist_create();
#   55|->     comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_rtree_data_destroy_v);
#   56|       return rtd;
#   57|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
libcomps-0.1.23/libcomps/src/comps_radix.c:55:5: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#   53|       rtd->data_destructor = &rt->data_destructor;
#   54|       rtd->subnodes = comps_hslist_create();
#   55|->     comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_rtree_data_destroy_v);
#   56|       return rtd;
#   57|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
libcomps-0.1.23/libcomps/src/comps_radix.c:55:5: warning[-Wanalyzer-malloc-leak]: leak of ‘rtd’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#   53|       rtd->data_destructor = &rt->data_destructor;
#   54|       rtd->subnodes = comps_hslist_create();
#   55|->     comps_hslist_init(rtd->subnodes, NULL, NULL, &comps_rtree_data_destroy_v);
#   56|       return rtd;
#   57|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
libcomps-0.1.23/libcomps/src/comps_radix.c:79:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#   77|       if ((ret = malloc(sizeof(COMPS_RTree))) == NULL)
#   78|           return NULL;
#   79|->     ret->subnodes = comps_hslist_create();
#   80|       comps_hslist_init(ret->subnodes, NULL, NULL, &comps_rtree_data_destroy_v);
#   81|       if (ret->subnodes == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
libcomps-0.1.23/libcomps/src/comps_radix.c:80:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#   78|           return NULL;
#   79|       ret->subnodes = comps_hslist_create();
#   80|->     comps_hslist_init(ret->subnodes, NULL, NULL, &comps_rtree_data_destroy_v);
#   81|       if (ret->subnodes == NULL) {
#   82|           free(ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def277]
libcomps-0.1.23/libcomps/src/comps_radix.c:125:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  123|                                         ((COMPS_RTreeData*)it->data)->key, NULL);
#  124|           if (((COMPS_RTreeData*)it->data)->data != NULL)
#  125|->             new_data = rt->data_cloner(((COMPS_RTreeData*)it->data)->data);
#  126|           else
#  127|               new_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
libcomps-0.1.23/libcomps/src/comps_radix.c:125:24: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_create(*rt.data_constructor, *rt.data_cloner, *rt.data_destructor)’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  123|                                         ((COMPS_RTreeData*)it->data)->key, NULL);
#  124|           if (((COMPS_RTreeData*)it->data)->data != NULL)
#  125|->             new_data = rt->data_cloner(((COMPS_RTreeData*)it->data)->data);
#  126|           else
#  127|               new_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def279]
libcomps-0.1.23/libcomps/src/comps_radix.c:125:24: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_data_create(comps_rtree_create(*rt.data_constructor, *rt.data_cloner, *rt.data_destructor), *(COMPS_RTreeData *)it_28->data.key, 0)’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  123|                                         ((COMPS_RTreeData*)it->data)->key, NULL);
#  124|           if (((COMPS_RTreeData*)it->data)->data != NULL)
#  125|->             new_data = rt->data_cloner(((COMPS_RTreeData*)it->data)->data);
#  126|           else
#  127|               new_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
libcomps-0.1.23/libcomps/src/comps_radix.c:128:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  126|           else
#  127|               new_data = NULL;
#  128|->         comps_hslist_destroy(&rtdata->subnodes);
#  129|           rtdata->subnodes = ((COMPS_RTreeData*)it->data)->subnodes;
#  130|           rtdata->data = new_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
libcomps-0.1.23/libcomps/src/comps_radix.c:128:9: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_data_create(comps_rtree_create(*rt.data_constructor, *rt.data_cloner, *rt.data_destructor), *(COMPS_RTreeData *)it_28->data.key, 0)’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  126|           else
#  127|               new_data = NULL;
#  128|->         comps_hslist_destroy(&rtdata->subnodes);
#  129|           rtdata->subnodes = ((COMPS_RTreeData*)it->data)->subnodes;
#  130|           rtdata->data = new_data;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def282]
libcomps-0.1.23/libcomps/src/comps_radix.c:129:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  127|               new_data = NULL;
#  128|           comps_hslist_destroy(&rtdata->subnodes);
#  129|->         rtdata->subnodes = ((COMPS_RTreeData*)it->data)->subnodes;
#  130|           rtdata->data = new_data;
#  131|           comps_hslist_append(ret->subnodes, rtdata, 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def283]
libcomps-0.1.23/libcomps/src/comps_radix.c:131:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  129|           rtdata->subnodes = ((COMPS_RTreeData*)it->data)->subnodes;
#  130|           rtdata->data = new_data;
#  131|->         comps_hslist_append(ret->subnodes, rtdata, 0);
#  132|   
#  133|           comps_hslist_append(to_clone, rtdata, 0);

Error: GCC_ANALYZER_WARNING (CWE-416): [#def284]
libcomps-0.1.23/libcomps/src/comps_radix.c:139:38: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘*to_clone.first’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  137|       while (to_clone->first) {
#  138|           it2 = to_clone->first;
#  139|->         tmplist = ((COMPS_RTreeData*)it2->data)->subnodes;
#  140|           comps_hslist_remove(to_clone, to_clone->first);
#  141|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
libcomps-0.1.23/libcomps/src/comps_radix.c:140:9: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_create(*rt.data_constructor, *rt.data_cloner, *rt.data_destructor)’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  138|           it2 = to_clone->first;
#  139|           tmplist = ((COMPS_RTreeData*)it2->data)->subnodes;
#  140|->         comps_hslist_remove(to_clone, to_clone->first);
#  141|   
#  142|           new_subnodes = comps_hslist_create();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
libcomps-0.1.23/libcomps/src/comps_radix.c:142:24: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_create(*rt.data_constructor, *rt.data_cloner, *rt.data_destructor)’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  140|           comps_hslist_remove(to_clone, to_clone->first);
#  141|   
#  142|->         new_subnodes = comps_hslist_create();
#  143|           comps_hslist_init(new_subnodes, NULL, NULL, &comps_rtree_data_destroy_v);
#  144|           for (it = tmplist->first; it != NULL; it = it->next) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
libcomps-0.1.23/libcomps/src/comps_radix.c:143:9: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_create(*rt.data_constructor, *rt.data_cloner, *rt.data_destructor)’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  141|   
#  142|           new_subnodes = comps_hslist_create();
#  143|->         comps_hslist_init(new_subnodes, NULL, NULL, &comps_rtree_data_destroy_v);
#  144|           for (it = tmplist->first; it != NULL; it = it->next) {
#  145|               rtdata = comps_rtree_data_create(ret,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
libcomps-0.1.23/libcomps/src/comps_radix.c:148:28: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  146|                                         ((COMPS_RTreeData*)it->data)->key, NULL);
#  147|               if (((COMPS_RTreeData*)it->data)->data != NULL)
#  148|->                 new_data = rt->data_cloner(((COMPS_RTreeData*)it->data)->data);
#  149|               else
#  150|                   new_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
libcomps-0.1.23/libcomps/src/comps_radix.c:148:28: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_create(*rt.data_constructor, *rt.data_cloner, *rt.data_destructor)’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  146|                                         ((COMPS_RTreeData*)it->data)->key, NULL);
#  147|               if (((COMPS_RTreeData*)it->data)->data != NULL)
#  148|->                 new_data = rt->data_cloner(((COMPS_RTreeData*)it->data)->data);
#  149|               else
#  150|                   new_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def290]
libcomps-0.1.23/libcomps/src/comps_radix.c:148:28: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_data_create(comps_rtree_create(*rt.data_constructor, *rt.data_cloner, *rt.data_destructor), *(COMPS_RTreeData *)it_29->data.key, 0)’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  146|                                         ((COMPS_RTreeData*)it->data)->key, NULL);
#  147|               if (((COMPS_RTreeData*)it->data)->data != NULL)
#  148|->                 new_data = rt->data_cloner(((COMPS_RTreeData*)it->data)->data);
#  149|               else
#  150|                   new_data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def291]
libcomps-0.1.23/libcomps/src/comps_radix.c:151:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  149|               else
#  150|                   new_data = NULL;
#  151|->             comps_hslist_destroy(&rtdata->subnodes);
#  152|               rtdata->subnodes = ((COMPS_RTreeData*)it->data)->subnodes;
#  153|               rtdata->data = new_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
libcomps-0.1.23/libcomps/src/comps_radix.c:151:13: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_data_create(comps_rtree_create(*rt.data_constructor, *rt.data_cloner, *rt.data_destructor), *(COMPS_RTreeData *)it_29->data.key, 0)’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  149|               else
#  150|                   new_data = NULL;
#  151|->             comps_hslist_destroy(&rtdata->subnodes);
#  152|               rtdata->subnodes = ((COMPS_RTreeData*)it->data)->subnodes;
#  153|               rtdata->data = new_data;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def293]
libcomps-0.1.23/libcomps/src/comps_radix.c:152:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  150|                   new_data = NULL;
#  151|               comps_hslist_destroy(&rtdata->subnodes);
#  152|->             rtdata->subnodes = ((COMPS_RTreeData*)it->data)->subnodes;
#  153|               rtdata->data = new_data;
#  154|               comps_hslist_append(new_subnodes, rtdata, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def294]
libcomps-0.1.23/libcomps/src/comps_radix.c:161:5: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_create(*rt.data_constructor, *rt.data_cloner, *rt.data_destructor)’
libcomps-0.1.23/libcomps/src/comps_radix.c:587:14: enter_function: entry to ‘comps_rtree_union’
libcomps-0.1.23/libcomps/src/comps_radix.c:589:11: call_function: calling ‘comps_rtree_clone’ from ‘comps_rtree_union’
#  159|           free(it2);
#  160|       }
#  161|->     comps_hslist_destroy(&to_clone);
#  162|       return ret;
#  163|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
libcomps-0.1.23/libcomps/src/comps_radix.c:204:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:554:29: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  202|           return;
#  203|       if (rt->data_constructor) {
#  204|->         ndata = rt->data_constructor(data);
#  205|       } else {
#  206|           ndata = data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def296]
libcomps-0.1.23/libcomps/src/comps_radix.c:204:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  202|           return;
#  203|       if (rt->data_constructor) {
#  204|->         ndata = rt->data_constructor(data);
#  205|       } else {
#  206|           ndata = data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
libcomps-0.1.23/libcomps/src/comps_radix.c:225:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:554:29: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  223|               rtd = comps_rtree_data_create(rt, key+offset, ndata);
#  224|               if (!lesser) {
#  225|->                 comps_hslist_prepend(subnodes, rtd, 0);
#  226|               } else {
#  227|                   comps_hslist_insert_after(subnodes, lesser, rtd, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def298]
libcomps-0.1.23/libcomps/src/comps_radix.c:225:17: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_data_create(rt,  key + offset,  ndata)’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  223|               rtd = comps_rtree_data_create(rt, key+offset, ndata);
#  224|               if (!lesser) {
#  225|->                 comps_hslist_prepend(subnodes, rtd, 0);
#  226|               } else {
#  227|                   comps_hslist_insert_after(subnodes, lesser, rtd, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
libcomps-0.1.23/libcomps/src/comps_radix.c:225:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  223|               rtd = comps_rtree_data_create(rt, key+offset, ndata);
#  224|               if (!lesser) {
#  225|->                 comps_hslist_prepend(subnodes, rtd, 0);
#  226|               } else {
#  227|                   comps_hslist_insert_after(subnodes, lesser, rtd, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
libcomps-0.1.23/libcomps/src/comps_radix.c:227:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:554:29: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  225|                   comps_hslist_prepend(subnodes, rtd, 0);
#  226|               } else {
#  227|->                 comps_hslist_insert_after(subnodes, lesser, rtd, 0);
#  228|               }
#  229|               return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
libcomps-0.1.23/libcomps/src/comps_radix.c:227:17: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_data_create(rt,  key + offset,  ndata)’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  225|                   comps_hslist_prepend(subnodes, rtd, 0);
#  226|               } else {
#  227|->                 comps_hslist_insert_after(subnodes, lesser, rtd, 0);
#  228|               }
#  229|               return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def302]
libcomps-0.1.23/libcomps/src/comps_radix.c:227:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  225|                   comps_hslist_prepend(subnodes, rtd, 0);
#  226|               } else {
#  227|->                 comps_hslist_insert_after(subnodes, lesser, rtd, 0);
#  228|               }
#  229|               return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
libcomps-0.1.23/libcomps/src/comps_radix.c:240:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:554:29: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  238|               }
#  239|               if (ended == 3) { //keys equals; data replacement
#  240|->                 rt->data_destructor(rtdata->data);
#  241|                   rtdata->data = ndata;
#  242|                   return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def304]
libcomps-0.1.23/libcomps/src/comps_radix.c:240:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  238|               }
#  239|               if (ended == 3) { //keys equals; data replacement
#  240|->                 rt->data_destructor(rtdata->data);
#  241|                   rtdata->data = ndata;
#  242|                   return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def305]
libcomps-0.1.23/libcomps/src/comps_radix.c:249:36: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  247|                                                   len-offset, ndata);
#  248|                   comps_hslist_append(subnodes, rtd, 0);
#  249|->                 ((COMPS_RTreeData*)subnodes->last->data)->subnodes->last = it;
#  250|                   ((COMPS_RTreeData*)subnodes->last->data)->subnodes->first = it;
#  251|                   _len = len - offset;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def306]
libcomps-0.1.23/libcomps/src/comps_radix.c:249:36: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_data_create_n(rt,  key + offset,  len - offset,  ndata)’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  247|                                                   len-offset, ndata);
#  248|                   comps_hslist_append(subnodes, rtd, 0);
#  249|->                 ((COMPS_RTreeData*)subnodes->last->data)->subnodes->last = it;
#  250|                   ((COMPS_RTreeData*)subnodes->last->data)->subnodes->first = it;
#  251|                   _len = len - offset;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
libcomps-0.1.23/libcomps/src/comps_radix.c:274:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  272|                   if (cmpret > 0) {
#  273|                       rtd = comps_rtree_data_create(rt, rtdata->key+x, tmpdata);
#  274|->                     comps_hslist_destroy(&rtd->subnodes);
#  275|                       rtd->subnodes = tmpnodes;
#  276|                       comps_hslist_append(rtdata->subnodes, rtd, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def308]
libcomps-0.1.23/libcomps/src/comps_radix.c:274:21: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_data_create(rt, *rtdata.key + (sizetype)x,  tmpdata)’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  272|                   if (cmpret > 0) {
#  273|                       rtd = comps_rtree_data_create(rt, rtdata->key+x, tmpdata);
#  274|->                     comps_hslist_destroy(&rtd->subnodes);
#  275|                       rtd->subnodes = tmpnodes;
#  276|                       comps_hslist_append(rtdata->subnodes, rtd, 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def309]
libcomps-0.1.23/libcomps/src/comps_radix.c:275:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  273|                       rtd = comps_rtree_data_create(rt, rtdata->key+x, tmpdata);
#  274|                       comps_hslist_destroy(&rtd->subnodes);
#  275|->                     rtd->subnodes = tmpnodes;
#  276|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  277|                       rtd = comps_rtree_data_create(rt, key+offset+x, ndata);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def310]
libcomps-0.1.23/libcomps/src/comps_radix.c:278:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  276|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  277|                       rtd = comps_rtree_data_create(rt, key+offset+x, ndata);
#  278|->                     comps_hslist_append(rtdata->subnodes, rtd, 0);
#  279|                   } else {
#  280|                       rtd = comps_rtree_data_create(rt, key+offset+x, ndata);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
libcomps-0.1.23/libcomps/src/comps_radix.c:278:21: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_data_create(rt,  key + ((sizetype)x + offset), ndata)’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  276|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  277|                       rtd = comps_rtree_data_create(rt, key+offset+x, ndata);
#  278|->                     comps_hslist_append(rtdata->subnodes, rtd, 0);
#  279|                   } else {
#  280|                       rtd = comps_rtree_data_create(rt, key+offset+x, ndata);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def312]
libcomps-0.1.23/libcomps/src/comps_radix.c:282:61: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  280|                       rtd = comps_rtree_data_create(rt, key+offset+x, ndata);
#  281|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  282|->                     rtd = comps_rtree_data_create(rt, rtdata->key+x, tmpdata);
#  283|                       comps_hslist_destroy(&rtd->subnodes);
#  284|                       rtd->subnodes = tmpnodes;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
libcomps-0.1.23/libcomps/src/comps_radix.c:282:61: warning[-Wanalyzer-malloc-leak]: leak of ‘comps_rtree_data_create(rt,  key + ((sizetype)x + offset), ndata)’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  280|                       rtd = comps_rtree_data_create(rt, key+offset+x, ndata);
#  281|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  282|->                     rtd = comps_rtree_data_create(rt, rtdata->key+x, tmpdata);
#  283|                       comps_hslist_destroy(&rtd->subnodes);
#  284|                       rtd->subnodes = tmpnodes;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def314]
libcomps-0.1.23/libcomps/src/comps_radix.c:284:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#  282|                       rtd = comps_rtree_data_create(rt, rtdata->key+x, tmpdata);
#  283|                       comps_hslist_destroy(&rtd->subnodes);
#  284|->                     rtd->subnodes = tmpnodes;
#  285|                       comps_hslist_append(rtdata->subnodes, rtd, 0);
#  286|                   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def315]
libcomps-0.1.23/libcomps/src/comps_radix.c:297:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘key’ where non-null expected
libcomps-0.1.23/libcomps/src/comps_radix.c:526:6: enter_function: entry to ‘comps_rtree_unite’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:554:29: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: call_function: calling ‘comps_rtree_set’ from ‘comps_rtree_unite’
#argument 1 of ‘__builtin_strlen’ must be non-null
#  295|   void comps_rtree_set(COMPS_RTree * rt, char * key, void * data)
#  296|   {
#  297|->     __comps_rtree_set(rt, key, strlen(key), data);
#  298|   }
#  299|   void comps_rtree_set_n(COMPS_RTree * rt, char * key, size_t keylen, void * data)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
libcomps-0.1.23/libcomps/src/comps_radix.c:437:9: warning[-Wanalyzer-malloc-leak]: leak of ‘relation’
libcomps-0.1.23/libcomps/src/comps_radix.c:365:12: branch_true: following ‘true’ branch (when ‘offset != len’)...
libcomps-0.1.23/libcomps/src/comps_radix.c:367:14: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:367:36: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:368:36: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:373:12: branch_false: following ‘false’ branch (when ‘found != 0’)...
libcomps-0.1.23/libcomps/src/comps_radix.c:377:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:386:12: branch_false: following ‘false’ branch (when ‘ended != 3’)...
libcomps-0.1.23/libcomps/src/comps_radix.c:425:17: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:425:17: branch_true: following ‘true’ branch (when ‘ended == 1’)...
libcomps-0.1.23/libcomps/src/comps_radix.c:425:30: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:430:25: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:430:12: branch_false: following ‘false’ branch (when ‘relation’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:434:9: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:437:9: danger: ‘relation’ leaks here; was allocated at [(11)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/10)
#  435|           relation->parent_nodes = subnodes;
#  436|           relation->child_it = it;
#  437|->         comps_hslist_append(path, (void*)relation, 0);
#  438|       }
#  439|       comps_hslist_destroy(&path);

Error: CPPCHECK_WARNING (CWE-476): [#def317]
libcomps-0.1.23/libcomps/src/comps_radix.c:486: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  484|       for (hsit = rt->subnodes->first; hsit != NULL; hsit = hsit->next) {
#  485|           pair = malloc(sizeof(struct Pair));
#  486|->         pair->key = __comps_strcpy(((COMPS_RTreeData*)hsit->data)->key);
#  487|           pair->data = ((COMPS_RTreeData*)hsit->data)->data;
#  488|           pair->subnodes = ((COMPS_RTreeData*)hsit->data)->subnodes;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def318]
libcomps-0.1.23/libcomps/src/comps_radix.c:486:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:484:38: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:485:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:485:16: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_radix.c:486:9: danger: ‘pair’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/2)
#  484|       for (hsit = rt->subnodes->first; hsit != NULL; hsit = hsit->next) {
#  485|           pair = malloc(sizeof(struct Pair));
#  486|->         pair->key = __comps_strcpy(((COMPS_RTreeData*)hsit->data)->key);
#  487|           pair->data = ((COMPS_RTreeData*)hsit->data)->data;
#  488|           pair->subnodes = ((COMPS_RTreeData*)hsit->data)->subnodes;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def319]
libcomps-0.1.23/libcomps/src/comps_radix.c:486:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:484:38: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:485:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:485:16: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:486:21: danger: ‘pair’ leaks here; was allocated at [(3)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/2)
#  484|       for (hsit = rt->subnodes->first; hsit != NULL; hsit = hsit->next) {
#  485|           pair = malloc(sizeof(struct Pair));
#  486|->         pair->key = __comps_strcpy(((COMPS_RTreeData*)hsit->data)->key);
#  487|           pair->data = ((COMPS_RTreeData*)hsit->data)->data;
#  488|           pair->subnodes = ((COMPS_RTreeData*)hsit->data)->subnodes;

Error: CPPCHECK_WARNING (CWE-476): [#def320]
libcomps-0.1.23/libcomps/src/comps_radix.c:487: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  485|           pair = malloc(sizeof(struct Pair));
#  486|           pair->key = __comps_strcpy(((COMPS_RTreeData*)hsit->data)->key);
#  487|->         pair->data = ((COMPS_RTreeData*)hsit->data)->data;
#  488|           pair->subnodes = ((COMPS_RTreeData*)hsit->data)->subnodes;
#  489|           comps_hslist_append(to_process, pair, 0);

Error: CPPCHECK_WARNING (CWE-476): [#def321]
libcomps-0.1.23/libcomps/src/comps_radix.c:488: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  486|           pair->key = __comps_strcpy(((COMPS_RTreeData*)hsit->data)->key);
#  487|           pair->data = ((COMPS_RTreeData*)hsit->data)->data;
#  488|->         pair->subnodes = ((COMPS_RTreeData*)hsit->data)->subnodes;
#  489|           comps_hslist_append(to_process, pair, 0);
#  490|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
libcomps-0.1.23/libcomps/src/comps_radix.c:489:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:484:38: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:485:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:485:16: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:489:9: danger: ‘pair’ leaks here; was allocated at [(3)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/2)
#  487|           pair->data = ((COMPS_RTreeData*)hsit->data)->data;
#  488|           pair->subnodes = ((COMPS_RTreeData*)hsit->data)->subnodes;
#  489|->         comps_hslist_append(to_process, pair, 0);
#  490|       }
#  491|       while (to_process->first) {

Error: GCC_ANALYZER_WARNING (CWE-416): [#def323]
libcomps-0.1.23/libcomps/src/comps_radix.c:493:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘*to_process.first’
libcomps-0.1.23/libcomps/src/comps_radix.c:491:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:493:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:496:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:508:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:509:14: branch_false: following ‘false’ branch (when ‘hsit’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:517:14: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:519:9: release_memory: freed here
libcomps-0.1.23/libcomps/src/comps_radix.c:491:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:493:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:493:9: danger: use after ‘free’ of ‘*to_process.first’; freed at [(7)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/6)
#  491|       while (to_process->first) {
#  492|           //oldpair = current_pair;
#  493|->         current_pair = to_process->first->data;
#  494|           oldit = to_process->first;
#  495|           comps_hslist_remove(to_process, to_process->first);

Error: GCC_ANALYZER_WARNING (CWE-416): [#def324]
libcomps-0.1.23/libcomps/src/comps_radix.c:496:13: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘current_pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:491:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:493:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:496:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:508:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:509:14: branch_false: following ‘false’ branch (when ‘hsit’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:517:14: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:518:9: release_memory: freed here
libcomps-0.1.23/libcomps/src/comps_radix.c:491:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:493:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:496:13: danger: use after ‘free’ of ‘current_pair’; freed at [(8)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/7)
#  494|           oldit = to_process->first;
#  495|           comps_hslist_remove(to_process, to_process->first);
#  496|->         if (current_pair->data) {
#  497|               if (keyvalpair == 0) {
#  498|                   comps_hslist_append(ret, __comps_strcpy(current_pair->key), 0);

Error: CPPCHECK_WARNING (CWE-476): [#def325]
libcomps-0.1.23/libcomps/src/comps_radix.c:503: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rtpair
#  501|               } else {
#  502|                   rtpair = malloc(sizeof(COMPS_RTreePair));
#  503|->                 rtpair->key = __comps_strcpy(current_pair->key);
#  504|                   rtpair->data = current_pair->data;
#  505|                   comps_hslist_append(ret, rtpair, 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def326]
libcomps-0.1.23/libcomps/src/comps_radix.c:503:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rtpair’
libcomps-0.1.23/libcomps/src/comps_radix.c:491:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:493:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:496:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:497:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:497:16: branch_false: following ‘false’ branch (when ‘keyvalpair != 0’)...
libcomps-0.1.23/libcomps/src/comps_radix.c:499:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:499:23: branch_false: following ‘false’ branch (when ‘keyvalpair != 1’)...
libcomps-0.1.23/libcomps/src/comps_radix.c:502:26: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:502:26: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_radix.c:503:17: danger: ‘rtpair’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/8)
#  501|               } else {
#  502|                   rtpair = malloc(sizeof(COMPS_RTreePair));
#  503|->                 rtpair->key = __comps_strcpy(current_pair->key);
#  504|                   rtpair->data = current_pair->data;
#  505|                   comps_hslist_append(ret, rtpair, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def327]
libcomps-0.1.23/libcomps/src/comps_radix.c:503:31: warning[-Wanalyzer-malloc-leak]: leak of ‘rtpair’
libcomps-0.1.23/libcomps/src/comps_radix.c:491:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:493:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:496:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:497:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:497:16: branch_false: following ‘false’ branch (when ‘keyvalpair != 0’)...
libcomps-0.1.23/libcomps/src/comps_radix.c:499:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:499:23: branch_false: following ‘false’ branch (when ‘keyvalpair != 1’)...
libcomps-0.1.23/libcomps/src/comps_radix.c:502:26: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:502:26: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:503:31: danger: ‘rtpair’ leaks here; was allocated at [(9)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/8)
#  501|               } else {
#  502|                   rtpair = malloc(sizeof(COMPS_RTreePair));
#  503|->                 rtpair->key = __comps_strcpy(current_pair->key);
#  504|                   rtpair->data = current_pair->data;
#  505|                   comps_hslist_append(ret, rtpair, 0);

Error: CPPCHECK_WARNING (CWE-476): [#def328]
libcomps-0.1.23/libcomps/src/comps_radix.c:504: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rtpair
#  502|                   rtpair = malloc(sizeof(COMPS_RTreePair));
#  503|                   rtpair->key = __comps_strcpy(current_pair->key);
#  504|->                 rtpair->data = current_pair->data;
#  505|                   comps_hslist_append(ret, rtpair, 0);
#  506|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def329]
libcomps-0.1.23/libcomps/src/comps_radix.c:505:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rtpair’
libcomps-0.1.23/libcomps/src/comps_radix.c:491:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:493:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:496:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:497:16: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:497:16: branch_false: following ‘false’ branch (when ‘keyvalpair != 0’)...
libcomps-0.1.23/libcomps/src/comps_radix.c:499:23: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:499:23: branch_false: following ‘false’ branch (when ‘keyvalpair != 1’)...
libcomps-0.1.23/libcomps/src/comps_radix.c:502:26: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:502:26: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:505:17: danger: ‘rtpair’ leaks here; was allocated at [(9)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/8)
#  503|                   rtpair->key = __comps_strcpy(current_pair->key);
#  504|                   rtpair->data = current_pair->data;
#  505|->                 comps_hslist_append(ret, rtpair, 0);
#  506|               }
#  507|           }

Error: CPPCHECK_WARNING (CWE-476): [#def330]
libcomps-0.1.23/libcomps/src/comps_radix.c:511: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  509|                hsit != NULL; hsit = hsit->next, x++) {
#  510|               pair = malloc(sizeof(struct Pair));
#  511|->             pair->key = __comps_strcat(current_pair->key,
#  512|                                          ((COMPS_RTreeData*)hsit->data)->key);
#  513|               pair->data = ((COMPS_RTreeData*)hsit->data)->data;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def331]
libcomps-0.1.23/libcomps/src/comps_radix.c:511:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:491:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:493:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:496:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:508:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:509:14: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:510:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:510:20: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_radix.c:511:13: danger: ‘pair’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/6)
#  509|                hsit != NULL; hsit = hsit->next, x++) {
#  510|               pair = malloc(sizeof(struct Pair));
#  511|->             pair->key = __comps_strcat(current_pair->key,
#  512|                                          ((COMPS_RTreeData*)hsit->data)->key);
#  513|               pair->data = ((COMPS_RTreeData*)hsit->data)->data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def332]
libcomps-0.1.23/libcomps/src/comps_radix.c:511:25: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:491:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:493:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:496:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:508:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:509:14: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:510:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:510:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:511:25: danger: ‘pair’ leaks here; was allocated at [(7)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/6)
#  509|                hsit != NULL; hsit = hsit->next, x++) {
#  510|               pair = malloc(sizeof(struct Pair));
#  511|->             pair->key = __comps_strcat(current_pair->key,
#  512|                                          ((COMPS_RTreeData*)hsit->data)->key);
#  513|               pair->data = ((COMPS_RTreeData*)hsit->data)->data;

Error: CPPCHECK_WARNING (CWE-476): [#def333]
libcomps-0.1.23/libcomps/src/comps_radix.c:513: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  511|               pair->key = __comps_strcat(current_pair->key,
#  512|                                          ((COMPS_RTreeData*)hsit->data)->key);
#  513|->             pair->data = ((COMPS_RTreeData*)hsit->data)->data;
#  514|               pair->subnodes = ((COMPS_RTreeData*)hsit->data)->subnodes;
#  515|               comps_hslist_insert_at(to_process, x, pair, 0);

Error: CPPCHECK_WARNING (CWE-476): [#def334]
libcomps-0.1.23/libcomps/src/comps_radix.c:514: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  512|                                          ((COMPS_RTreeData*)hsit->data)->key);
#  513|               pair->data = ((COMPS_RTreeData*)hsit->data)->data;
#  514|->             pair->subnodes = ((COMPS_RTreeData*)hsit->data)->subnodes;
#  515|               comps_hslist_insert_at(to_process, x, pair, 0);
#  516|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def335]
libcomps-0.1.23/libcomps/src/comps_radix.c:515:13: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:491:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:493:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:496:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:508:21: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:509:14: branch_true: following ‘true’ branch (when ‘hsit’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:510:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:510:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:515:13: danger: ‘pair’ leaks here; was allocated at [(7)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/6)
#  513|               pair->data = ((COMPS_RTreeData*)hsit->data)->data;
#  514|               pair->subnodes = ((COMPS_RTreeData*)hsit->data)->subnodes;
#  515|->             comps_hslist_insert_at(to_process, x, pair, 0);
#  516|           }
#  517|           free(current_pair->key);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def336]
libcomps-0.1.23/libcomps/src/comps_radix.c:517:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘((struct Pair)*(void *)((void *)current_pair)).key’
libcomps-0.1.23/libcomps/src/comps_radix.c:595:15: enter_function: entry to ‘comps_rtree_keys’
libcomps-0.1.23/libcomps/src/comps_radix.c:596:12: call_function: calling ‘__comps_rtree_all’ from ‘comps_rtree_keys’
#  515|               comps_hslist_insert_at(to_process, x, pair, 0);
#  516|           }
#  517|->         free(current_pair->key);
#  518|           free(current_pair);
#  519|           free(oldit);

Error: CPPCHECK_WARNING (CWE-476): [#def337]
libcomps-0.1.23/libcomps/src/comps_radix.c:535: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  533|   
#  534|       pair = malloc(sizeof(struct Pair));
#  535|->     pair->subnodes = rt2->subnodes;
#  536|       pair->key = NULL;
#  537|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def338]
libcomps-0.1.23/libcomps/src/comps_radix.c:535:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:534:12: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_radix.c:535:5: danger: ‘pair’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/62/codeFlows/0/threadFlows/0/locations/0)
#  533|   
#  534|       pair = malloc(sizeof(struct Pair));
#  535|->     pair->subnodes = rt2->subnodes;
#  536|       pair->key = NULL;
#  537|   

Error: CPPCHECK_WARNING (CWE-476): [#def339]
libcomps-0.1.23/libcomps/src/comps_radix.c:536: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  534|       pair = malloc(sizeof(struct Pair));
#  535|       pair->subnodes = rt2->subnodes;
#  536|->     pair->key = NULL;
#  537|   
#  538|       tmplist = comps_hslist_create();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def340]
libcomps-0.1.23/libcomps/src/comps_radix.c:538:15: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:534:12: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:538:15: danger: ‘pair’ leaks here; was allocated at [(1)](sarif:/runs/0/results/63/codeFlows/0/threadFlows/0/locations/0)
#  536|       pair->key = NULL;
#  537|   
#  538|->     tmplist = comps_hslist_create();
#  539|       comps_hslist_init(tmplist, NULL, NULL, &free);
#  540|       comps_hslist_append(tmplist, pair, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
libcomps-0.1.23/libcomps/src/comps_radix.c:539:5: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:534:12: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:539:5: danger: ‘pair’ leaks here; was allocated at [(1)](sarif:/runs/0/results/64/codeFlows/0/threadFlows/0/locations/0)
#  537|   
#  538|       tmplist = comps_hslist_create();
#  539|->     comps_hslist_init(tmplist, NULL, NULL, &free);
#  540|       comps_hslist_append(tmplist, pair, 0);
#  541|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
libcomps-0.1.23/libcomps/src/comps_radix.c:540:5: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:534:12: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:540:5: danger: ‘pair’ leaks here; was allocated at [(1)](sarif:/runs/0/results/65/codeFlows/0/threadFlows/0/locations/0)
#  538|       tmplist = comps_hslist_create();
#  539|       comps_hslist_init(tmplist, NULL, NULL, &free);
#  540|->     comps_hslist_append(tmplist, pair, 0);
#  541|   
#  542|       while (tmplist->first != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-416): [#def343]
libcomps-0.1.23/libcomps/src/comps_radix.c:545:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘**tmplist.first.data’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:582:9: release_memory: freed here
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:545:9: danger: use after ‘free’ of ‘*tmplist.73_42->first.data’; freed at [(4)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/3)
#  543|           it = tmplist->first;
#  544|           comps_hslist_remove(tmplist, tmplist->first);
#  545|->         tmp_subnodes = ((struct Pair*)it->data)->subnodes;
#  546|           parent_pair = (struct Pair*) it->data;
#  547|           free(it);

Error: CPPCHECK_WARNING (CWE-476): [#def344]
libcomps-0.1.23/libcomps/src/comps_radix.c:551: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pair
#  549|           for (it = tmp_subnodes->first; it != NULL; it=it->next) {
#  550|               pair = malloc(sizeof(struct Pair));
#  551|->             pair->subnodes = ((COMPS_RTreeData*)it->data)->subnodes;
#  552|   
#  553|               if (parent_pair->key != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def345]
libcomps-0.1.23/libcomps/src/comps_radix.c:551:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_radix.c:551:13: danger: ‘pair’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/4)
#  549|           for (it = tmp_subnodes->first; it != NULL; it=it->next) {
#  550|               pair = malloc(sizeof(struct Pair));
#  551|->             pair->subnodes = ((COMPS_RTreeData*)it->data)->subnodes;
#  552|   
#  553|               if (parent_pair->key != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def346]
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:554:29: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/4)
#  568|               /* current node has data */
#  569|               if (((COMPS_RTreeData*)it->data)->data != NULL) {
#  570|->                     comps_rtree_set(rt1,
#  571|                                       pair->key,
#  572|                           rt2->data_cloner(((COMPS_RTreeData*)it->data)->data));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def347]
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:570:21: danger: ‘pair’ leaks here; was allocated at [(5)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/4)
#  568|               /* current node has data */
#  569|               if (((COMPS_RTreeData*)it->data)->data != NULL) {
#  570|->                     comps_rtree_set(rt1,
#  571|                                       pair->key,
#  572|                           rt2->data_cloner(((COMPS_RTreeData*)it->data)->data));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def348]
libcomps-0.1.23/libcomps/src/comps_radix.c:575:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:554:29: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:569:16: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:574:36: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:575:17: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/4)
#  573|               }
#  574|               if (((COMPS_RTreeData*)it->data)->subnodes->first) {
#  575|->                 comps_hslist_append(tmplist, pair, 0);
#  576|               } else {
#  577|                   free(pair->key);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def349]
libcomps-0.1.23/libcomps/src/comps_radix.c:575:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pair’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:550:20: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/comps_radix.c:569:16: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:574:36: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:575:17: danger: ‘pair’ leaks here; was allocated at [(5)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/4)
#  573|               }
#  574|               if (((COMPS_RTreeData*)it->data)->subnodes->first) {
#  575|->                 comps_hslist_append(tmplist, pair, 0);
#  576|               } else {
#  577|                   free(pair->key);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def350]
libcomps-0.1.23/libcomps/src/comps_radix.c:581:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘((struct Pair)*(void *)**tmplist.first.data).key’
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:581:9: release_memory: first ‘free’ here
libcomps-0.1.23/libcomps/src/comps_radix.c:542:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_radix.c:544:9: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:549:40: branch_false: following ‘false’ branch (when ‘it’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_radix.c:581:14: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_radix.c:581:9: danger: second ‘free’ here; first ‘free’ was at [(3)](sarif:/runs/0/results/72/codeFlows/0/threadFlows/0/locations/2)
#  579|               }
#  580|           }
#  581|->         free(parent_pair->key);
#  582|           free(parent_pair);
#  583|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def351]
libcomps-0.1.23/libcomps/src/comps_set.c:41:17: warning[-Wanalyzer-malloc-leak]: leak of ‘not_processed1’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
#   39|           return NULL;
#   40|       }
#   41|->     ret->data = comps_hslist_create();
#   42|       if (ret->data == NULL) {
#   43|           free(ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def352]
libcomps-0.1.23/libcomps/src/comps_set.c:41:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
#   39|           return NULL;
#   40|       }
#   41|->     ret->data = comps_hslist_create();
#   42|       if (ret->data == NULL) {
#   43|           free(ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def353]
libcomps-0.1.23/libcomps/src/comps_set.c:50:5: warning[-Wanalyzer-malloc-leak]: leak of ‘not_processed1’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:191:5: call_function: calling ‘comps_set_destroy’ from ‘comps_set_cmp’
#   48|   
#   49|   void comps_set_destroy(COMPS_Set **set) {
#   50|->     comps_hslist_destroy(&(*set)->data);
#   51|       free(*set);
#   52|       *set = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def354]
libcomps-0.1.23/libcomps/src/comps_set.c:50:5: warning[-Wanalyzer-malloc-leak]: leak of ‘not_processed2’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:191:5: call_function: calling ‘comps_set_destroy’ from ‘comps_set_cmp’
#   48|   
#   49|   void comps_set_destroy(COMPS_Set **set) {
#   50|->     comps_hslist_destroy(&(*set)->data);
#   51|       free(*set);
#   52|       *set = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
libcomps-0.1.23/libcomps/src/comps_set.c:70:5: warning[-Wanalyzer-malloc-leak]: leak of ‘not_processed1’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
#   68|       set->data_cloner = data_cloner;
#   69|       set->eqf = eqf;
#   70|->     comps_hslist_init(set->data, data_constructor, data_cloner, data_destructor);
#   71|   }
#   72|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
libcomps-0.1.23/libcomps/src/comps_set.c:70:5: warning[-Wanalyzer-malloc-leak]: leak of ‘not_processed2’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
#   68|       set->data_cloner = data_cloner;
#   69|       set->eqf = eqf;
#   70|->     comps_hslist_init(set->data, data_constructor, data_cloner, data_destructor);
#   71|   }
#   72|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def357]
libcomps-0.1.23/libcomps/src/comps_set.c:86:13: warning[-Wanalyzer-malloc-leak]: leak of ‘not_processed1’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:163:13: call_function: inlined call to ‘comps_set_is_empty’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:164:13: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:164:13: call_function: inlined call to ‘comps_set_is_empty’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:165:19: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:165:19: call_function: calling ‘comps_set_at’ from ‘comps_set_cmp’
#   84|       int x;
#   85|       for (x=0, it = set->data->first; it != NULL; it = it->next, x++) {
#   86|->         if (set->eqf(it->data, item)) {
#   87|               return x;
#   88|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def358]
libcomps-0.1.23/libcomps/src/comps_set.c:86:13: warning[-Wanalyzer-malloc-leak]: leak of ‘not_processed2’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:163:13: call_function: inlined call to ‘comps_set_is_empty’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:164:13: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:164:13: call_function: inlined call to ‘comps_set_is_empty’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:165:19: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:165:19: call_function: calling ‘comps_set_at’ from ‘comps_set_cmp’
#   84|       int x;
#   85|       for (x=0, it = set->data->first; it != NULL; it = it->next, x++) {
#   86|->         if (set->eqf(it->data, item)) {
#   87|               return x;
#   88|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def359]
libcomps-0.1.23/libcomps/src/comps_set.c:121:17: warning[-Wanalyzer-malloc-leak]: leak of ‘not_processed1’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:163:13: call_function: inlined call to ‘comps_set_is_empty’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:164:13: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:164:13: call_function: inlined call to ‘comps_set_is_empty’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:165:19: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:165:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_set.c:166:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:166:20: call_function: calling ‘comps_set_remove’ from ‘comps_set_cmp’
#  119|           for (it = set->data->first; it != NULL; it = it->next) {
#  120|               if (set->eqf(it->data, item)) {
#  121|->                 comps_hslist_remove(set->data, it);
#  122|                   ret = it->data;
#  123|                   free(it);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def360]
libcomps-0.1.23/libcomps/src/comps_set.c:121:17: warning[-Wanalyzer-malloc-leak]: leak of ‘not_processed2’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:163:13: call_function: inlined call to ‘comps_set_is_empty’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:164:13: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:164:13: call_function: inlined call to ‘comps_set_is_empty’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:165:19: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:165:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_set.c:166:20: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:166:20: call_function: calling ‘comps_set_remove’ from ‘comps_set_cmp’
#  119|           for (it = set->data->first; it != NULL; it = it->next) {
#  120|               if (set->eqf(it->data, item)) {
#  121|->                 comps_hslist_remove(set->data, it);
#  122|                   ret = it->data;
#  123|                   free(it);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def361]
libcomps-0.1.23/libcomps/src/comps_set.c:132:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘not_processed1’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:5: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:146:5: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:153:41: branch_false: following ‘false’ branch (when ‘it’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_set.c:156:10: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:156:41: branch_false: following ‘false’ branch (when ‘it’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_set.c:159:10: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:163:13: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:163:13: call_function: inlined call to ‘comps_set_is_empty’ from ‘comps_set_cmp’
#  130|   
#  131|   inline char comps_set_is_empty(COMPS_Set *set) {
#  132|->     if (set->data->first == NULL) {
#  133|           return 1;
#  134|       } else return 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def362]
libcomps-0.1.23/libcomps/src/comps_set.c:132:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘not_processed2’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:146:5: release_memory: ‘not_processed2’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: release_memory: ‘not_processed2’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:156:41: branch_false: following ‘false’ branch (when ‘it’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_set.c:159:10: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:163:13: call_function: inlined call to ‘comps_set_is_empty’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:164:13: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:164:13: release_memory: ‘not_processed2’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:164:13: call_function: inlined call to ‘comps_set_is_empty’ from ‘comps_set_cmp’
#  130|   
#  131|   inline char comps_set_is_empty(COMPS_Set *set) {
#  132|->     if (set->data->first == NULL) {
#  133|           return 1;
#  134|       } else return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def363]
libcomps-0.1.23/libcomps/src/comps_set.c:154:9: warning[-Wanalyzer-malloc-leak]: leak of ‘not_processed1’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:153:41: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_set.c:154:43: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:154:9: danger: ‘not_processed1’ leaks here; was allocated at [(4)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/3)
#  152|                                      &free, &comps_set_index_cmp);
#  153|       for (x = 0, it = set1->data->first; it!= NULL; it = it->next, x++) {
#  154|->         comps_hslist_append(not_processed1->data, &x, 1);
#  155|       }
#  156|       for (x = 0, it = set2->data->first; it!= NULL; it = it->next, x++) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def364]
libcomps-0.1.23/libcomps/src/comps_set.c:154:9: warning[-Wanalyzer-malloc-leak]: leak of ‘not_processed2’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:153:41: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_set.c:154:43: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:154:9: danger: ‘not_processed2’ leaks here; was allocated at [(11)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/10)
#  152|                                      &free, &comps_set_index_cmp);
#  153|       for (x = 0, it = set1->data->first; it!= NULL; it = it->next, x++) {
#  154|->         comps_hslist_append(not_processed1->data, &x, 1);
#  155|       }
#  156|       for (x = 0, it = set2->data->first; it!= NULL; it = it->next, x++) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def365]
libcomps-0.1.23/libcomps/src/comps_set.c:154:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘not_processed1’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:5: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:146:5: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:153:41: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_set.c:154:43: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:154:43: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:154:9: danger: dereference of NULL ‘not_processed1’
#  152|                                      &free, &comps_set_index_cmp);
#  153|       for (x = 0, it = set1->data->first; it!= NULL; it = it->next, x++) {
#  154|->         comps_hslist_append(not_processed1->data, &x, 1);
#  155|       }
#  156|       for (x = 0, it = set2->data->first; it!= NULL; it = it->next, x++) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def366]
libcomps-0.1.23/libcomps/src/comps_set.c:157:9: warning[-Wanalyzer-malloc-leak]: leak of ‘not_processed1’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:156:41: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_set.c:157:43: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:157:9: danger: ‘not_processed1’ leaks here; was allocated at [(4)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/3)
#  155|       }
#  156|       for (x = 0, it = set2->data->first; it!= NULL; it = it->next, x++) {
#  157|->         comps_hslist_append(not_processed2->data, &x, 1);
#  158|       }
#  159|       it = set1->data->first;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def367]
libcomps-0.1.23/libcomps/src/comps_set.c:157:9: warning[-Wanalyzer-malloc-leak]: leak of ‘not_processed2’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:146:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:153:41: branch_false: following ‘false’ branch (when ‘it’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_set.c:156:10: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:156:41: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_set.c:157:43: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:157:9: danger: ‘not_processed2’ leaks here; was allocated at [(12)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/11)
#  155|       }
#  156|       for (x = 0, it = set2->data->first; it!= NULL; it = it->next, x++) {
#  157|->         comps_hslist_append(not_processed2->data, &x, 1);
#  158|       }
#  159|       it = set1->data->first;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def368]
libcomps-0.1.23/libcomps/src/comps_set.c:157:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘not_processed1’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:5: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:146:5: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:153:41: branch_false: following ‘false’ branch (when ‘it’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_set.c:156:10: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:156:41: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_set.c:157:43: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:157:43: release_memory: ‘not_processed1’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:157:9: danger: dereference of NULL ‘not_processed2’
#  155|       }
#  156|       for (x = 0, it = set2->data->first; it!= NULL; it = it->next, x++) {
#  157|->         comps_hslist_append(not_processed2->data, &x, 1);
#  158|       }
#  159|       it = set1->data->first;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def369]
libcomps-0.1.23/libcomps/src/comps_set.c:157:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘not_processed2’
libcomps-0.1.23/libcomps/src/comps_set.c:137:6: enter_function: entry to ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: call_function: calling ‘comps_set_create’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:145:22: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_create’
libcomps-0.1.23/libcomps/src/comps_set.c:146:5: release_memory: ‘not_processed2’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:147:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: release_memory: ‘not_processed2’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: call_function: calling ‘comps_set_init’ from ‘comps_set_cmp’
libcomps-0.1.23/libcomps/src/comps_set.c:150:5: return_function: returning to ‘comps_set_cmp’ from ‘comps_set_init’
libcomps-0.1.23/libcomps/src/comps_set.c:156:41: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_set.c:157:43: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_set.c:157:43: release_memory: ‘not_processed2’ is NULL
libcomps-0.1.23/libcomps/src/comps_set.c:157:9: danger: dereference of NULL ‘not_processed2’
#  155|       }
#  156|       for (x = 0, it = set2->data->first; it!= NULL; it = it->next, x++) {
#  157|->         comps_hslist_append(not_processed2->data, &x, 1);
#  158|       }
#  159|       it = set1->data->first;

Error: CPPCHECK_WARNING (CWE-476): [#def370]
libcomps-0.1.23/libcomps/src/comps_utils.c:57: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   55|       }
#   56|       ret = malloc(sizeof(char) * (strlen(_bool)+1));
#   57|->     ret[0] = 0;
#   58|       strcat(ret, _bool);
#   59|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def371]
libcomps-0.1.23/libcomps/src/comps_utils.c:57:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
libcomps-0.1.23/libcomps/src/comps_utils.c:56:11: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_utils.c:57:5: danger: ‘ret’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   55|       }
#   56|       ret = malloc(sizeof(char) * (strlen(_bool)+1));
#   57|->     ret[0] = 0;
#   58|       strcat(ret, _bool);
#   59|       return ret;

Error: CPPCHECK_WARNING (CWE-476): [#def372]
libcomps-0.1.23/libcomps/src/comps_utils.c:58: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   56|       ret = malloc(sizeof(char) * (strlen(_bool)+1));
#   57|       ret[0] = 0;
#   58|->     strcat(ret, _bool);
#   59|       return ret;
#   60|   }

Error: CPPCHECK_WARNING (CWE-476): [#def373]
libcomps-0.1.23/libcomps/src/comps_utils.c:93: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: arches_str
#   91|       if (!archlist || !((COMPS_ObjList*)archlist)->len) {
#   92|           arches_str = malloc(sizeof(char));
#   93|->         arches_str[0] = 0;
#   94|           return arches_str;
#   95|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def374]
libcomps-0.1.23/libcomps/src/comps_utils.c:93:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘arches_str’
libcomps-0.1.23/libcomps/src/comps_utils.c:92:22: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_utils.c:93:9: danger: ‘arches_str’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   91|       if (!archlist || !((COMPS_ObjList*)archlist)->len) {
#   92|           arches_str = malloc(sizeof(char));
#   93|->         arches_str[0] = 0;
#   94|           return arches_str;
#   95|       }

Error: CPPCHECK_WARNING (CWE-476): [#def375]
libcomps-0.1.23/libcomps/src/comps_utils.c:103: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: arches_str
#  101|       }
#  102|       arches_str = malloc(sizeof(char) * (total_len));
#  103|->     arches_str[0]=0;
#  104|   
#  105|       x = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def376]
libcomps-0.1.23/libcomps/src/comps_utils.c:103:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘arches_str’
libcomps-0.1.23/libcomps/src/comps_utils.c:91:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_utils.c:102:18: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_utils.c:103:5: danger: ‘arches_str’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  101|       }
#  102|       arches_str = malloc(sizeof(char) * (total_len));
#  103|->     arches_str[0]=0;
#  104|   
#  105|       x = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def377]
libcomps-0.1.23/libcomps/src/comps_utils.c:107: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: arches_str
#  105|       x = 0;
#  106|       for (; x < (size_t)(((COMPS_ObjList*)archlist)->len-1); x++) {
#  107|->         strcat(arches_str, arches[x]);
#  108|           free(arches[x]);
#  109|           strcat(arches_str, " ");

Error: CPPCHECK_WARNING (CWE-476): [#def378]
libcomps-0.1.23/libcomps/src/comps_utils.c:109: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: arches_str
#  107|           strcat(arches_str, arches[x]);
#  108|           free(arches[x]);
#  109|->         strcat(arches_str, " ");
#  110|       }
#  111|       strcat(arches_str, arches[x]);

Error: CPPCHECK_WARNING (CWE-476): [#def379]
libcomps-0.1.23/libcomps/src/comps_utils.c:111: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: arches_str
#  109|           strcat(arches_str, " ");
#  110|       }
#  111|->     strcat(arches_str, arches[x]);
#  112|       free(arches[x]);
#  113|       return arches_str;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def380]
libcomps-0.1.23/libcomps/src/comps_utils.c:119:19: warning[-Wanalyzer-malloc-leak]: leak of ‘__comps_xml_arch_str(archlist)’
libcomps-0.1.23/libcomps/src/comps_utils.c:116:5: enter_function: entry to ‘__comps_xml_arch’
libcomps-0.1.23/libcomps/src/comps_utils.c:117:8: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/src/comps_utils.c:118:22: call_function: calling ‘__comps_xml_arch_str’ from ‘__comps_xml_arch’
libcomps-0.1.23/libcomps/src/comps_utils.c:118:22: return_function: returning to ‘__comps_xml_arch’ from ‘__comps_xml_arch_str’
libcomps-0.1.23/libcomps/src/comps_utils.c:119:19: danger: ‘__comps_xml_arch_str(archlist)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
#  117|       if (archlist && ((COMPS_ObjList*)archlist)->len != 0) {
#  118|           char * str = __comps_xml_arch_str(archlist);
#  119|->         int ret = xmlTextWriterWriteAttribute(writer, BAD_CAST "arch",
#  120|                                                 BAD_CAST str);
#  121|           free(str);

Error: CPPCHECK_WARNING (CWE-476): [#def381]
libcomps-0.1.23/libcomps/src/comps_utils.c:130: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  128|       char *ret;
#  129|       ret = malloc(sizeof(char)*(strlen(str)+1));
#  130|->     return memcpy(ret, str, sizeof(char)*(strlen(str)+1));
#  131|   }
#  132|   

Error: CPPCHECK_WARNING (CWE-476): [#def382]
libcomps-0.1.23/libcomps/src/comps_utils.c:136: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  134|       char *ret;
#  135|       ret = malloc(sizeof(char)*(strlen(str1)+strlen(str2)+1));
#  136|->     memcpy(ret, str1, sizeof(char)*(strlen(str1)+1));
#  137|       strcat(ret, str2);
#  138|       return ret;

Error: CPPCHECK_WARNING (CWE-476): [#def383]
libcomps-0.1.23/libcomps/src/comps_utils.c:137: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  135|       ret = malloc(sizeof(char)*(strlen(str1)+strlen(str2)+1));
#  136|       memcpy(ret, str1, sizeof(char)*(strlen(str1)+1));
#  137|->     strcat(ret, str2);
#  138|       return ret;
#  139|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def384]
libcomps-0.1.23/libcomps/src/comps_utils.c:137:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected
libcomps-0.1.23/libcomps/src/comps_utils.c:135:11: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_utils.c:137:5: danger: argument 1 (‘ret’) from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#argument 1 of ‘__builtin_strcat’ must be non-null
#  135|       ret = malloc(sizeof(char)*(strlen(str1)+strlen(str2)+1));
#  136|       memcpy(ret, str1, sizeof(char)*(strlen(str1)+1));
#  137|->     strcat(ret, str2);
#  138|       return ret;
#  139|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def385]
libcomps-0.1.23/libcomps/src/comps_validate.c:195:13: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘msg’ where non-null expected
libcomps-0.1.23/libcomps/src/comps_validate.c:180:10: branch_true: following ‘true’ branch (when ‘it’ is non-NULL)...
libcomps-0.1.23/libcomps/src/comps_validate.c:182:45: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_validate.c:182:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/comps_validate.c:185:16: branch_false: ...to here
libcomps-0.1.23/libcomps/src/comps_validate.c:185:16: branch_true: following ‘true’ branch (when ‘valres’ is NULL)...
libcomps-0.1.23/libcomps/src/comps_validate.c:186:47: branch_true: ...to here
libcomps-0.1.23/libcomps/src/comps_validate.c:193:19: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/comps_validate.c:195:13: danger: argument 1 (‘msg’) from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected
#argument 1 of ‘__builtin_sprintf’ must be non-null
#  193|               msg = malloc(sizeof(char) * (strlen(msg_fmt)-3)+digits_count(x)\
#  194|                                                              +digits_count(index));
#  195|->             sprintf(msg, msg_fmt, index, x);
#  196|               v_err->err_msg = msg;
#  197|               comps_objlist_append_x(((COMPS_ValErrResult*)valres)->err_list,

Error: CPPCHECK_WARNING (CWE-476): [#def386]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:60: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: *options
#   58|                         &(*options)->bao_explicit,
#   59|                         &(*options)->arch_output};
#   60|->     **options = COMPS_XMLDefaultOptions;
#   61|   
#   62|       if (!PyDict_Check(pobj)) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def387]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:60:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(15)’
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:44:16: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:60:5: danger: ‘malloc(15)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   58|                         &(*options)->bao_explicit,
#   59|                         &(*options)->arch_output};
#   60|->     **options = COMPS_XMLDefaultOptions;
#   61|   
#   62|       if (!PyDict_Check(pobj)) {

Error: CPPCHECK_WARNING (CWE-476): [#def388]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:92: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: *options
#   90|                         &(*options)->default_default};
#   91|       int *props1[] = {&(*options)->default_pkgtype};
#   92|->     **options = COMPS_DDefaultsOptions;
#   93|   
#   94|       if (!PyDict_Check(pobj)) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def389]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:92:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(8)’
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:87:16: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:92:5: danger: ‘malloc(8)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   90|                         &(*options)->default_default};
#   91|       int *props1[] = {&(*options)->default_pkgtype};
#   92|->     **options = COMPS_DDefaultsOptions;
#   93|   
#   94|       if (!PyDict_Check(pobj)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def390]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:245:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:223:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:230:14: branch_false: ...to here
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:231:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:235:10: branch_false: ...to here
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:235:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:236:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:244:18: branch_false: ...to here
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:245:5: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  243|       }
#  244|       parsed_ret = comps_parse_file(parsed, f, options);
#  245|->     Py_CLEAR(self_comps->p_groups);
#  246|       Py_CLEAR(self_comps->p_categories);
#  247|       Py_CLEAR(self_comps->p_environments);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def391]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:245:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:223:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:230:14: branch_false: ...to here
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:231:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:235:10: branch_false: ...to here
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:235:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:236:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:244:18: branch_false: ...to here
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:245:5: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  243|       }
#  244|       parsed_ret = comps_parse_file(parsed, f, options);
#  245|->     Py_CLEAR(self_comps->p_groups);
#  246|       Py_CLEAR(self_comps->p_categories);
#  247|       Py_CLEAR(self_comps->p_environments);

Error: COMPILER_WARNING (CWE-843): [#def392]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:775:22: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  775 |     {"groups_match", (PyCFunction)PyCOMPS_groups_match, METH_VARARGS | METH_KEYWORDS,
#      |                      ^
#  773|   
#  774|   static PyMethodDef PyCOMPS_methods[] = {
#  775|->     {"groups_match", (PyCFunction)PyCOMPS_groups_match, METH_VARARGS | METH_KEYWORDS,
#  776|       PyCOMPS_validate__doc__},
#  777|       {"categories_match", (PyCFunction)PyCOMPS_categories_match, METH_VARARGS | METH_KEYWORDS,

Error: COMPILER_WARNING (CWE-843): [#def393]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:777:26: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  777 |     {"categories_match", (PyCFunction)PyCOMPS_categories_match, METH_VARARGS | METH_KEYWORDS,
#      |                          ^
#  775|       {"groups_match", (PyCFunction)PyCOMPS_groups_match, METH_VARARGS | METH_KEYWORDS,
#  776|       PyCOMPS_validate__doc__},
#  777|->     {"categories_match", (PyCFunction)PyCOMPS_categories_match, METH_VARARGS | METH_KEYWORDS,
#  778|       PyCOMPS_validate__doc__},
#  779|       {"environments_match", (PyCFunction)PyCOMPS_envs_match, METH_VARARGS | METH_KEYWORDS,

Error: COMPILER_WARNING (CWE-843): [#def394]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:779:28: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  779 |     {"environments_match", (PyCFunction)PyCOMPS_envs_match, METH_VARARGS | METH_KEYWORDS,
#      |                            ^
#  777|       {"categories_match", (PyCFunction)PyCOMPS_categories_match, METH_VARARGS | METH_KEYWORDS,
#  778|       PyCOMPS_validate__doc__},
#  779|->     {"environments_match", (PyCFunction)PyCOMPS_envs_match, METH_VARARGS | METH_KEYWORDS,
#  780|       PyCOMPS_validate__doc__},
#  781|       {"validate", (PyCFunction)PyCOMPS_validate, METH_NOARGS,

Error: COMPILER_WARNING (CWE-843): [#def395]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:781:18: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyCOMPS *)’ {aka ‘struct _object * (*)(PyCOMPS *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  781 |     {"validate", (PyCFunction)PyCOMPS_validate, METH_NOARGS,
#      |                  ^
#  779|       {"environments_match", (PyCFunction)PyCOMPS_envs_match, METH_VARARGS | METH_KEYWORDS,
#  780|       PyCOMPS_validate__doc__},
#  781|->     {"validate", (PyCFunction)PyCOMPS_validate, METH_NOARGS,
#  782|       PyCOMPS_validate__doc__},
#  783|       {"validate_nf", (PyCFunction)PyCOMPS_validate_nf, METH_NOARGS,

Error: COMPILER_WARNING (CWE-843): [#def396]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:783:21: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyCOMPS *)’ {aka ‘struct _object * (*)(PyCOMPS *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  783 |     {"validate_nf", (PyCFunction)PyCOMPS_validate_nf, METH_NOARGS,
#      |                     ^
#  781|       {"validate", (PyCFunction)PyCOMPS_validate, METH_NOARGS,
#  782|       PyCOMPS_validate__doc__},
#  783|->     {"validate_nf", (PyCFunction)PyCOMPS_validate_nf, METH_NOARGS,
#  784|       PyCOMPS_validate_nf__doc__},
#  785|       {"xml_f", (PyCFunction)PyCOMPS_toxml_f, METH_VARARGS | METH_KEYWORDS,

Error: COMPILER_WARNING (CWE-843): [#def397]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:785:15: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  785 |     {"xml_f", (PyCFunction)PyCOMPS_toxml_f, METH_VARARGS | METH_KEYWORDS,
#      |               ^
#  783|       {"validate_nf", (PyCFunction)PyCOMPS_validate_nf, METH_NOARGS,
#  784|       PyCOMPS_validate_nf__doc__},
#  785|->     {"xml_f", (PyCFunction)PyCOMPS_toxml_f, METH_VARARGS | METH_KEYWORDS,
#  786|       PyCOMPS_xml_f__doc__},
#  787|       {"xml_str", (PyCFunction)PyCOMPS_toxml_str, METH_VARARGS | METH_KEYWORDS,

Error: COMPILER_WARNING (CWE-843): [#def398]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:787:17: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  787 |     {"xml_str", (PyCFunction)PyCOMPS_toxml_str, METH_VARARGS | METH_KEYWORDS,
#      |                 ^
#  785|       {"xml_f", (PyCFunction)PyCOMPS_toxml_f, METH_VARARGS | METH_KEYWORDS,
#  786|       PyCOMPS_xml_f__doc__},
#  787|->     {"xml_str", (PyCFunction)PyCOMPS_toxml_str, METH_VARARGS | METH_KEYWORDS,
#  788|       PyCOMPS_xml_str__doc__},
#  789|       {"toxml_f", (PyCFunction)PyCOMPS_toxml_f, METH_VARARGS | METH_KEYWORDS,

Error: COMPILER_WARNING (CWE-843): [#def399]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:789:17: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  789 |     {"toxml_f", (PyCFunction)PyCOMPS_toxml_f, METH_VARARGS | METH_KEYWORDS,
#      |                 ^
#  787|       {"xml_str", (PyCFunction)PyCOMPS_toxml_str, METH_VARARGS | METH_KEYWORDS,
#  788|       PyCOMPS_xml_str__doc__},
#  789|->     {"toxml_f", (PyCFunction)PyCOMPS_toxml_f, METH_VARARGS | METH_KEYWORDS,
#  790|       PyCOMPS_toxml_f__doc__},
#  791|       {"toxml_str", (PyCFunction)PyCOMPS_toxml_str, METH_VARARGS | METH_KEYWORDS,

Error: COMPILER_WARNING (CWE-843): [#def400]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:791:19: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  791 |     {"toxml_str", (PyCFunction)PyCOMPS_toxml_str, METH_VARARGS | METH_KEYWORDS,
#      |                   ^
#  789|       {"toxml_f", (PyCFunction)PyCOMPS_toxml_f, METH_VARARGS | METH_KEYWORDS,
#  790|       PyCOMPS_toxml_f__doc__},
#  791|->     {"toxml_str", (PyCFunction)PyCOMPS_toxml_str, METH_VARARGS | METH_KEYWORDS,
#  792|       PyCOMPS_toxml_str__doc__},
#  793|       {"fromxml_f", (PyCFunction)PyCOMPS_fromxml_f, METH_VARARGS | METH_KEYWORDS,

Error: COMPILER_WARNING (CWE-843): [#def401]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:793:19: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  793 |     {"fromxml_f", (PyCFunction)PyCOMPS_fromxml_f, METH_VARARGS | METH_KEYWORDS,
#      |                   ^
#  791|       {"toxml_str", (PyCFunction)PyCOMPS_toxml_str, METH_VARARGS | METH_KEYWORDS,
#  792|       PyCOMPS_toxml_str__doc__},
#  793|->     {"fromxml_f", (PyCFunction)PyCOMPS_fromxml_f, METH_VARARGS | METH_KEYWORDS,
#  794|       PyCOMPS_fromxml_f__doc__},
#  795|       {"fromxml_str", (PyCFunction)PyCOMPS_fromxml_str, METH_VARARGS | METH_KEYWORDS,

Error: COMPILER_WARNING (CWE-843): [#def402]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:795:21: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  795 |     {"fromxml_str", (PyCFunction)PyCOMPS_fromxml_str, METH_VARARGS | METH_KEYWORDS,
#      |                     ^
#  793|       {"fromxml_f", (PyCFunction)PyCOMPS_fromxml_f, METH_VARARGS | METH_KEYWORDS,
#  794|       PyCOMPS_fromxml_f__doc__},
#  795|->     {"fromxml_str", (PyCFunction)PyCOMPS_fromxml_str, METH_VARARGS | METH_KEYWORDS,
#  796|       PyCOMPS_fromxml_str__doc__},
#  797|       {"clear", (PyCFunction)PyCOMPS_clear, METH_NOARGS,

Error: COMPILER_WARNING (CWE-843): [#def403]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:797:15: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  797 |     {"clear", (PyCFunction)PyCOMPS_clear, METH_NOARGS,
#      |               ^
#  795|       {"fromxml_str", (PyCFunction)PyCOMPS_fromxml_str, METH_VARARGS | METH_KEYWORDS,
#  796|       PyCOMPS_fromxml_str__doc__},
#  797|->     {"clear", (PyCFunction)PyCOMPS_clear, METH_NOARGS,
#  798|       "Clear Comps"},
#  799|       {"get_last_errors", (PyCFunction)PyCOMPS_get_last_errors,

Error: COMPILER_WARNING (CWE-843): [#def404]
libcomps-0.1.23/libcomps/src/python/src/pycomps.c:978:33: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  978 |     {"get_xml_default_options", (PyCFunction)Libcomps_xml_default, METH_NOARGS,
#      |                                 ^
#  976|   
#  977|   static PyMethodDef LibcompsMethods[] = {
#  978|->     {"get_xml_default_options", (PyCFunction)Libcomps_xml_default, METH_NOARGS,
#  979|        "Return xml output default options"},
#  980|       {NULL, NULL, 0, NULL}        /* Sentinel */

Error: COMPILER_WARNING (CWE-843): [#def405]
libcomps-0.1.23/libcomps/src/python/src/pycomps_categories.c:202:18: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyCOMPS_Category *)’ {aka ‘struct _object * (*)(PyCOMPS_Category *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  202 |     {"validate", (PyCFunction)PyCOMPSCat_validate, METH_NOARGS,
#      |                  ^
#  200|   
#  201|   PyMethodDef PyCOMPSCat_methods[] = {
#  202|->     {"validate", (PyCFunction)PyCOMPSCat_validate, METH_NOARGS,
#  203|       "validate inner category structure"},
#  204|       {NULL}  /* Sentinel */

Error: COMPILER_WARNING (CWE-843): [#def406]
libcomps-0.1.23/libcomps/src/python/src/pycomps_dict.c:394:16: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  394 |      {"items", (PyCFunction)PyCOMPSDict_getiteritems, METH_NOARGS,
#      |                ^
#  392|        {"has_key", (PyCFunction)PyCOMPSDict_has_key, METH_O,
#  393|          PyCOMPSDict_has_key__doc__},
#  394|->      {"items", (PyCFunction)PyCOMPSDict_getiteritems, METH_NOARGS,
#  395|        "return iterator returning (key, value) tuple"},
#  396|        {"values", (PyCFunction)PyCOMPSDict_getitervalues, METH_NOARGS,

Error: COMPILER_WARNING (CWE-843): [#def407]
libcomps-0.1.23/libcomps/src/python/src/pycomps_dict.c:396:17: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  396 |      {"values", (PyCFunction)PyCOMPSDict_getitervalues, METH_NOARGS,
#      |                 ^
#  394|        {"items", (PyCFunction)PyCOMPSDict_getiteritems, METH_NOARGS,
#  395|        "return iterator returning (key, value) tuple"},
#  396|->      {"values", (PyCFunction)PyCOMPSDict_getitervalues, METH_NOARGS,
#  397|        "return iterator returning item's value"},
#  398|        {"keys", (PyCFunction)PyCOMPSDict_getiter, METH_NOARGS,

Error: COMPILER_WARNING (CWE-843): [#def408]
libcomps-0.1.23/libcomps/src/python/src/pycomps_dict.c:398:15: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  398 |      {"keys", (PyCFunction)PyCOMPSDict_getiter, METH_NOARGS,
#      |               ^
#  396|        {"values", (PyCFunction)PyCOMPSDict_getitervalues, METH_NOARGS,
#  397|        "return iterator returning item's value"},
#  398|->      {"keys", (PyCFunction)PyCOMPSDict_getiter, METH_NOARGS,
#  399|        "return iterator returning item's key"},
#  400|        {"clear", (PyCFunction)PyCOMPSDict_clear, METH_NOARGS,

Error: COMPILER_WARNING (CWE-843): [#def409]
libcomps-0.1.23/libcomps/src/python/src/pycomps_dict.c:400:16: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  400 |      {"clear", (PyCFunction)PyCOMPSDict_clear, METH_NOARGS,
#      |                ^
#  398|        {"keys", (PyCFunction)PyCOMPSDict_getiter, METH_NOARGS,
#  399|        "return iterator returning item's key"},
#  400|->      {"clear", (PyCFunction)PyCOMPSDict_clear, METH_NOARGS,
#  401|        "clear the dict"},
#  402|        {"copy", (PyCFunction)PyCOMPSDict_copy, METH_NOARGS,

Error: COMPILER_WARNING (CWE-843): [#def410]
libcomps-0.1.23/libcomps/src/python/src/pycomps_dict.c:402:15: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  402 |      {"copy", (PyCFunction)PyCOMPSDict_copy, METH_NOARGS,
#      |               ^
#  400|        {"clear", (PyCFunction)PyCOMPSDict_clear, METH_NOARGS,
#  401|        "clear the dict"},
#  402|->      {"copy", (PyCFunction)PyCOMPSDict_copy, METH_NOARGS,
#  403|        "return shallow copy of dict"},
#  404|        {"update", (PyCFunction)PyCOMPSDict_update, METH_O,

Error: COMPILER_WARNING (CWE-843): [#def411]
libcomps-0.1.23/libcomps/src/python/src/pycomps_envs.c:168:18: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyCOMPS_Env *)’ {aka ‘struct _object * (*)(PyCOMPS_Env *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  168 |     {"validate", (PyCFunction)PyCOMPSEnv_validate, METH_NOARGS,
#      |                  ^
#  166|   
#  167|   PyMethodDef PyCOMPSEnv_methods[] = {
#  168|->     {"validate", (PyCFunction)PyCOMPSEnv_validate, METH_NOARGS,
#  169|       PyCOMPS_env_validate__doc__},
#  170|       {NULL}  /* Sentinel */

Error: COMPILER_WARNING (CWE-843): [#def412]
libcomps-0.1.23/libcomps/src/python/src/pycomps_gids.c:200:18: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyCOMPS_GID *)’ {aka ‘struct _object * (*)(PyCOMPS_GID *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  200 |     {"validate", (PyCFunction)PyCOMPSGID_validate, METH_NOARGS,
#      |                  ^
#  198|   
#  199|   PyMethodDef PyCOMPSGID_methods[] = {
#  200|->     {"validate", (PyCFunction)PyCOMPSGID_validate, METH_NOARGS,
#  201|       "validate inner Group ID structure"},
#  202|       {NULL}  /* Sentinel */

Error: COMPILER_WARNING (CWE-843): [#def413]
libcomps-0.1.23/libcomps/src/python/src/pycomps_groups.c:213:18: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyCOMPS_Group *)’ {aka ‘struct _object * (*)(PyCOMPS_Group *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  213 |     {"validate", (PyCFunction)PyCOMPSGroup_validate, METH_NOARGS,
#      |                  ^
#  211|   
#  212|   PyMethodDef PyCOMPSGroup_methods[] = {
#  213|->     {"validate", (PyCFunction)PyCOMPSGroup_validate, METH_NOARGS,
#  214|        PyCOMPS_group_validate__doc__},
#  215|       {"packages_match", (PyCFunction)PyCOMPSGroup_packages_match,

Error: COMPILER_WARNING (CWE-843): [#def414]
libcomps-0.1.23/libcomps/src/python/src/pycomps_groups.c:215:24: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  215 |     {"packages_match", (PyCFunction)PyCOMPSGroup_packages_match,
#      |                        ^
#  213|       {"validate", (PyCFunction)PyCOMPSGroup_validate, METH_NOARGS,
#  214|        PyCOMPS_group_validate__doc__},
#  215|->     {"packages_match", (PyCFunction)PyCOMPSGroup_packages_match,
#  216|        METH_VARARGS | METH_KEYWORDS,
#  217|        PyCOMPS_group_packages_match__doc__},

Error: COMPILER_WARNING (CWE-843): [#def415]
libcomps-0.1.23/libcomps/src/python/src/pycomps_groups.c:845:18: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyCOMPS_Package *)’ {aka ‘struct _object * (*)(PyCOMPS_Package *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  845 |     {"validate", (PyCFunction)PyCOMPSPackage_validate, METH_NOARGS,
#      |                  ^
#  843|   
#  844|   PyMethodDef PyCOMPSPack_methods[] = {
#  845|->     {"validate", (PyCFunction)PyCOMPSPackage_validate, METH_NOARGS,
#  846|       PyCOMPS_package_validate__doc__},
#  847|       {NULL}  /* Sentinel */

Error: COMPILER_WARNING (CWE-843): [#def416]
libcomps-0.1.23/libcomps/src/python/src/pycomps_mdict.c:414:16: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  414 |      {"items", (PyCFunction)PyCOMPSMDict_getiteritems, METH_NOARGS,
#      |                ^
#  412|        {"has_key", (PyCFunction)PyCOMPSMDict_has_key, METH_O,
#  413|        PyCOMPSMDict_has_key__doc__},
#  414|->      {"items", (PyCFunction)PyCOMPSMDict_getiteritems, METH_NOARGS,
#  415|        "return iterator returning (key, value) tuple"},
#  416|        {"values", (PyCFunction)PyCOMPSMDict_getitervalues, METH_NOARGS,

Error: COMPILER_WARNING (CWE-843): [#def417]
libcomps-0.1.23/libcomps/src/python/src/pycomps_mdict.c:416:17: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  416 |      {"values", (PyCFunction)PyCOMPSMDict_getitervalues, METH_NOARGS,
#      |                 ^
#  414|        {"items", (PyCFunction)PyCOMPSMDict_getiteritems, METH_NOARGS,
#  415|        "return iterator returning (key, value) tuple"},
#  416|->      {"values", (PyCFunction)PyCOMPSMDict_getitervalues, METH_NOARGS,
#  417|        "return iterator returning item's value"},
#  418|        {"keys", (PyCFunction)PyCOMPSMDict_getiter, METH_NOARGS,

Error: COMPILER_WARNING (CWE-843): [#def418]
libcomps-0.1.23/libcomps/src/python/src/pycomps_mdict.c:418:15: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  418 |      {"keys", (PyCFunction)PyCOMPSMDict_getiter, METH_NOARGS,
#      |               ^
#  416|        {"values", (PyCFunction)PyCOMPSMDict_getitervalues, METH_NOARGS,
#  417|        "return iterator returning item's value"},
#  418|->      {"keys", (PyCFunction)PyCOMPSMDict_getiter, METH_NOARGS,
#  419|        "return iterator returning item's key"},
#  420|        {"clear", (PyCFunction)PyCOMPSMDict_clear, METH_NOARGS,

Error: COMPILER_WARNING (CWE-843): [#def419]
libcomps-0.1.23/libcomps/src/python/src/pycomps_mdict.c:420:16: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  420 |      {"clear", (PyCFunction)PyCOMPSMDict_clear, METH_NOARGS,
#      |                ^
#  418|        {"keys", (PyCFunction)PyCOMPSMDict_getiter, METH_NOARGS,
#  419|        "return iterator returning item's key"},
#  420|->      {"clear", (PyCFunction)PyCOMPSMDict_clear, METH_NOARGS,
#  421|        "clear the dict"},
#  422|        {"copy", (PyCFunction)PyCOMPSMDict_copy, METH_NOARGS,

Error: COMPILER_WARNING (CWE-843): [#def420]
libcomps-0.1.23/libcomps/src/python/src/pycomps_mdict.c:422:15: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  422 |      {"copy", (PyCFunction)PyCOMPSMDict_copy, METH_NOARGS,
#      |               ^
#  420|        {"clear", (PyCFunction)PyCOMPSMDict_clear, METH_NOARGS,
#  421|        "clear the dict"},
#  422|->      {"copy", (PyCFunction)PyCOMPSMDict_copy, METH_NOARGS,
#  423|        "return shallow copy of dict"},
#  424|        {"update", (PyCFunction)PyCOMPSMDict_update, METH_O,

Error: COMPILER_WARNING: [#def421]
libcomps-0.1.23/libcomps/src/python/src/pycomps_sequence.c:99:13: warning[warning]: ‘_Py_TYPE’ is static but used in inline function ‘list_setitem_convert’ which is not static
#   97|           return NULL;
#   98|       for (unsigned i = 0; i < _seq_->it_info->item_types_len; i++) {
#   99|->         if (Py_TYPE(item) != _seq_->it_info->itemtypes[i])
#  100|               continue;
#  101|           if (_seq_->it_info->in_convert_funcs[i]) {

Error: COMPILER_WARNING (CWE-843): [#def422]
libcomps-0.1.23/libcomps/src/python/src/pycomps_sequence.c:646:16: warning[-Wcast-function-type]: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
#  646 |      {"clear", (PyCFunction)PyCOMPSSeq_clear, METH_NOARGS,
#      |                ^
#  644|        {"remove", (PyCFunction)PyCOMPSSeq_remove, METH_O,
#  645|        PyCOMPSSeq_remove__doc__},
#  646|->      {"clear", (PyCFunction)PyCOMPSSeq_clear, METH_NOARGS,
#  647|        "Clear the list"},
#  648|        {"insert", (PyCFunction)PyCOMPSSeq_insert, METH_VARARGS,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def423]
libcomps-0.1.23/libcomps/src/python/src/pycomps_utils.c:33:27: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
libcomps-0.1.23/libcomps/src/python/src/pycomps_utils.c:30:15: enter_function: entry to ‘__pycomps_unicode_in’
libcomps-0.1.23/libcomps/src/python/src/pycomps_utils.c:32:5: call_function: calling ‘__pycomps_PyUnicode_AsString’ from ‘__pycomps_unicode_in’
libcomps-0.1.23/libcomps/src/python/src/pycomps_utils.c:32:5: return_function: returning to ‘__pycomps_unicode_in’ from ‘__pycomps_PyUnicode_AsString’
libcomps-0.1.23/libcomps/src/python/src/pycomps_utils.c:33:27: danger: ‘tmp’ leaks here; was allocated at [(10)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/9)
#   31|       char *tmp = NULL;
#   32|       __pycomps_PyUnicode_AsString(obj, &tmp);
#   33|->     return (COMPS_Object*)comps_str_x(tmp);
#   34|   }
#   35|   

Error: CPPCHECK_WARNING (CWE-476): [#def424]
libcomps-0.1.23/libcomps/src/python/src/pycomps_utils.c:171: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  169|       void *ret;
#  170|       ret = malloc(sizeof(char)*(strlen(str)+1));
#  171|->     memcpy(ret, str, sizeof(char)*(strlen(str)+1));
#  172|       return ret;
#  173|   }

Error: CPPCHECK_WARNING (CWE-476): [#def425]
libcomps-0.1.23/libcomps/tests/check_brtree.c:36: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   34|       struct _teststruct *ret;
#   35|       ret = malloc(sizeof(struct _teststruct));
#   36|->     ret->testdata = malloc(sizeof(char)*(strlen(testdata)+1));
#   37|       memcpy(ret->testdata, testdata, sizeof(char)*(strlen(testdata)+1));
#   38|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def426]
libcomps-0.1.23/libcomps/tests/check_brtree.c:36:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
libcomps-0.1.23/libcomps/tests/check_brtree.c:35:11: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/tests/check_brtree.c:36:5: danger: ‘ret’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   34|       struct _teststruct *ret;
#   35|       ret = malloc(sizeof(struct _teststruct));
#   36|->     ret->testdata = malloc(sizeof(char)*(strlen(testdata)+1));
#   37|       memcpy(ret->testdata, testdata, sizeof(char)*(strlen(testdata)+1));
#   38|       return ret;

Error: CPPCHECK_WARNING (CWE-476): [#def427]
libcomps-0.1.23/libcomps/tests/check_brtree.c:37: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   35|       ret = malloc(sizeof(struct _teststruct));
#   36|       ret->testdata = malloc(sizeof(char)*(strlen(testdata)+1));
#   37|->     memcpy(ret->testdata, testdata, sizeof(char)*(strlen(testdata)+1));
#   38|       return ret;
#   39|   }

Error: CPPCHECK_WARNING (CWE-476): [#def428]
libcomps-0.1.23/libcomps/tests/check_brtree.c:76: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   74|   
#   75|       ret = malloc(sizeof(struct _key));
#   76|->     ret->key = malloc(sizeof(char)*len);
#   77|       ret->key = memcpy(ret->key, ((struct _key*)key)->key, sizeof(char)*len);
#   78|       ret->keylen = len;

Error: CPPCHECK_WARNING (CWE-476): [#def429]
libcomps-0.1.23/libcomps/tests/check_brtree.c:77: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   75|       ret = malloc(sizeof(struct _key));
#   76|       ret->key = malloc(sizeof(char)*len);
#   77|->     ret->key = memcpy(ret->key, ((struct _key*)key)->key, sizeof(char)*len);
#   78|       ret->keylen = len;
#   79|       /*printf("clonned key\n");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def430]
libcomps-0.1.23/libcomps/tests/check_brtree.c:77:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
libcomps-0.1.23/libcomps/tests/check_brtree.c:75:11: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/tests/check_brtree.c:77:5: danger: ‘ret’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   75|       ret = malloc(sizeof(struct _key));
#   76|       ret->key = malloc(sizeof(char)*len);
#   77|->     ret->key = memcpy(ret->key, ((struct _key*)key)->key, sizeof(char)*len);
#   78|       ret->keylen = len;
#   79|       /*printf("clonned key\n");

Error: CPPCHECK_WARNING (CWE-476): [#def431]
libcomps-0.1.23/libcomps/tests/check_brtree.c:78: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   76|       ret->key = malloc(sizeof(char)*len);
#   77|       ret->key = memcpy(ret->key, ((struct _key*)key)->key, sizeof(char)*len);
#   78|->     ret->keylen = len;
#   79|       /*printf("clonned key\n");
#   80|       print_key(ret);

Error: CPPCHECK_WARNING (CWE-476): [#def432]
libcomps-0.1.23/libcomps/tests/check_brtree.c:89: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   87|       unsigned char i;
#   88|       ret = malloc(sizeof(struct _key));
#   89|->     ret->key = malloc(sizeof(char)*sizeof(x));
#   90|       for (i = 0; i<sizeof(x); i++) {
#   91|           ret->key[i] = ((char*)&x)[sizeof(x)-i-1];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def433]
libcomps-0.1.23/libcomps/tests/check_brtree.c:89:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
libcomps-0.1.23/libcomps/tests/check_brtree.c:88:11: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/tests/check_brtree.c:89:5: danger: ‘ret’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   87|       unsigned char i;
#   88|       ret = malloc(sizeof(struct _key));
#   89|->     ret->key = malloc(sizeof(char)*sizeof(x));
#   90|       for (i = 0; i<sizeof(x); i++) {
#   91|           ret->key[i] = ((char*)&x)[sizeof(x)-i-1];

Error: CPPCHECK_WARNING (CWE-476): [#def434]
libcomps-0.1.23/libcomps/tests/check_brtree.c:91: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   89|       ret->key = malloc(sizeof(char)*sizeof(x));
#   90|       for (i = 0; i<sizeof(x); i++) {
#   91|->         ret->key[i] = ((char*)&x)[sizeof(x)-i-1];
#   92|       }
#   93|       /*printf("make_key\n");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def435]
libcomps-0.1.23/libcomps/tests/check_brtree.c:91:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(8)’
libcomps-0.1.23/libcomps/tests/check_brtree.c:89:16: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/tests/check_brtree.c:90:17: branch_true: following ‘true’ branch (when ‘i != 8’)...
libcomps-0.1.23/libcomps/tests/check_brtree.c:91:35: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_brtree.c:91:9: danger: ‘malloc(8) + (sizetype)i’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   89|       ret->key = malloc(sizeof(char)*sizeof(x));
#   90|       for (i = 0; i<sizeof(x); i++) {
#   91|->         ret->key[i] = ((char*)&x)[sizeof(x)-i-1];
#   92|       }
#   93|       /*printf("make_key\n");

Error: CPPCHECK_WARNING (CWE-476): [#def436]
libcomps-0.1.23/libcomps/tests/check_brtree.c:99: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   97|       }*/
#   98|       //printf("---\n");
#   99|->     ret->keylen = sizeof(x);
#  100|       return ret;
#  101|   }

Error: CPPCHECK_WARNING (CWE-476): [#def437]
libcomps-0.1.23/libcomps/tests/check_brtree.c:135: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  133|       ret = malloc(sizeof(struct _key));
#  134|       //ret->key = ((struct _key*)key)->key;
#  135|->     ret->key = malloc(sizeof(char)*len);
#  136|       //memset(((char*)&ret->key), 0, offset);
#  137|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def438]
libcomps-0.1.23/libcomps/tests/check_brtree.c:135:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
libcomps-0.1.23/libcomps/tests/check_brtree.c:133:11: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/tests/check_brtree.c:135:5: danger: ‘ret’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  133|       ret = malloc(sizeof(struct _key));
#  134|       //ret->key = ((struct _key*)key)->key;
#  135|->     ret->key = malloc(sizeof(char)*len);
#  136|       //memset(((char*)&ret->key), 0, offset);
#  137|   

Error: CPPCHECK_WARNING (CWE-476): [#def439]
libcomps-0.1.23/libcomps/tests/check_brtree.c:138: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  136|       //memset(((char*)&ret->key), 0, offset);
#  137|   
#  138|->     memcpy(ret->key, ((struct _key*)key)->key+offset, len-offset);
#  139|       //printf("subkey offset:%d len:%d\n", offset, len);
#  140|       ret->keylen = len-offset;

Error: CPPCHECK_WARNING (CWE-476): [#def440]
libcomps-0.1.23/libcomps/tests/check_brtree.c:140: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  138|       memcpy(ret->key, ((struct _key*)key)->key+offset, len-offset);
#  139|       //printf("subkey offset:%d len:%d\n", offset, len);
#  140|->     ret->keylen = len-offset;
#  141|       /*printf("subkey: ");
#  142|       print_key_(ret);

Error: CPPCHECK_WARNING (CWE-476): [#def441]
libcomps-0.1.23/libcomps/tests/check_brtree.c:156: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  154|       unsigned int i, len;
#  155|       ret = malloc(sizeof(struct _key));
#  156|->     ret->key = malloc(sizeof(char)*(((struct _key*)key1)->keylen +\
#  157|                                       ((struct _key*)key2)->keylen));
#  158|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def442]
libcomps-0.1.23/libcomps/tests/check_brtree.c:156:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
libcomps-0.1.23/libcomps/tests/check_brtree.c:155:11: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/tests/check_brtree.c:156:5: danger: ‘ret’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  154|       unsigned int i, len;
#  155|       ret = malloc(sizeof(struct _key));
#  156|->     ret->key = malloc(sizeof(char)*(((struct _key*)key1)->keylen +\
#  157|                                       ((struct _key*)key2)->keylen));
#  158|   

Error: CPPCHECK_WARNING (CWE-476): [#def443]
libcomps-0.1.23/libcomps/tests/check_brtree.c:163: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  161|   
#  162|       for (i = 0; i < ((struct _key*)key1)->keylen; i++)
#  163|->         ret->key[i] = ((struct _key*)key1)->key[i];
#  164|       ret->keylen = i; 
#  165|       len = i;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def444]
libcomps-0.1.23/libcomps/tests/check_brtree.c:163:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc((long unsigned int)(*(struct _key *)key1.keylen + *(struct _key *)key2.keylen))’
libcomps-0.1.23/libcomps/tests/check_brtree.c:156:16: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/tests/check_brtree.c:162:17: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_brtree.c:163:23: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_brtree.c:163:9: danger: ‘malloc((long unsigned int)(*(struct _key *)key1.keylen + *(struct _key *)key2.keylen)) + (sizetype)i’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  161|   
#  162|       for (i = 0; i < ((struct _key*)key1)->keylen; i++)
#  163|->         ret->key[i] = ((struct _key*)key1)->key[i];
#  164|       ret->keylen = i; 
#  165|       len = i;

Error: CPPCHECK_WARNING (CWE-476): [#def445]
libcomps-0.1.23/libcomps/tests/check_brtree.c:164: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  162|       for (i = 0; i < ((struct _key*)key1)->keylen; i++)
#  163|           ret->key[i] = ((struct _key*)key1)->key[i];
#  164|->     ret->keylen = i; 
#  165|       len = i;
#  166|       //printf("len: %d\n", len);

Error: CPPCHECK_WARNING (CWE-476): [#def446]
libcomps-0.1.23/libcomps/tests/check_brtree.c:168: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  166|       //printf("len: %d\n", len);
#  167|       for (i = 0; i < ((struct _key*)key2)->keylen; i++)
#  168|->         ret->key[i+len] = ((struct _key*)key2)->key[i];
#  169|       //printf("len2: %d\n", ((struct _key*)key2)->keylen);
#  170|       ret->keylen += i;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def447]
libcomps-0.1.23/libcomps/tests/check_brtree.c:168:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc((long unsigned int)(*(struct _key *)key1.keylen + *(struct _key *)key2.keylen))’
libcomps-0.1.23/libcomps/tests/check_brtree.c:156:16: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/tests/check_brtree.c:162:17: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_brtree.c:167:17: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_brtree.c:168:27: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_brtree.c:168:9: danger: ‘malloc((long unsigned int)(*(struct _key *)key1.keylen + *(struct _key *)key2.keylen)) + (sizetype)(i + i)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  166|       //printf("len: %d\n", len);
#  167|       for (i = 0; i < ((struct _key*)key2)->keylen; i++)
#  168|->         ret->key[i+len] = ((struct _key*)key2)->key[i];
#  169|       //printf("len2: %d\n", ((struct _key*)key2)->keylen);
#  170|       ret->keylen += i;

Error: CPPCHECK_WARNING (CWE-476): [#def448]
libcomps-0.1.23/libcomps/tests/check_brtree.c:170: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  168|           ret->key[i+len] = ((struct _key*)key2)->key[i];
#  169|       //printf("len2: %d\n", ((struct _key*)key2)->keylen);
#  170|->     ret->keylen += i;
#  171|       return ret;
#  172|   }

Error: CPPCHECK_WARNING (CWE-476): [#def449]
libcomps-0.1.23/libcomps/tests/check_brtree.c:191: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  189|   void* int_cloner(void * int_v) {
#  190|       void * ret = malloc(sizeof(int));
#  191|->     memcpy(ret, int_v, sizeof(int));
#  192|       return ret;
#  193|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def450]
libcomps-0.1.23/libcomps/tests/check_brtree.c:191:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
libcomps-0.1.23/libcomps/tests/check_brtree.c:190:18: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/tests/check_brtree.c:191:5: danger: ‘ret’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  189|   void* int_cloner(void * int_v) {
#  190|       void * ret = malloc(sizeof(int));
#  191|->     memcpy(ret, int_v, sizeof(int));
#  192|       return ret;
#  193|   }

Error: CPPCHECK_WARNING (CWE-476): [#def451]
libcomps-0.1.23/libcomps/tests/check_brtree.c:197: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  195|   void* str_cloner(void *str) {
#  196|       void *ret = malloc(sizeof(char)* (strlen((char*)str)+1));
#  197|->     memcpy(ret, str, (strlen((char*)str)+1));
#  198|       return ret;
#  199|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def452]
libcomps-0.1.23/libcomps/tests/check_brtree.c:266:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:266:5: danger: ‘<unknown>’ leaks here; was allocated at [(4)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/3)
#  264|   
#  265|       key = make_key(&a);
#  266|->     comps_brtree_set(tree, key, int_cloner(&a));
#  267|       key_destroy(key);
#  268|       key = make_key(&b);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def453]
libcomps-0.1.23/libcomps/tests/check_brtree.c:266:5: warning[-Wanalyzer-malloc-leak]: leak of ‘make_key(&a)’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:266:5: danger: ‘make_key(&a)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/3)
#  264|   
#  265|       key = make_key(&a);
#  266|->     comps_brtree_set(tree, key, int_cloner(&a));
#  267|       key_destroy(key);
#  268|       key = make_key(&b);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def454]
libcomps-0.1.23/libcomps/tests/check_brtree.c:266:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:266:5: call_function: inlined call to ‘int_cloner’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:266:5: danger: ‘ret’ leaks here; was allocated at [(10)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/9)
#  264|   
#  265|       key = make_key(&a);
#  266|->     comps_brtree_set(tree, key, int_cloner(&a));
#  267|       key_destroy(key);
#  268|       key = make_key(&b);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def455]
libcomps-0.1.23/libcomps/tests/check_brtree.c:269:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:269:5: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/10)
#  267|       key_destroy(key);
#  268|       key = make_key(&b);
#  269|->     comps_brtree_set(tree, key, int_cloner(&b));
#  270|       key_destroy(key);
#  271|       key = make_key(&c);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def456]
libcomps-0.1.23/libcomps/tests/check_brtree.c:269:5: warning[-Wanalyzer-malloc-leak]: leak of ‘make_key(&b)’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:269:5: danger: ‘make_key(&b)’ leaks here; was allocated at [(17)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/16)
#  267|       key_destroy(key);
#  268|       key = make_key(&b);
#  269|->     comps_brtree_set(tree, key, int_cloner(&b));
#  270|       key_destroy(key);
#  271|       key = make_key(&c);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def457]
libcomps-0.1.23/libcomps/tests/check_brtree.c:269:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:269:5: call_function: inlined call to ‘int_cloner’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:269:5: danger: ‘ret’ leaks here; was allocated at [(17)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/16)
#  267|       key_destroy(key);
#  268|       key = make_key(&b);
#  269|->     comps_brtree_set(tree, key, int_cloner(&b));
#  270|       key_destroy(key);
#  271|       key = make_key(&c);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def458]
libcomps-0.1.23/libcomps/tests/check_brtree.c:272:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:272:5: danger: ‘<unknown>’ leaks here; was allocated at [(18)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/17)
#  270|       key_destroy(key);
#  271|       key = make_key(&c);
#  272|->     comps_brtree_set(tree, key, int_cloner(&c));
#  273|       key_destroy(key);
#  274|       key = make_key(&d);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def459]
libcomps-0.1.23/libcomps/tests/check_brtree.c:272:5: warning[-Wanalyzer-malloc-leak]: leak of ‘make_key(&c)’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:270:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:270:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:272:5: danger: ‘make_key(&c)’ leaks here; was allocated at [(30)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/29)
#  270|       key_destroy(key);
#  271|       key = make_key(&c);
#  272|->     comps_brtree_set(tree, key, int_cloner(&c));
#  273|       key_destroy(key);
#  274|       key = make_key(&d);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def460]
libcomps-0.1.23/libcomps/tests/check_brtree.c:272:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:272:5: call_function: inlined call to ‘int_cloner’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:272:5: danger: ‘ret’ leaks here; was allocated at [(24)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/23)
#  270|       key_destroy(key);
#  271|       key = make_key(&c);
#  272|->     comps_brtree_set(tree, key, int_cloner(&c));
#  273|       key_destroy(key);
#  274|       key = make_key(&d);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def461]
libcomps-0.1.23/libcomps/tests/check_brtree.c:275:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:275:5: danger: ‘<unknown>’ leaks here; was allocated at [(25)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/24)
#  273|       key_destroy(key);
#  274|       key = make_key(&d);
#  275|->     comps_brtree_set(tree, key, int_cloner(&d));
#  276|       key_destroy(key);
#  277|       key = make_key(&e);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def462]
libcomps-0.1.23/libcomps/tests/check_brtree.c:275:5: warning[-Wanalyzer-malloc-leak]: leak of ‘make_key(&d)’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:270:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:270:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:273:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:273:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:275:5: danger: ‘make_key(&d)’ leaks here; was allocated at [(43)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/42)
#  273|       key_destroy(key);
#  274|       key = make_key(&d);
#  275|->     comps_brtree_set(tree, key, int_cloner(&d));
#  276|       key_destroy(key);
#  277|       key = make_key(&e);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def463]
libcomps-0.1.23/libcomps/tests/check_brtree.c:275:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:275:5: call_function: inlined call to ‘int_cloner’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:275:5: danger: ‘ret’ leaks here; was allocated at [(31)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/30)
#  273|       key_destroy(key);
#  274|       key = make_key(&d);
#  275|->     comps_brtree_set(tree, key, int_cloner(&d));
#  276|       key_destroy(key);
#  277|       key = make_key(&e);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def464]
libcomps-0.1.23/libcomps/tests/check_brtree.c:278:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:278:5: danger: ‘<unknown>’ leaks here; was allocated at [(32)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/31)
#  276|       key_destroy(key);
#  277|       key = make_key(&e);
#  278|->     comps_brtree_set(tree, key, int_cloner(&e));
#  279|       key_destroy(key);
#  280|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def465]
libcomps-0.1.23/libcomps/tests/check_brtree.c:278:5: warning[-Wanalyzer-malloc-leak]: leak of ‘make_key(&e)’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:270:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:270:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:273:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:273:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:276:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:276:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:278:5: danger: ‘make_key(&e)’ leaks here; was allocated at [(56)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/55)
#  276|       key_destroy(key);
#  277|       key = make_key(&e);
#  278|->     comps_brtree_set(tree, key, int_cloner(&e));
#  279|       key_destroy(key);
#  280|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def466]
libcomps-0.1.23/libcomps/tests/check_brtree.c:278:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:278:5: call_function: inlined call to ‘int_cloner’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:278:5: danger: ‘ret’ leaks here; was allocated at [(38)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/37)
#  276|       key_destroy(key);
#  277|       key = make_key(&e);
#  278|->     comps_brtree_set(tree, key, int_cloner(&e));
#  279|       key_destroy(key);
#  280|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def467]
libcomps-0.1.23/libcomps/tests/check_brtree.c:288:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:288:5: danger: ‘<unknown>’ leaks here; was allocated at [(39)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/38)
#  286|   
#  287|       key = make_key(&a);
#  288|->     comps_brtree_set(tree, key, int_cloner(&aa));
#  289|       key_destroy(key);
#  290|       key = make_key(&b);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def468]
libcomps-0.1.23/libcomps/tests/check_brtree.c:288:5: warning[-Wanalyzer-malloc-leak]: leak of ‘make_key(&a)’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:270:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:270:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:273:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:273:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:276:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:276:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:279:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:279:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:288:5: danger: ‘make_key(&a)’ leaks here; was allocated at [(69)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/68)
#  286|   
#  287|       key = make_key(&a);
#  288|->     comps_brtree_set(tree, key, int_cloner(&aa));
#  289|       key_destroy(key);
#  290|       key = make_key(&b);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def469]
libcomps-0.1.23/libcomps/tests/check_brtree.c:288:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:288:5: call_function: inlined call to ‘int_cloner’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:288:5: danger: ‘ret’ leaks here; was allocated at [(45)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/44)
#  286|   
#  287|       key = make_key(&a);
#  288|->     comps_brtree_set(tree, key, int_cloner(&aa));
#  289|       key_destroy(key);
#  290|       key = make_key(&b);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def470]
libcomps-0.1.23/libcomps/tests/check_brtree.c:291:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:290:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:290:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:291:5: danger: ‘<unknown>’ leaks here; was allocated at [(46)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/45)
#  289|       key_destroy(key);
#  290|       key = make_key(&b);
#  291|->     comps_brtree_set(tree, key, int_cloner(&bb));
#  292|       key_destroy(key);
#  293|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def471]
libcomps-0.1.23/libcomps/tests/check_brtree.c:291:5: warning[-Wanalyzer-malloc-leak]: leak of ‘make_key(&b)’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:270:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:270:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:273:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:273:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:276:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:276:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:279:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:279:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:289:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:289:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:290:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:290:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:291:5: danger: ‘make_key(&b)’ leaks here; was allocated at [(82)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/81)
#  289|       key_destroy(key);
#  290|       key = make_key(&b);
#  291|->     comps_brtree_set(tree, key, int_cloner(&bb));
#  292|       key_destroy(key);
#  293|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def472]
libcomps-0.1.23/libcomps/tests/check_brtree.c:291:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:290:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:290:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:291:5: call_function: inlined call to ‘int_cloner’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:291:5: danger: ‘ret’ leaks here; was allocated at [(52)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/51)
#  289|       key_destroy(key);
#  290|       key = make_key(&b);
#  291|->     comps_brtree_set(tree, key, int_cloner(&bb));
#  292|       key_destroy(key);
#  293|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def473]
libcomps-0.1.23/libcomps/tests/check_brtree.c:297:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:290:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:290:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:296:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:296:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:297:12: danger: ‘<unknown>’ leaks here; was allocated at [(53)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/52)
#  295|   
#  296|       key = make_key(&c);
#  297|->     ret =  comps_brtree_get(tree, key);
#  298|       key_destroy(key);
#  299|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def474]
libcomps-0.1.23/libcomps/tests/check_brtree.c:297:12: warning[-Wanalyzer-malloc-leak]: leak of ‘make_key(&c)’
libcomps-0.1.23/libcomps/tests/check_brtree.c:240:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:265:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:267:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:268:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:270:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:270:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:271:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:273:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:273:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:274:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:276:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:276:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:277:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:279:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:279:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:287:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:289:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:289:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:290:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:290:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:292:5: call_function: calling ‘key_destroy’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:292:5: return_function: returning to ‘main’ from ‘key_destroy’
libcomps-0.1.23/libcomps/tests/check_brtree.c:296:11: call_function: calling ‘make_key’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_brtree.c:296:11: return_function: returning to ‘main’ from ‘make_key’
libcomps-0.1.23/libcomps/tests/check_brtree.c:297:12: danger: ‘make_key(&c)’ leaks here; was allocated at [(95)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/94)
#  295|   
#  296|       key = make_key(&c);
#  297|->     ret =  comps_brtree_get(tree, key);
#  298|       key_destroy(key);
#  299|   

Error: COMPILER_WARNING (CWE-685): [#def475]
libcomps-0.1.23/libcomps/tests/check_comps.c:20: included_from: Included from here.
libcomps-0.1.23/libcomps/tests/check_comps.c: scope_hint: In function ‘test_comps_doc_basic_fn’
libcomps-0.1.23/libcomps/tests/check_comps.c:90:32: warning[-Wformat-extra-args]: too many arguments for format
#   90 |     fail_if(tmplist->len == 0, "No groups found");
#      |                                ^~~~~~~~~~~~~~~~~
#   88|       }
#   89|       tmplist = comps_doc_groups(doc);
#   90|->     fail_if(tmplist->len == 0, "No groups found");
#   91|       g = (COMPS_DocGroup*)tmplist->first->comps_obj;
#   92|       COMPS_OBJECT_DESTROY(tmplist);

Error: COMPILER_WARNING (CWE-685): [#def476]
libcomps-0.1.23/libcomps/tests/check_comps.c:95:32: warning[-Wformat-extra-args]: too many arguments for format
#   95 |     fail_if(tmplist->len == 0, "Group with id 'g1' should be in groups, but"
#      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   93|   
#   94|       tmplist = comps_doc_get_groups(doc, "g1", NULL, NULL, NULL, 0);
#   95|->     fail_if(tmplist->len == 0, "Group with id 'g1' should be in groups, but"
#   96|                                  "cant get it");
#   97|       g = (COMPS_DocGroup*)tmplist->first->comps_obj;

Error: COMPILER_WARNING (CWE-685): [#def477]
libcomps-0.1.23/libcomps/tests/check_comps.c:101:32: warning[-Wformat-extra-args]: too many arguments for format
#   99|   
#  100|       tmplist = comps_docgroup_get_packages(g, NULL, COMPS_PACKAGE_OPTIONAL);
#  101|->     fail_if(tmplist->len != 4, "Group with id 'g1' should have 4 optional "
#  102|                                  "packages. But have %d.", tmplist->len);
#  103|       COMPS_OBJECT_DESTROY(tmplist);

Error: COMPILER_WARNING: [#def478]
libcomps-0.1.23/libcomps/tests/check_comps.c:101:32: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  101 |     fail_if(tmplist->len != 4, "Group with id 'g1' should have 4 optional "
#      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  102 |                                "packages. But have %d.", tmplist->len);
#      |                                                          ~~~~~~~~~~~~
#      |                                                                 |
#      |                                                                 size_t {aka long unsigned int}
#   99|   
#  100|       tmplist = comps_docgroup_get_packages(g, NULL, COMPS_PACKAGE_OPTIONAL);
#  101|->     fail_if(tmplist->len != 4, "Group with id 'g1' should have 4 optional "
#  102|                                  "packages. But have %d.", tmplist->len);
#  103|       COMPS_OBJECT_DESTROY(tmplist);

Error: COMPILER_WARNING (CWE-685): [#def479]
libcomps-0.1.23/libcomps/tests/check_comps.c:105:32: warning[-Wformat-extra-args]: too many arguments for format
#  103|       COMPS_OBJECT_DESTROY(tmplist);
#  104|       tmplist = comps_docgroup_get_packages(g, NULL, COMPS_PACKAGE_MANDATORY);
#  105|->     fail_if(tmplist->len != 4, "Group with id 'g1' should have 4 optional "
#  106|                                  "packages. But have %d.", tmplist->len);
#  107|       COMPS_OBJECT_DESTROY(tmplist);

Error: COMPILER_WARNING: [#def480]
libcomps-0.1.23/libcomps/tests/check_comps.c:105:32: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  105 |     fail_if(tmplist->len != 4, "Group with id 'g1' should have 4 optional "
#      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  106 |                                "packages. But have %d.", tmplist->len);
#      |                                                          ~~~~~~~~~~~~
#      |                                                                 |
#      |                                                                 size_t {aka long unsigned int}
#  103|       COMPS_OBJECT_DESTROY(tmplist);
#  104|       tmplist = comps_docgroup_get_packages(g, NULL, COMPS_PACKAGE_MANDATORY);
#  105|->     fail_if(tmplist->len != 4, "Group with id 'g1' should have 4 optional "
#  106|                                  "packages. But have %d.", tmplist->len);
#  107|       COMPS_OBJECT_DESTROY(tmplist);

Error: COMPILER_WARNING (CWE-685): [#def481]
libcomps-0.1.23/libcomps/tests/check_comps.c:279:37: warning[-Wformat-extra-args]: too many arguments for format
#  277|       g2 = (COMPS_DocGroup*)list->first->next->comps_obj;
#  278|       g = comps_docgroup_union(g1, g2);
#  279|->     fail_if(g->packages->len != 14, "Union of (g1 v g2) should have 14 packages"
#  280|               " have %d", g->packages->len);
#  281|       COMPS_OBJECT_DESTROY(g);

Error: COMPILER_WARNING: [#def482]
libcomps-0.1.23/libcomps/tests/check_comps.c: scope_hint: In function ‘test_comps_doc_setfeats_fn’
libcomps-0.1.23/libcomps/tests/check_comps.c:279:37: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  279 |     fail_if(g->packages->len != 14, "Union of (g1 v g2) should have 14 packages"
#      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  280 |             " have %d", g->packages->len);
#      |                         ~~~~~~~~~~~~~~~~
#      |                                    |
#      |                                    size_t {aka long unsigned int}
#  277|       g2 = (COMPS_DocGroup*)list->first->next->comps_obj;
#  278|       g = comps_docgroup_union(g1, g2);
#  279|->     fail_if(g->packages->len != 14, "Union of (g1 v g2) should have 14 packages"
#  280|               " have %d", g->packages->len);
#  281|       COMPS_OBJECT_DESTROY(g);

Error: COMPILER_WARNING (CWE-685): [#def483]
libcomps-0.1.23/libcomps/tests/check_comps.c:283:36: warning[-Wformat-extra-args]: too many arguments for format
#  281|       COMPS_OBJECT_DESTROY(g);
#  282|       g = comps_docgroup_intersect(g1, g2);
#  283|->     fail_if(g->packages->len != 2, "Intersect of (g1 ^ g2) should have 2"
#  284|               "packages, have %d", g->packages->len);
#  285|       COMPS_OBJECT_DESTROY(g);

Error: COMPILER_WARNING: [#def484]
libcomps-0.1.23/libcomps/tests/check_comps.c:283:36: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  283 |     fail_if(g->packages->len != 2, "Intersect of (g1 ^ g2) should have 2"
#      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  284 |             "packages, have %d", g->packages->len);
#      |                                  ~~~~~~~~~~~~~~~~
#      |                                             |
#      |                                             size_t {aka long unsigned int}
#  281|       COMPS_OBJECT_DESTROY(g);
#  282|       g = comps_docgroup_intersect(g1, g2);
#  283|->     fail_if(g->packages->len != 2, "Intersect of (g1 ^ g2) should have 2"
#  284|               "packages, have %d", g->packages->len);
#  285|       COMPS_OBJECT_DESTROY(g);

Error: COMPILER_WARNING (CWE-685): [#def485]
libcomps-0.1.23/libcomps/tests/check_comps.c:289:37: warning[-Wformat-extra-args]: too many arguments for format
#  287|       g2 = (COMPS_DocGroup*)list->first->next->next->comps_obj;
#  288|       g = comps_docgroup_union(g1, g2);
#  289|->     fail_if(g->packages->len != 16, "Union of (g2 v g3) should have 16 packages"
#  290|               " have %d", g->packages->len);
#  291|       COMPS_OBJECT_DESTROY(g);

Error: COMPILER_WARNING: [#def486]
libcomps-0.1.23/libcomps/tests/check_comps.c:289:37: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  289 |     fail_if(g->packages->len != 16, "Union of (g2 v g3) should have 16 packages"
#      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  290 |             " have %d", g->packages->len);
#      |                         ~~~~~~~~~~~~~~~~
#      |                                    |
#      |                                    size_t {aka long unsigned int}
#  287|       g2 = (COMPS_DocGroup*)list->first->next->next->comps_obj;
#  288|       g = comps_docgroup_union(g1, g2);
#  289|->     fail_if(g->packages->len != 16, "Union of (g2 v g3) should have 16 packages"
#  290|               " have %d", g->packages->len);
#  291|       COMPS_OBJECT_DESTROY(g);

Error: COMPILER_WARNING (CWE-685): [#def487]
libcomps-0.1.23/libcomps/tests/check_comps.c:293:36: warning[-Wformat-extra-args]: too many arguments for format
#  291|       COMPS_OBJECT_DESTROY(g);
#  292|       g = comps_docgroup_intersect(g1, g2);
#  293|->     fail_if(g->packages->len != 0, "Intersect of (g2 ^ g3) should have 0"
#  294|               "packages, have %d", g->packages->len);
#  295|       COMPS_OBJECT_DESTROY(g);

Error: COMPILER_WARNING: [#def488]
libcomps-0.1.23/libcomps/tests/check_comps.c:293:36: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  293 |     fail_if(g->packages->len != 0, "Intersect of (g2 ^ g3) should have 0"
#      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  294 |             "packages, have %d", g->packages->len);
#      |                                  ~~~~~~~~~~~~~~~~
#      |                                             |
#      |                                             size_t {aka long unsigned int}
#  291|       COMPS_OBJECT_DESTROY(g);
#  292|       g = comps_docgroup_intersect(g1, g2);
#  293|->     fail_if(g->packages->len != 0, "Intersect of (g2 ^ g3) should have 0"
#  294|               "packages, have %d", g->packages->len);
#  295|       COMPS_OBJECT_DESTROY(g);

Error: COMPILER_WARNING (CWE-685): [#def489]
libcomps-0.1.23/libcomps/tests/check_comps.c:303:37: warning[-Wformat-extra-args]: too many arguments for format
#  301|       c = comps_doccategory_union(c1, c2);
#  302|       //print_category(c);
#  303|->     fail_if(c->group_ids->len != 4, "Union of (c1 v c2) should have 4 "
#  304|               "group ids, have %d", c->group_ids->len);
#  305|       COMPS_OBJECT_DESTROY(c);

Error: COMPILER_WARNING: [#def490]
libcomps-0.1.23/libcomps/tests/check_comps.c:303:37: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  303 |     fail_if(c->group_ids->len != 4, "Union of (c1 v c2) should have 4 "
#      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  304 |             "group ids, have %d", c->group_ids->len);
#      |                                   ~~~~~~~~~~~~~~~~~
#      |                                               |
#      |                                               size_t {aka long unsigned int}
#  301|       c = comps_doccategory_union(c1, c2);
#  302|       //print_category(c);
#  303|->     fail_if(c->group_ids->len != 4, "Union of (c1 v c2) should have 4 "
#  304|               "group ids, have %d", c->group_ids->len);
#  305|       COMPS_OBJECT_DESTROY(c);

Error: COMPILER_WARNING (CWE-685): [#def491]
libcomps-0.1.23/libcomps/tests/check_comps.c:308:37: warning[-Wformat-extra-args]: too many arguments for format
#  306|   
#  307|       c = comps_doccategory_intersect(c1, c2);
#  308|->     fail_if(c->group_ids->len != 2, "Intersect of (c1 ^ c2) should have 2"
#  309|               "group ids, have %d", c->group_ids->len);
#  310|       COMPS_OBJECT_DESTROY(c);

Error: COMPILER_WARNING: [#def492]
libcomps-0.1.23/libcomps/tests/check_comps.c:308:37: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  308 |     fail_if(c->group_ids->len != 2, "Intersect of (c1 ^ c2) should have 2"
#      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  309 |             "group ids, have %d", c->group_ids->len);
#      |                                   ~~~~~~~~~~~~~~~~~
#      |                                               |
#      |                                               size_t {aka long unsigned int}
#  306|   
#  307|       c = comps_doccategory_intersect(c1, c2);
#  308|->     fail_if(c->group_ids->len != 2, "Intersect of (c1 ^ c2) should have 2"
#  309|               "group ids, have %d", c->group_ids->len);
#  310|       COMPS_OBJECT_DESTROY(c);

Error: COMPILER_WARNING (CWE-685): [#def493]
libcomps-0.1.23/libcomps/tests/check_comps.c:315:37: warning[-Wformat-extra-args]: too many arguments for format
#  313|       c2 = (COMPS_DocCategory*)list->first->next->next->comps_obj;
#  314|       c = comps_doccategory_union(c1, c2);
#  315|->     fail_if(c->group_ids->len != 4, "Union of (c2 v c3) should have 4 "
#  316|               "group ids, have %d", c->group_ids->len);
#  317|       COMPS_OBJECT_DESTROY(c);

Error: COMPILER_WARNING: [#def494]
libcomps-0.1.23/libcomps/tests/check_comps.c:315:37: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  315 |     fail_if(c->group_ids->len != 4, "Union of (c2 v c3) should have 4 "
#      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  316 |             "group ids, have %d", c->group_ids->len);
#      |                                   ~~~~~~~~~~~~~~~~~
#      |                                               |
#      |                                               size_t {aka long unsigned int}
#  313|       c2 = (COMPS_DocCategory*)list->first->next->next->comps_obj;
#  314|       c = comps_doccategory_union(c1, c2);
#  315|->     fail_if(c->group_ids->len != 4, "Union of (c2 v c3) should have 4 "
#  316|               "group ids, have %d", c->group_ids->len);
#  317|       COMPS_OBJECT_DESTROY(c);

Error: COMPILER_WARNING (CWE-685): [#def495]
libcomps-0.1.23/libcomps/tests/check_comps.c:319:37: warning[-Wformat-extra-args]: too many arguments for format
#  317|       COMPS_OBJECT_DESTROY(c);
#  318|       c = comps_doccategory_intersect(c1, c2);
#  319|->     fail_if(c->group_ids->len != 2, "Intersect of (c2 ^ c3) should have 2"
#  320|               "group ids, have %d", c->group_ids->len);
#  321|       COMPS_OBJECT_DESTROY(c);

Error: COMPILER_WARNING: [#def496]
libcomps-0.1.23/libcomps/tests/check_comps.c:319:37: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  319 |     fail_if(c->group_ids->len != 2, "Intersect of (c2 ^ c3) should have 2"
#      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  320 |             "group ids, have %d", c->group_ids->len);
#      |                                   ~~~~~~~~~~~~~~~~~
#      |                                               |
#      |                                               size_t {aka long unsigned int}
#  317|       COMPS_OBJECT_DESTROY(c);
#  318|       c = comps_doccategory_intersect(c1, c2);
#  319|->     fail_if(c->group_ids->len != 2, "Intersect of (c2 ^ c3) should have 2"
#  320|               "group ids, have %d", c->group_ids->len);
#  321|       COMPS_OBJECT_DESTROY(c);

Error: COMPILER_WARNING (CWE-685): [#def497]
libcomps-0.1.23/libcomps/tests/check_comps.c:328:38: warning[-Wformat-extra-args]: too many arguments for format
#  326|       e2 = (COMPS_DocEnv*)list->first->next->comps_obj;
#  327|       e = comps_docenv_union(e1, e2);
#  328|->     fail_if(e->group_list->len != 4, "Union of (e1 v e2) should have 4 "
#  329|               "groud ids have %d", e->group_list->len);
#  330|       fail_if(e->option_list->len != 7, "Union of (e1 v e2) should have 7 "

Error: COMPILER_WARNING: [#def498]
libcomps-0.1.23/libcomps/tests/check_comps.c:328:38: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  328 |     fail_if(e->group_list->len != 4, "Union of (e1 v e2) should have 4 "
#      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  329 |             "groud ids have %d", e->group_list->len);
#      |                                  ~~~~~~~~~~~~~~~~~~
#      |                                               |
#      |                                               size_t {aka long unsigned int}
#  326|       e2 = (COMPS_DocEnv*)list->first->next->comps_obj;
#  327|       e = comps_docenv_union(e1, e2);
#  328|->     fail_if(e->group_list->len != 4, "Union of (e1 v e2) should have 4 "
#  329|               "groud ids have %d", e->group_list->len);
#  330|       fail_if(e->option_list->len != 7, "Union of (e1 v e2) should have 7 "

Error: COMPILER_WARNING (CWE-685): [#def499]
libcomps-0.1.23/libcomps/tests/check_comps.c:330:39: warning[-Wformat-extra-args]: too many arguments for format
#  328|       fail_if(e->group_list->len != 4, "Union of (e1 v e2) should have 4 "
#  329|               "groud ids have %d", e->group_list->len);
#  330|->     fail_if(e->option_list->len != 7, "Union of (e1 v e2) should have 7 "
#  331|               "option ids have %d", e->option_list->len);
#  332|       COMPS_OBJECT_DESTROY(e);

Error: COMPILER_WARNING: [#def500]
libcomps-0.1.23/libcomps/tests/check_comps.c:330:39: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  330 |     fail_if(e->option_list->len != 7, "Union of (e1 v e2) should have 7 "
#      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  331 |             "option ids have %d", e->option_list->len);
#      |                                   ~~~~~~~~~~~~~~~~~~~
#      |                                                 |
#      |                                                 size_t {aka long unsigned int}
#  328|       fail_if(e->group_list->len != 4, "Union of (e1 v e2) should have 4 "
#  329|               "groud ids have %d", e->group_list->len);
#  330|->     fail_if(e->option_list->len != 7, "Union of (e1 v e2) should have 7 "
#  331|               "option ids have %d", e->option_list->len);
#  332|       COMPS_OBJECT_DESTROY(e);

Error: COMPILER_WARNING (CWE-685): [#def501]
libcomps-0.1.23/libcomps/tests/check_comps.c:334:38: warning[-Wformat-extra-args]: too many arguments for format
#  332|       COMPS_OBJECT_DESTROY(e);
#  333|       e = comps_docenv_intersect(e1, e2);
#  334|->     fail_if(e->group_list->len != 2, "Intersect of (e1 ^ e2) should have 2"
#  335|               "group ids have %d", e->group_list->len);
#  336|       fail_if(e->option_list->len != 1, "Union of (e1 v e2) should have 1 "

Error: COMPILER_WARNING: [#def502]
libcomps-0.1.23/libcomps/tests/check_comps.c:334:38: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  334 |     fail_if(e->group_list->len != 2, "Intersect of (e1 ^ e2) should have 2"
#      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  335 |             "group ids have %d", e->group_list->len);
#      |                                  ~~~~~~~~~~~~~~~~~~
#      |                                               |
#      |                                               size_t {aka long unsigned int}
#  332|       COMPS_OBJECT_DESTROY(e);
#  333|       e = comps_docenv_intersect(e1, e2);
#  334|->     fail_if(e->group_list->len != 2, "Intersect of (e1 ^ e2) should have 2"
#  335|               "group ids have %d", e->group_list->len);
#  336|       fail_if(e->option_list->len != 1, "Union of (e1 v e2) should have 1 "

Error: COMPILER_WARNING (CWE-685): [#def503]
libcomps-0.1.23/libcomps/tests/check_comps.c:336:39: warning[-Wformat-extra-args]: too many arguments for format
#  334|       fail_if(e->group_list->len != 2, "Intersect of (e1 ^ e2) should have 2"
#  335|               "group ids have %d", e->group_list->len);
#  336|->     fail_if(e->option_list->len != 1, "Union of (e1 v e2) should have 1 "
#  337|               "option ids have %d", e->option_list->len);
#  338|       COMPS_OBJECT_DESTROY(e);

Error: COMPILER_WARNING: [#def504]
libcomps-0.1.23/libcomps/tests/check_comps.c:336:39: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  336 |     fail_if(e->option_list->len != 1, "Union of (e1 v e2) should have 1 "
#      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  337 |             "option ids have %d", e->option_list->len);
#      |                                   ~~~~~~~~~~~~~~~~~~~
#      |                                                 |
#      |                                                 size_t {aka long unsigned int}
#  334|       fail_if(e->group_list->len != 2, "Intersect of (e1 ^ e2) should have 2"
#  335|               "group ids have %d", e->group_list->len);
#  336|->     fail_if(e->option_list->len != 1, "Union of (e1 v e2) should have 1 "
#  337|               "option ids have %d", e->option_list->len);
#  338|       COMPS_OBJECT_DESTROY(e);

Error: COMPILER_WARNING (CWE-685): [#def505]
libcomps-0.1.23/libcomps/tests/check_comps.c:343:38: warning[-Wformat-extra-args]: too many arguments for format
#  341|       e2 = (COMPS_DocEnv*)list->first->next->next->comps_obj;
#  342|       e = comps_docenv_union(e1, e2);
#  343|->     fail_if(e->group_list->len != 4, "Union of (e2 v e3) should have 4 "
#  344|               "groud ids have %d", e->group_list->len);
#  345|       fail_if(e->option_list->len != 6, "Union of (e2 v e3) should have 7 "

Error: COMPILER_WARNING: [#def506]
libcomps-0.1.23/libcomps/tests/check_comps.c:343:38: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  343 |     fail_if(e->group_list->len != 4, "Union of (e2 v e3) should have 4 "
#      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  344 |             "groud ids have %d", e->group_list->len);
#      |                                  ~~~~~~~~~~~~~~~~~~
#      |                                               |
#      |                                               size_t {aka long unsigned int}
#  341|       e2 = (COMPS_DocEnv*)list->first->next->next->comps_obj;
#  342|       e = comps_docenv_union(e1, e2);
#  343|->     fail_if(e->group_list->len != 4, "Union of (e2 v e3) should have 4 "
#  344|               "groud ids have %d", e->group_list->len);
#  345|       fail_if(e->option_list->len != 6, "Union of (e2 v e3) should have 7 "

Error: COMPILER_WARNING (CWE-685): [#def507]
libcomps-0.1.23/libcomps/tests/check_comps.c:345:39: warning[-Wformat-extra-args]: too many arguments for format
#  343|       fail_if(e->group_list->len != 4, "Union of (e2 v e3) should have 4 "
#  344|               "groud ids have %d", e->group_list->len);
#  345|->     fail_if(e->option_list->len != 6, "Union of (e2 v e3) should have 7 "
#  346|               "option ids have %d", e->option_list->len);
#  347|       COMPS_OBJECT_DESTROY(e);

Error: COMPILER_WARNING: [#def508]
libcomps-0.1.23/libcomps/tests/check_comps.c:345:39: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  345 |     fail_if(e->option_list->len != 6, "Union of (e2 v e3) should have 7 "
#      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  346 |             "option ids have %d", e->option_list->len);
#      |                                   ~~~~~~~~~~~~~~~~~~~
#      |                                                 |
#      |                                                 size_t {aka long unsigned int}
#  343|       fail_if(e->group_list->len != 4, "Union of (e2 v e3) should have 4 "
#  344|               "groud ids have %d", e->group_list->len);
#  345|->     fail_if(e->option_list->len != 6, "Union of (e2 v e3) should have 7 "
#  346|               "option ids have %d", e->option_list->len);
#  347|       COMPS_OBJECT_DESTROY(e);

Error: COMPILER_WARNING (CWE-685): [#def509]
libcomps-0.1.23/libcomps/tests/check_comps.c:349:38: warning[-Wformat-extra-args]: too many arguments for format
#  347|       COMPS_OBJECT_DESTROY(e);
#  348|       e = comps_docenv_intersect(e1, e2);
#  349|->     fail_if(e->group_list->len != 2, "Intersect of (e2 ^ e3) should have 2 "
#  350|               "groupids  have %d", e->group_list->len);
#  351|       fail_if(e->option_list->len != 2, "Intersect of (e2 v e3) should have 2 "

Error: COMPILER_WARNING: [#def510]
libcomps-0.1.23/libcomps/tests/check_comps.c:349:38: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  349 |     fail_if(e->group_list->len != 2, "Intersect of (e2 ^ e3) should have 2 "
#      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  350 |             "groupids  have %d", e->group_list->len);
#      |                                  ~~~~~~~~~~~~~~~~~~
#      |                                               |
#      |                                               size_t {aka long unsigned int}
#  347|       COMPS_OBJECT_DESTROY(e);
#  348|       e = comps_docenv_intersect(e1, e2);
#  349|->     fail_if(e->group_list->len != 2, "Intersect of (e2 ^ e3) should have 2 "
#  350|               "groupids  have %d", e->group_list->len);
#  351|       fail_if(e->option_list->len != 2, "Intersect of (e2 v e3) should have 2 "

Error: COMPILER_WARNING (CWE-685): [#def511]
libcomps-0.1.23/libcomps/tests/check_comps.c:351:39: warning[-Wformat-extra-args]: too many arguments for format
#  349|       fail_if(e->group_list->len != 2, "Intersect of (e2 ^ e3) should have 2 "
#  350|               "groupids  have %d", e->group_list->len);
#  351|->     fail_if(e->option_list->len != 2, "Intersect of (e2 v e3) should have 2 "
#  352|               "option ids have %d", e->option_list->len);
#  353|       COMPS_OBJECT_DESTROY(e);

Error: COMPILER_WARNING: [#def512]
libcomps-0.1.23/libcomps/tests/check_comps.c:351:39: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  351 |     fail_if(e->option_list->len != 2, "Intersect of (e2 v e3) should have 2 "
#      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  352 |             "option ids have %d", e->option_list->len);
#      |                                   ~~~~~~~~~~~~~~~~~~~
#      |                                                 |
#      |                                                 size_t {aka long unsigned int}
#  349|       fail_if(e->group_list->len != 2, "Intersect of (e2 ^ e3) should have 2 "
#  350|               "groupids  have %d", e->group_list->len);
#  351|->     fail_if(e->option_list->len != 2, "Intersect of (e2 v e3) should have 2 "
#  352|               "option ids have %d", e->option_list->len);
#  353|       COMPS_OBJECT_DESTROY(e);

Error: COMPILER_WARNING (CWE-685): [#def513]
libcomps-0.1.23/libcomps/tests/check_comps.c:358:29: warning[-Wformat-extra-args]: too many arguments for format
#  356|       tmpdoc = comps_doc_union(doc, doc2);
#  357|       list = comps_doc_groups(tmpdoc);
#  358|->     fail_if(list->len != 6, "Union of (doc ^ doc2) should have 6 "
#  359|               "groups  have %d", list->len);
#  360|       COMPS_OBJECT_DESTROY(list);

Error: COMPILER_WARNING: [#def514]
libcomps-0.1.23/libcomps/tests/check_comps.c:358:29: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  358 |     fail_if(list->len != 6, "Union of (doc ^ doc2) should have 6 "
#      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  359 |             "groups  have %d", list->len);
#      |                                ~~~~~~~~~
#      |                                    |
#      |                                    size_t {aka long unsigned int}
#  356|       tmpdoc = comps_doc_union(doc, doc2);
#  357|       list = comps_doc_groups(tmpdoc);
#  358|->     fail_if(list->len != 6, "Union of (doc ^ doc2) should have 6 "
#  359|               "groups  have %d", list->len);
#  360|       COMPS_OBJECT_DESTROY(list);

Error: COMPILER_WARNING (CWE-685): [#def515]
libcomps-0.1.23/libcomps/tests/check_comps.c:362:29: warning[-Wformat-extra-args]: too many arguments for format
#  360|       COMPS_OBJECT_DESTROY(list);
#  361|       list = comps_doc_categories(tmpdoc);
#  362|->     fail_if(list->len != 4, "Union of (doc ^ doc2) "
#  363|               "should have 4 categories  have %d", list->len);
#  364|       COMPS_OBJECT_DESTROY(list);

Error: COMPILER_WARNING: [#def516]
libcomps-0.1.23/libcomps/tests/check_comps.c:362:29: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  362 |     fail_if(list->len != 4, "Union of (doc ^ doc2) "
#      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
#  363 |             "should have 4 categories  have %d", list->len);
#      |                                                  ~~~~~~~~~
#      |                                                      |
#      |                                                      size_t {aka long unsigned int}
#  360|       COMPS_OBJECT_DESTROY(list);
#  361|       list = comps_doc_categories(tmpdoc);
#  362|->     fail_if(list->len != 4, "Union of (doc ^ doc2) "
#  363|               "should have 4 categories  have %d", list->len);
#  364|       COMPS_OBJECT_DESTROY(list);

Error: COMPILER_WARNING (CWE-685): [#def517]
libcomps-0.1.23/libcomps/tests/check_comps.c:366:29: warning[-Wformat-extra-args]: too many arguments for format
#  364|       COMPS_OBJECT_DESTROY(list);
#  365|       list = comps_doc_environments(tmpdoc);
#  366|->     fail_if(list->len != 4, "Union of (doc ^ doc2) "
#  367|               "should have 4 environments  have %d", list->len);
#  368|       COMPS_OBJECT_DESTROY(list);

Error: COMPILER_WARNING: [#def518]
libcomps-0.1.23/libcomps/tests/check_comps.c:366:29: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  366 |     fail_if(list->len != 4, "Union of (doc ^ doc2) "
#      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
#  367 |             "should have 4 environments  have %d", list->len);
#      |                                                    ~~~~~~~~~
#      |                                                        |
#      |                                                        size_t {aka long unsigned int}
#  364|       COMPS_OBJECT_DESTROY(list);
#  365|       list = comps_doc_environments(tmpdoc);
#  366|->     fail_if(list->len != 4, "Union of (doc ^ doc2) "
#  367|               "should have 4 environments  have %d", list->len);
#  368|       COMPS_OBJECT_DESTROY(list);

Error: COMPILER_WARNING (CWE-685): [#def519]
libcomps-0.1.23/libcomps/tests/check_comps.c:372:29: warning[-Wformat-extra-args]: too many arguments for format
#  370|       tmpdoc = comps_doc_intersect(doc, doc2);
#  371|       list = comps_doc_groups(tmpdoc);
#  372|->     fail_if(list->len != 2, "Intersect of (doc ^ doc2) "
#  373|               "should have 2 groups  have %d", list->len);
#  374|       COMPS_OBJECT_DESTROY(list);

Error: COMPILER_WARNING: [#def520]
libcomps-0.1.23/libcomps/tests/check_comps.c:372:29: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  372 |     fail_if(list->len != 2, "Intersect of (doc ^ doc2) "
#      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  373 |             "should have 2 groups  have %d", list->len);
#      |                                              ~~~~~~~~~
#      |                                                  |
#      |                                                  size_t {aka long unsigned int}
#  370|       tmpdoc = comps_doc_intersect(doc, doc2);
#  371|       list = comps_doc_groups(tmpdoc);
#  372|->     fail_if(list->len != 2, "Intersect of (doc ^ doc2) "
#  373|               "should have 2 groups  have %d", list->len);
#  374|       COMPS_OBJECT_DESTROY(list);

Error: COMPILER_WARNING (CWE-685): [#def521]
libcomps-0.1.23/libcomps/tests/check_comps.c:376:29: warning[-Wformat-extra-args]: too many arguments for format
#  374|       COMPS_OBJECT_DESTROY(list);
#  375|       list = comps_doc_categories(tmpdoc);
#  376|->     fail_if(list->len != 2, "Intersect of (doc ^ doc2)"
#  377|               " should have 2 categories  have %d", list->len);
#  378|       COMPS_OBJECT_DESTROY(list);

Error: COMPILER_WARNING: [#def522]
libcomps-0.1.23/libcomps/tests/check_comps.c:376:29: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  376 |     fail_if(list->len != 2, "Intersect of (doc ^ doc2)"
#      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
#  377 |             " should have 2 categories  have %d", list->len);
#      |                                                   ~~~~~~~~~
#      |                                                       |
#      |                                                       size_t {aka long unsigned int}
#  374|       COMPS_OBJECT_DESTROY(list);
#  375|       list = comps_doc_categories(tmpdoc);
#  376|->     fail_if(list->len != 2, "Intersect of (doc ^ doc2)"
#  377|               " should have 2 categories  have %d", list->len);
#  378|       COMPS_OBJECT_DESTROY(list);

Error: COMPILER_WARNING (CWE-685): [#def523]
libcomps-0.1.23/libcomps/tests/check_comps.c:380:29: warning[-Wformat-extra-args]: too many arguments for format
#  378|       COMPS_OBJECT_DESTROY(list);
#  379|       list = comps_doc_environments(tmpdoc);
#  380|->     fail_if(list->len != 2, "Intersect of "
#  381|               "(doc ^ doc2) should have 2 environments  have %d", list->len);
#  382|       COMPS_OBJECT_DESTROY(list);

Error: COMPILER_WARNING: [#def524]
libcomps-0.1.23/libcomps/tests/check_comps.c:380:29: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#  380 |     fail_if(list->len != 2, "Intersect of "
#      |                             ^~~~~~~~~~~~~~~
#  381 |             "(doc ^ doc2) should have 2 environments  have %d", list->len);
#      |                                                                 ~~~~~~~~~
#      |                                                                     |
#      |                                                                     size_t {aka long unsigned int}
#  378|       COMPS_OBJECT_DESTROY(list);
#  379|       list = comps_doc_environments(tmpdoc);
#  380|->     fail_if(list->len != 2, "Intersect of "
#  381|               "(doc ^ doc2) should have 2 environments  have %d", list->len);
#  382|       COMPS_OBJECT_DESTROY(list);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def525]
libcomps-0.1.23/libcomps/tests/check_comps.c:531:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("sample_comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_comps.c:526:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_comps.c:526:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_comps.c:527:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_comps.c:531:5: danger: ‘fopen("sample_comps.xml", "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  529|   
#  530|       COMPS_Doc *doc1, *doc2, *doc3;
#  531|->     doc1 = parsed->comps_doc;
#  532|       parsed->comps_doc = NULL;
#  533|       fp = fopen("f21-rawhide-comps.xml", "r");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def526]
libcomps-0.1.23/libcomps/tests/check_comps.c:531:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("sample_comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_comps.c:526:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_comps.c:526:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_comps.c:527:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_comps.c:531:5: danger: ‘fopen("sample_comps.xml", "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  529|   
#  530|       COMPS_Doc *doc1, *doc2, *doc3;
#  531|->     doc1 = parsed->comps_doc;
#  532|       parsed->comps_doc = NULL;
#  533|       fp = fopen("f21-rawhide-comps.xml", "r");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def527]
libcomps-0.1.23/libcomps/tests/check_comps.c:535:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("f21-rawhide-comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_comps.c:526:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_comps.c:526:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_comps.c:533:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_comps.c:535:5: danger: ‘fopen("f21-rawhide-comps.xml", "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  533|       fp = fopen("f21-rawhide-comps.xml", "r");
#  534|       comps_parse_file(parsed, fp, NULL);
#  535|->     doc2 = parsed->comps_doc;
#  536|       parsed->comps_doc = NULL;
#  537|       comps_parse_parsed_destroy(parsed);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def528]
libcomps-0.1.23/libcomps/tests/check_comps.c:535:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("f21-rawhide-comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_comps.c:526:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_comps.c:526:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_comps.c:533:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_comps.c:535:5: danger: ‘fopen("f21-rawhide-comps.xml", "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  533|       fp = fopen("f21-rawhide-comps.xml", "r");
#  534|       comps_parse_file(parsed, fp, NULL);
#  535|->     doc2 = parsed->comps_doc;
#  536|       parsed->comps_doc = NULL;
#  537|       comps_parse_parsed_destroy(parsed);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def529]
libcomps-0.1.23/libcomps/tests/check_objrtree.c:71:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
libcomps-0.1.23/libcomps/tests/check_objrtree.c:54:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_objrtree.c:56:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:56:9: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:57:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:61:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_objrtree.c:62:9: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:63:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_objrtree.c:67:16: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:71:15: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   69|           pch = strrchr(buffer, '-');
#   70|           buffer[pch-buffer] = 0;
#   71|->         val = comps_str(pch+1);
#   72|           //printf("%s = %s\n", (char*)val, pch+1);
#   73|           comps_objrtree_set_x(rt, buffer, (COMPS_Object*)val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def530]
libcomps-0.1.23/libcomps/tests/check_objrtree.c:71:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
libcomps-0.1.23/libcomps/tests/check_objrtree.c:54:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_objrtree.c:56:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:56:9: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:57:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:61:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_objrtree.c:62:9: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:63:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_objrtree.c:67:16: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:71:15: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   69|           pch = strrchr(buffer, '-');
#   70|           buffer[pch-buffer] = 0;
#   71|->         val = comps_str(pch+1);
#   72|           //printf("%s = %s\n", (char*)val, pch+1);
#   73|           comps_objrtree_set_x(rt, buffer, (COMPS_Object*)val);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def531]
libcomps-0.1.23/libcomps/tests/check_objrtree.c:73:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
libcomps-0.1.23/libcomps/tests/check_objrtree.c:54:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_objrtree.c:56:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:56:9: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:57:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:61:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_objrtree.c:62:9: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:63:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_objrtree.c:67:16: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:73:9: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   71|           val = comps_str(pch+1);
#   72|           //printf("%s = %s\n", (char*)val, pch+1);
#   73|->         comps_objrtree_set_x(rt, buffer, (COMPS_Object*)val);
#   74|           //printf("--------------------\n");
#   75|           /*for (COMPS_HSListItem *it = rt->subnodes->first;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def532]
libcomps-0.1.23/libcomps/tests/check_objrtree.c:73:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
libcomps-0.1.23/libcomps/tests/check_objrtree.c:54:8: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_objrtree.c:56:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:56:9: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:57:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:61:12: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_objrtree.c:62:9: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:63:12: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_objrtree.c:67:16: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_objrtree.c:73:9: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#   71|           val = comps_str(pch+1);
#   72|           //printf("%s = %s\n", (char*)val, pch+1);
#   73|->         comps_objrtree_set_x(rt, buffer, (COMPS_Object*)val);
#   74|           //printf("--------------------\n");
#   75|           /*for (COMPS_HSListItem *it = rt->subnodes->first;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def533]
libcomps-0.1.23/libcomps/tests/check_parse.c:82:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("sample-comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:78:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_parse.c:82:9: danger: ‘fopen("sample-comps.xml", "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   80|       //fail_unless(comps_parse_validate_dtd("sample-comps.xml", "comps.dtd"));
#   81|   
#   82|->     if (parsed->log->entries->first != NULL) {
#   83|           //err_log = comps_log_str(parsed->log);
#   84|           ck_assert_msg(parsed->log->entries->first != NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def534]
libcomps-0.1.23/libcomps/tests/check_parse.c:82:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("sample-comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:78:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_parse.c:82:9: danger: ‘fopen("sample-comps.xml", "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   80|       //fail_unless(comps_parse_validate_dtd("sample-comps.xml", "comps.dtd"));
#   81|   
#   82|->     if (parsed->log->entries->first != NULL) {
#   83|           //err_log = comps_log_str(parsed->log);
#   84|           ck_assert_msg(parsed->log->entries->first != NULL,

Error: COMPILER_WARNING: [#def535]
libcomps-0.1.23/libcomps/tests/check_parse.c:20: included_from: Included from here.
libcomps-0.1.23/libcomps/tests/check_parse.c: scope_hint: In function ‘test_comps_parse1_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:89:38: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#   89 |     ck_assert_msg(tmplist->len == 3, "Should have 3 groups parsed."
#      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   90 |             "Have %d", tmplist->len);
#      |                        ~~~~~~~~~~~~   
#      |                               |
#      |                               size_t {aka long unsigned int}
#   87|       }
#   88|       tmplist = comps_doc_groups(parsed->comps_doc);
#   89|->     ck_assert_msg(tmplist->len == 3, "Should have 3 groups parsed."
#   90|               "Have %d", tmplist->len);
#   91|       COMPS_OBJECT_DESTROY(tmplist);

Error: COMPILER_WARNING: [#def536]
libcomps-0.1.23/libcomps/tests/check_parse.c:93:38: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#   93 |     ck_assert_msg(tmplist->len == 2, "Should have 2 categories"
#      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
#   94 |             "parsed. Have %d", tmplist->len);
#      |                                ~~~~~~~~~~~~
#      |                                       |
#      |                                       size_t {aka long unsigned int}
#   91|       COMPS_OBJECT_DESTROY(tmplist);
#   92|       tmplist = comps_doc_categories(parsed->comps_doc);
#   93|->     ck_assert_msg(tmplist->len == 2, "Should have 2 categories"
#   94|               "parsed. Have %d", tmplist->len);
#   95|       COMPS_OBJECT_DESTROY(tmplist);

Error: COMPILER_WARNING (CWE-685): [#def537]
libcomps-0.1.23/libcomps/tests/check_parse.c:98:13: warning[-Wformat-extra-args]: too many arguments for format
#   98 |             "Should have 1 environment parsed. Have %d", tmplist->len);
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   96|       tmplist = comps_doc_environments(parsed->comps_doc);
#   97|       fail_if(tmplist->len != 1,
#   98|->             "Should have 1 environment parsed. Have %d", tmplist->len);
#   99|       COMPS_OBJECT_DESTROY(tmplist);
#  100|   

Error: COMPILER_WARNING: [#def538]
libcomps-0.1.23/libcomps/tests/check_parse.c:98:13: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’}
#   98 |             "Should have 1 environment parsed. Have %d", tmplist->len);
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~
#      |                                                                 |
#      |                                                                 size_t {aka long unsigned int}
libcomps-0.1.23/libcomps/tests/check_parse.c:98:54: note: format string is defined here
#   98 |             "Should have 1 environment parsed. Have %d", tmplist->len);
#      |                                                     ~^
#      |                                                      |
#      |                                                      int
#      |                                                     %ld
#   96|       tmplist = comps_doc_environments(parsed->comps_doc);
#   97|       fail_if(tmplist->len != 1,
#   98|->             "Should have 1 environment parsed. Have %d", tmplist->len);
#   99|       COMPS_OBJECT_DESTROY(tmplist);
#  100|   

Error: COMPILER_WARNING (CWE-685): [#def539]
libcomps-0.1.23/libcomps/tests/check_parse.c:105:34: warning[-Wformat-extra-args]: too many arguments for format
#  105 |         fail_if(tmpobj2 == NULL, "Group not found");
#      |                                  ^~~~~~~~~~~~~~~~~
#  103|           tmplist = comps_doc_groups(parsed->comps_doc);
#  104|           tmpobj2 = comps_objlist_get_x(tmplist, i);
#  105|->         fail_if(tmpobj2 == NULL, "Group not found");
#  106|           tmpobj = comps_docgroup_get_id((COMPS_DocGroup*)tmpobj2);
#  107|           tmpstr = comps_object_tostr(tmpobj);

Error: COMPILER_WARNING (CWE-685): [#def540]
libcomps-0.1.23/libcomps/tests/check_parse.c:109:24: warning[-Wformat-extra-args]: too many arguments for format
#  109 |                        "%d.group should have id:%s not %s",
#      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  107|           tmpstr = comps_object_tostr(tmpobj);
#  108|           fail_if(strcmp(tmpstr, groups_ids[i]) != 0,
#  109|->                        "%d.group should have id:%s not %s",
#  110|                           i, groups_ids[i], tmpstr);
#  111|           free(tmpstr);

Error: COMPILER_WARNING (CWE-685): [#def541]
libcomps-0.1.23/libcomps/tests/check_parse.c:117:24: warning[-Wformat-extra-args]: too many arguments for format
#  117 |                        "%d.group should have name:%s not %s",
#      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  115|           tmpstr = comps_object_tostr(tmpobj);
#  116|           fail_if(strcmp(tmpstr, groups_names[i]) != 0,
#  117|->                        "%d.group should have name:%s not %s",
#  118|                           i, groups_names[i], tmpstr);
#  119|           free(tmpstr);

Error: COMPILER_WARNING (CWE-685): [#def542]
libcomps-0.1.23/libcomps/tests/check_parse.c:125:24: warning[-Wformat-extra-args]: too many arguments for format
#  125 |                        "%d.group should have desc:%s not %s",
#      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  123|           tmpstr = comps_object_tostr(tmpobj);
#  124|           fail_if(strcmp(tmpstr, groups_descs[i]) != 0,
#  125|->                        "%d.group should have desc:%s not %s",
#  126|                           i, groups_descs[i], tmpstr);
#  127|           free(tmpstr);

Error: COMPILER_WARNING (CWE-195): [#def543]
libcomps-0.1.23/libcomps/tests/check_parse.c:133:38: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’}
#  133 |         fail_if(group_packages[i][0] != tmplist->len, "Group #%d should have"
#      |                                      ^~
#  131|           tmplist = comps_docgroup_get_packages((COMPS_DocGroup*)tmpobj2, NULL,
#  132|                                                COMPS_PACKAGE_DEFAULT);
#  133|->         fail_if(group_packages[i][0] != tmplist->len, "Group #%d should have"
#  134|                   " %d default packages, Have %d", i, group_packages[i][0],
#  135|                   tmplist->len);

Error: COMPILER_WARNING (CWE-685): [#def544]
libcomps-0.1.23/libcomps/tests/check_parse.c:133:55: warning[-Wformat-extra-args]: too many arguments for format
#  131|           tmplist = comps_docgroup_get_packages((COMPS_DocGroup*)tmpobj2, NULL,
#  132|                                                COMPS_PACKAGE_DEFAULT);
#  133|->         fail_if(group_packages[i][0] != tmplist->len, "Group #%d should have"
#  134|                   " %d default packages, Have %d", i, group_packages[i][0],
#  135|                   tmplist->len);

Error: COMPILER_WARNING: [#def545]
libcomps-0.1.23/libcomps/tests/check_parse.c:133:55: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘size_t’ {aka ‘long unsigned int’}
#  133 |         fail_if(group_packages[i][0] != tmplist->len, "Group #%d should have"
#      |                                                       ^~~~~~~~~~~~~~~~~~~~~~~
#  134 |                 " %d default packages, Have %d", i, group_packages[i][0],
#  135 |                 tmplist->len);
#      |                 ~~~~~~~~~~~~                           
#      |                        |
#      |                        size_t {aka long unsigned int}
#  131|           tmplist = comps_docgroup_get_packages((COMPS_DocGroup*)tmpobj2, NULL,
#  132|                                                COMPS_PACKAGE_DEFAULT);
#  133|->         fail_if(group_packages[i][0] != tmplist->len, "Group #%d should have"
#  134|                   " %d default packages, Have %d", i, group_packages[i][0],
#  135|                   tmplist->len);

Error: COMPILER_WARNING (CWE-195): [#def546]
libcomps-0.1.23/libcomps/tests/check_parse.c:139:38: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’}
#  139 |         fail_if(group_packages[i][1] != tmplist->len, "Group #%d should have"
#      |                                      ^~
#  137|           tmplist = comps_docgroup_get_packages((COMPS_DocGroup*)tmpobj2, NULL,
#  138|                                                COMPS_PACKAGE_OPTIONAL);
#  139|->         fail_if(group_packages[i][1] != tmplist->len, "Group #%d should have"
#  140|                   " %d optional packages, Have %d", i, group_packages[i][1],
#  141|                   tmplist->len);

Error: COMPILER_WARNING (CWE-685): [#def547]
libcomps-0.1.23/libcomps/tests/check_parse.c:139:55: warning[-Wformat-extra-args]: too many arguments for format
#  137|           tmplist = comps_docgroup_get_packages((COMPS_DocGroup*)tmpobj2, NULL,
#  138|                                                COMPS_PACKAGE_OPTIONAL);
#  139|->         fail_if(group_packages[i][1] != tmplist->len, "Group #%d should have"
#  140|                   " %d optional packages, Have %d", i, group_packages[i][1],
#  141|                   tmplist->len);

Error: COMPILER_WARNING: [#def548]
libcomps-0.1.23/libcomps/tests/check_parse.c:139:55: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘size_t’ {aka ‘long unsigned int’}
#  139 |         fail_if(group_packages[i][1] != tmplist->len, "Group #%d should have"
#      |                                                       ^~~~~~~~~~~~~~~~~~~~~~~
#  140 |                 " %d optional packages, Have %d", i, group_packages[i][1],
#  141 |                 tmplist->len);
#      |                 ~~~~~~~~~~~~                           
#      |                        |
#      |                        size_t {aka long unsigned int}
#  137|           tmplist = comps_docgroup_get_packages((COMPS_DocGroup*)tmpobj2, NULL,
#  138|                                                COMPS_PACKAGE_OPTIONAL);
#  139|->         fail_if(group_packages[i][1] != tmplist->len, "Group #%d should have"
#  140|                   " %d optional packages, Have %d", i, group_packages[i][1],
#  141|                   tmplist->len);

Error: COMPILER_WARNING (CWE-685): [#def549]
libcomps-0.1.23/libcomps/tests/check_parse.c:150:24: warning[-Wformat-extra-args]: too many arguments for format
#  150 |                        "%s. category should have id:%s not %s",
#      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  148|           tmpstr = comps_object_tostr(tmpobj);
#  149|           fail_if(strcmp(tmpstr, cats_ids[i]) != 0,
#  150|->                        "%s. category should have id:%s not %s",
#  151|                           i, cats_ids[i], tmpstr);
#  152|           free(tmpstr);

Error: COMPILER_WARNING: [#def550]
libcomps-0.1.23/libcomps/tests/check_parse.c:150:24: warning[-Wformat=]: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘int’
#  150 |                        "%s. category should have id:%s not %s",
#      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  151 |                         i, cats_ids[i], tmpstr);
#      |                         ~
#      |                         |
#      |                         int
libcomps-0.1.23/libcomps/tests/check_parse.c:150:26: note: format string is defined here
#  150 |                        "%s. category should have id:%s not %s",
#      |                         ~^
#      |                          |
#      |                          char *
#      |                         %d
#  148|           tmpstr = comps_object_tostr(tmpobj);
#  149|           fail_if(strcmp(tmpstr, cats_ids[i]) != 0,
#  150|->                        "%s. category should have id:%s not %s",
#  151|                           i, cats_ids[i], tmpstr);
#  152|           free(tmpstr);

Error: COMPILER_WARNING (CWE-685): [#def551]
libcomps-0.1.23/libcomps/tests/check_parse.c:158:24: warning[-Wformat-extra-args]: too many arguments for format
#  158 |                        "%s. category should have name:%s not %s",
#      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  156|           tmpstr = comps_object_tostr(tmpobj);
#  157|           fail_if(strcmp(tmpstr, cats_names[i]) != 0,
#  158|->                        "%s. category should have name:%s not %s",
#  159|                           i, cats_names[i], tmpstr);
#  160|           free(tmpstr);

Error: COMPILER_WARNING: [#def552]
libcomps-0.1.23/libcomps/tests/check_parse.c:158:24: warning[-Wformat=]: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘int’
#  158 |                        "%s. category should have name:%s not %s",
#      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  159 |                         i, cats_names[i], tmpstr);
#      |                         ~
#      |                         |
#      |                         int
libcomps-0.1.23/libcomps/tests/check_parse.c:158:26: note: format string is defined here
#  158 |                        "%s. category should have name:%s not %s",
#      |                         ~^
#      |                          |
#      |                          char *
#      |                         %d
#  156|           tmpstr = comps_object_tostr(tmpobj);
#  157|           fail_if(strcmp(tmpstr, cats_names[i]) != 0,
#  158|->                        "%s. category should have name:%s not %s",
#  159|                           i, cats_names[i], tmpstr);
#  160|           free(tmpstr);

Error: COMPILER_WARNING (CWE-195): [#def553]
libcomps-0.1.23/libcomps/tests/check_parse.c:163:63: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’
#  163 |         fail_if(((COMPS_DocCategory*)tmpobj2)->group_ids->len != cats_gids[i],
#      |                                                               ^~
#  161|           COMPS_OBJECT_DESTROY(tmpobj);
#  162|   
#  163|->         fail_if(((COMPS_DocCategory*)tmpobj2)->group_ids->len != cats_gids[i],
#  164|                   "Category #%d should have %d groupids, have %d", i,
#  165|                   cats_gids[i], ((COMPS_DocCategory*)tmpobj2)->group_ids->len);

Error: COMPILER_WARNING (CWE-685): [#def554]
libcomps-0.1.23/libcomps/tests/check_parse.c:164:17: warning[-Wformat-extra-args]: too many arguments for format
#  164 |                 "Category #%d should have %d groupids, have %d", i,
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  162|   
#  163|           fail_if(((COMPS_DocCategory*)tmpobj2)->group_ids->len != cats_gids[i],
#  164|->                 "Category #%d should have %d groupids, have %d", i,
#  165|                   cats_gids[i], ((COMPS_DocCategory*)tmpobj2)->group_ids->len);
#  166|           COMPS_OBJECT_DESTROY(tmpobj2);

Error: COMPILER_WARNING: [#def555]
libcomps-0.1.23/libcomps/tests/check_parse.c:164:17: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘size_t’ {aka ‘long unsigned int’}
#  164 |                 "Category #%d should have %d groupids, have %d", i,
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  165 |                 cats_gids[i], ((COMPS_DocCategory*)tmpobj2)->group_ids->len);
#      |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#      |                                                                       |
#      |                                                                       size_t {aka long unsigned int}
libcomps-0.1.23/libcomps/tests/check_parse.c:164:62: note: format string is defined here
#  164 |                 "Category #%d should have %d groupids, have %d", i,
#      |                                                             ~^
#      |                                                              |
#      |                                                              int
#      |                                                             %ld
#  162|   
#  163|           fail_if(((COMPS_DocCategory*)tmpobj2)->group_ids->len != cats_gids[i],
#  164|->                 "Category #%d should have %d groupids, have %d", i,
#  165|                   cats_gids[i], ((COMPS_DocCategory*)tmpobj2)->group_ids->len);
#  166|           COMPS_OBJECT_DESTROY(tmpobj2);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def556]
libcomps-0.1.23/libcomps/tests/check_parse.c:171:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("sample-bad-elem.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:102:19: branch_true: following ‘true’ branch (when ‘i != 3’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:103:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:144:19: branch_true: following ‘true’ branch (when ‘i != 2’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:145:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:170:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_parse.c:171:5: danger: ‘fopen("sample-bad-elem.xml", "r")’ leaks here; was opened at [(31)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/30)
#  169|   
#  170|       fp = fopen("sample-bad-elem.xml", "r");
#  171|->     comps_parse_parsed_destroy(parsed);
#  172|   
#  173|       parsed = comps_parse_parsed_create();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def557]
libcomps-0.1.23/libcomps/tests/check_parse.c:171:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("sample-bad-elem.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:102:19: branch_true: following ‘true’ branch (when ‘i != 3’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:103:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:144:19: branch_true: following ‘true’ branch (when ‘i != 2’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:145:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:170:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_parse.c:171:5: danger: ‘fopen("sample-bad-elem.xml", "r")’ leaks here; was allocated at [(31)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/30)
#  169|   
#  170|       fp = fopen("sample-bad-elem.xml", "r");
#  171|->     comps_parse_parsed_destroy(parsed);
#  172|   
#  173|       parsed = comps_parse_parsed_create();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def558]
libcomps-0.1.23/libcomps/tests/check_parse.c:173:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("sample-bad-elem.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:102:19: branch_true: following ‘true’ branch (when ‘i != 3’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:103:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:144:19: branch_true: following ‘true’ branch (when ‘i != 2’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:145:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:170:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_parse.c:173:14: danger: ‘fopen("sample-bad-elem.xml", "r")’ leaks here; was opened at [(31)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/30)
#  171|       comps_parse_parsed_destroy(parsed);
#  172|   
#  173|->     parsed = comps_parse_parsed_create();
#  174|       fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) == 0);
#  175|       comps_parse_file(parsed, fp, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def559]
libcomps-0.1.23/libcomps/tests/check_parse.c:173:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("sample-bad-elem.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:102:19: branch_true: following ‘true’ branch (when ‘i != 3’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:103:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:144:19: branch_true: following ‘true’ branch (when ‘i != 2’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:145:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:170:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_parse.c:173:14: danger: ‘fopen("sample-bad-elem.xml", "r")’ leaks here; was allocated at [(31)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/30)
#  171|       comps_parse_parsed_destroy(parsed);
#  172|   
#  173|->     parsed = comps_parse_parsed_create();
#  174|       fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) == 0);
#  175|       comps_parse_file(parsed, fp, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def560]
libcomps-0.1.23/libcomps/tests/check_parse.c:174:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("sample-bad-elem.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:102:19: branch_true: following ‘true’ branch (when ‘i != 3’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:103:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:144:19: branch_true: following ‘true’ branch (when ‘i != 2’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:145:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:170:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_parse.c:174:5: danger: ‘fopen("sample-bad-elem.xml", "r")’ leaks here; was opened at [(31)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/30)
#  172|   
#  173|       parsed = comps_parse_parsed_create();
#  174|->     fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) == 0);
#  175|       comps_parse_file(parsed, fp, NULL);
#  176|       ret = comps_parse_validate_dtd("sample-bad-elem.xml", "comps.dtd");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def561]
libcomps-0.1.23/libcomps/tests/check_parse.c:174:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("sample-bad-elem.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:102:19: branch_true: following ‘true’ branch (when ‘i != 3’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:103:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:144:19: branch_true: following ‘true’ branch (when ‘i != 2’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:145:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:170:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_parse.c:174:5: danger: ‘fopen("sample-bad-elem.xml", "r")’ leaks here; was allocated at [(31)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/30)
#  172|   
#  173|       parsed = comps_parse_parsed_create();
#  174|->     fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) == 0);
#  175|       comps_parse_file(parsed, fp, NULL);
#  176|       ret = comps_parse_validate_dtd("sample-bad-elem.xml", "comps.dtd");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def562]
libcomps-0.1.23/libcomps/tests/check_parse.c:176:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("sample-bad-elem.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:102:19: branch_true: following ‘true’ branch (when ‘i != 3’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:103:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:144:19: branch_true: following ‘true’ branch (when ‘i != 2’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:145:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:170:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_parse.c:174:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:174:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:176:11: danger: ‘fopen("sample-bad-elem.xml", "r")’ leaks here; was opened at [(31)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/30)
#  174|       fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) == 0);
#  175|       comps_parse_file(parsed, fp, NULL);
#  176|->     ret = comps_parse_validate_dtd("sample-bad-elem.xml", "comps.dtd");
#  177|       fail_if(ret >0, "XML shouldn't be valid. Validation returned: %d", ret);
#  178|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def563]
libcomps-0.1.23/libcomps/tests/check_parse.c:176:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("sample-bad-elem.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:75:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:89:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: following ‘true’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:93:5: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:97:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:102:19: branch_true: following ‘true’ branch (when ‘i != 3’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:103:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:105:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:108:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:116:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:124:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:133:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:139:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:144:19: branch_true: following ‘true’ branch (when ‘i != 2’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:145:19: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:149:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: following ‘false’ branch (when the strings are equal)...
libcomps-0.1.23/libcomps/tests/check_parse.c:157:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:163:9: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:170:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_parse.c:174:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:174:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:176:11: danger: ‘fopen("sample-bad-elem.xml", "r")’ leaks here; was allocated at [(31)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/30)
#  174|       fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) == 0);
#  175|       comps_parse_file(parsed, fp, NULL);
#  176|->     ret = comps_parse_validate_dtd("sample-bad-elem.xml", "comps.dtd");
#  177|       fail_if(ret >0, "XML shouldn't be valid. Validation returned: %d", ret);
#  178|   

Error: COMPILER_WARNING (CWE-685): [#def564]
libcomps-0.1.23/libcomps/tests/check_parse.c:177:21: warning[-Wformat-extra-args]: too many arguments for format
#  177 |     fail_if(ret >0, "XML shouldn't be valid. Validation returned: %d", ret);
#      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  175|       comps_parse_file(parsed, fp, NULL);
#  176|       ret = comps_parse_validate_dtd("sample-bad-elem.xml", "comps.dtd");
#  177|->     fail_if(ret >0, "XML shouldn't be valid. Validation returned: %d", ret);
#  178|   
#  179|       if (parsed->log->entries->first != NULL) {

Error: COMPILER_WARNING (CWE-685): [#def565]
libcomps-0.1.23/libcomps/tests/check_parse.c: scope_hint: In function ‘check_errors’
libcomps-0.1.23/libcomps/tests/check_parse.c:198:17: warning[-Wformat-extra-args]: too many arguments for format
#  198 |                 "%d err opt_message doesn't match (%d != %d)", i,
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  196|           fail_if(((COMPS_LogEntry*)it->data)->arg_count !=
#  197|                   known_errors[i]->arg_count,
#  198|->                 "%d err opt_message doesn't match (%d != %d)", i,
#  199|                   ((COMPS_LogEntry*)it->data)->arg_count,
#  200|                   known_errors[i]->arg_count);

Error: COMPILER_WARNING (CWE-685): [#def566]
libcomps-0.1.23/libcomps/tests/check_parse.c:202:44: warning[-Wformat-extra-args]: too many arguments for format
#  202 |                     known_errors[i]->code, "%d. err code different\n (%d != %d)",
#      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  200|                   known_errors[i]->arg_count);
#  201|           fail_if(((COMPS_LogEntry*)it->data)->code !=
#  202|->                     known_errors[i]->code, "%d. err code different\n (%d != %d)",
#  203|                       i, ((COMPS_LogEntry*)it->data)->code,
#  204|                       known_errors[i]->code);

Error: COMPILER_WARNING (CWE-685): [#def567]
libcomps-0.1.23/libcomps/tests/check_parse.c:210:70: warning[-Wformat-extra-args]: too many arguments for format
#  210 |                                      known_errors[i]->args[x]) == 0, "%d. %s != %s",
#      |                                                                      ^~~~~~~~~~~~~~
#  208|               _y = comps_object_tostr(known_errors[i]->args[x]);
#  209|               fail_if(comps_object_cmp(((COMPS_LogEntry*)it->data)->args[x],
#  210|->                                      known_errors[i]->args[x]) == 0, "%d. %s != %s",
#  211|                                        x, _x, _y);
#  212|               free(_x);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def568]
libcomps-0.1.23/libcomps/tests/check_parse.c:225:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libcomps-0.1.23/libcomps/tests/check_parse.c:224:5: acquire_resource: ‘va_start’ called here
libcomps-0.1.23/libcomps/tests/check_parse.c:225:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  223|       
#  224|       va_start(arg_list, n);
#  225|->     entry = comps_log_entry_create();
#  226|   
#  227|       entry->args = malloc(sizeof(COMPS_Object*) * n);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def569]
libcomps-0.1.23/libcomps/tests/check_parse.c:233:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*<unknown>.args + (long unsigned int)i * 8’
libcomps-0.1.23/libcomps/tests/check_parse.c:227:19: acquire_memory: this call could return NULL
libcomps-0.1.23/libcomps/tests/check_parse.c:231:19: branch_true: following ‘true’ branch (when ‘i < n’)...
libcomps-0.1.23/libcomps/tests/check_parse.c:232:9: branch_true: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:233:9: danger: ‘*<unknown>.args + (long unsigned int)i * 8’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  231|       for (int i=0; i<n; i++) {
#  232|           val = va_arg(arg_list, COMPS_Object*);
#  233|->         entry->args[i] = val;
#  234|       }
#  235|       va_end(arg_list);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def570]
libcomps-0.1.23/libcomps/tests/check_parse.c:287:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("sample_comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:239:1: enter_function: entry to ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:249:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:249:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:252:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:252:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:255:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:255:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:258:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:258:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:261:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:261:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:264:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:264:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:267:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:267:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:270:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:270:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:273:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:273:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:276:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:276:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:283:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:283:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:284:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_parse.c:287:5: danger: ‘fopen("sample_comps.xml", "r")’ leaks here; was opened at [(94)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/93)
#  285|       comps_parse_file(parsed, fp, NULL);
#  286|   
#  287|->     fail_if(parsed->log->entries->first == NULL);
#  288|       i = check_errors(parsed->log, known_errors, 10);
#  289|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def571]
libcomps-0.1.23/libcomps/tests/check_parse.c:287:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("sample_comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:239:1: enter_function: entry to ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:249:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:249:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:252:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:252:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:255:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:255:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:258:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:258:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:261:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:261:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:264:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:264:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:267:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:267:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:270:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:270:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:273:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:273:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:276:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:276:23: return_function: returning to ‘test_comps_parse2_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:283:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:283:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:284:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_parse.c:287:5: danger: ‘fopen("sample_comps.xml", "r")’ leaks here; was allocated at [(94)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/93)
#  285|       comps_parse_file(parsed, fp, NULL);
#  286|   
#  287|->     fail_if(parsed->log->entries->first == NULL);
#  288|       i = check_errors(parsed->log, known_errors, 10);
#  289|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def572]
libcomps-0.1.23/libcomps/tests/check_parse.c:327:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("sample_comps_bad1.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:299:1: enter_function: entry to ‘test_comps_parse3_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:312:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse3_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:312:23: return_function: returning to ‘test_comps_parse3_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:315:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse3_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:315:23: return_function: returning to ‘test_comps_parse3_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:318:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse3_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:318:23: return_function: returning to ‘test_comps_parse3_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:323:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:323:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:324:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_parse.c:327:5: danger: ‘fopen("sample_comps_bad1.xml", "r")’ leaks here; was opened at [(31)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/30)
#  325|       comps_parse_file(parsed, fp, NULL);
#  326|   
#  327|->     fail_if(parsed->log->entries->first == NULL);
#  328|       check_errors(parsed->log, known_errors, 3);
#  329|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def573]
libcomps-0.1.23/libcomps/tests/check_parse.c:327:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("sample_comps_bad1.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:299:1: enter_function: entry to ‘test_comps_parse3_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:312:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse3_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:312:23: return_function: returning to ‘test_comps_parse3_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:315:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse3_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:315:23: return_function: returning to ‘test_comps_parse3_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:318:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse3_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:318:23: return_function: returning to ‘test_comps_parse3_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:323:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:323:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:324:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_parse.c:327:5: danger: ‘fopen("sample_comps_bad1.xml", "r")’ leaks here; was allocated at [(31)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/30)
#  325|       comps_parse_file(parsed, fp, NULL);
#  326|   
#  327|->     fail_if(parsed->log->entries->first == NULL);
#  328|       check_errors(parsed->log, known_errors, 3);
#  329|   

Error: COMPILER_WARNING: [#def574]
libcomps-0.1.23/libcomps/tests/check_parse.c: scope_hint: In function ‘test_comps_parse3_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:344:21: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘void *’
#  344 |     fail_if(tmpobj, "%d. category should have NULL id\n");
#      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libcomps-0.1.23/libcomps/tests/check_parse.c:344:23: note: format string is defined here
#  344 |     fail_if(tmpobj, "%d. category should have NULL id\n");
#      |                      ~^
#      |                       |
#      |                       int
#      |                      %p
#  342|   
#  343|       tmpobj = comps_docgroup_get_id((COMPS_DocGroup*)it->comps_obj);
#  344|->     fail_if(tmpobj, "%d. category should have NULL id\n");
#  345|       COMPS_OBJECT_DESTROY(tmpobj);
#  346|       tmpobj = comps_docgroup_get_name((COMPS_DocGroup*)it->comps_obj);

Error: COMPILER_WARNING: [#def575]
libcomps-0.1.23/libcomps/tests/check_parse.c:347:21: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘void *’
#  347 |     fail_if(tmpobj, "%d. category should have NULL name\n");
#      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libcomps-0.1.23/libcomps/tests/check_parse.c:347:23: note: format string is defined here
#  347 |     fail_if(tmpobj, "%d. category should have NULL name\n");
#      |                      ~^
#      |                       |
#      |                       int
#      |                      %p
#  345|       COMPS_OBJECT_DESTROY(tmpobj);
#  346|       tmpobj = comps_docgroup_get_name((COMPS_DocGroup*)it->comps_obj);
#  347|->     fail_if(tmpobj, "%d. category should have NULL name\n");
#  348|       COMPS_OBJECT_DESTROY(tmpobj);
#  349|       tmpobj = comps_docgroup_get_desc((COMPS_DocGroup*)it->comps_obj);

Error: COMPILER_WARNING: [#def576]
libcomps-0.1.23/libcomps/tests/check_parse.c:350:21: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘void *’
#  350 |     fail_if(tmpobj, "%d. category should have NULL description\n");
#      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libcomps-0.1.23/libcomps/tests/check_parse.c:350:23: note: format string is defined here
#  350 |     fail_if(tmpobj, "%d. category should have NULL description\n");
#      |                      ~^
#      |                       |
#      |                       int
#      |                      %p
#  348|       COMPS_OBJECT_DESTROY(tmpobj);
#  349|       tmpobj = comps_docgroup_get_desc((COMPS_DocGroup*)it->comps_obj);
#  350|->     fail_if(tmpobj, "%d. category should have NULL description\n");
#  351|       COMPS_OBJECT_DESTROY(tmpobj);
#  352|       comps_parse_parsed_destroy(parsed);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def577]
libcomps-0.1.23/libcomps/tests/check_parse.c:420:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("sample_comps_bad2.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:356:1: enter_function: entry to ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:368:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:368:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:370:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:370:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:372:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:372:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:375:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:375:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:378:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:378:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:382:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:382:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:385:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:385:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:388:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:388:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:391:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:391:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:394:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:394:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:397:24: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:397:24: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:400:24: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:400:24: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:405:24: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:405:24: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:408:24: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:408:24: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:411:24: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:411:24: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:416:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:416:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:417:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_parse.c:420:5: danger: ‘fopen("sample_comps_bad2.xml", "r")’ leaks here; was opened at [(139)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/138)
#  418|       comps_parse_file(parsed, fp, NULL);
#  419|   
#  420|->     fail_if(parsed->log->entries->first == NULL);
#  421|       check_errors(parsed->log, known_errors, 15);
#  422|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def578]
libcomps-0.1.23/libcomps/tests/check_parse.c:420:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("sample_comps_bad2.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:356:1: enter_function: entry to ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:368:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:368:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:370:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:370:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:372:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:372:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:375:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:375:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:378:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:378:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:382:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:382:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:385:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:385:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:388:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:388:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:391:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:391:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:394:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:394:23: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:397:24: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:397:24: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:400:24: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:400:24: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:405:24: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:405:24: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:408:24: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:408:24: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:411:24: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse4_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:411:24: return_function: returning to ‘test_comps_parse4_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:416:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:416:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:417:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_parse.c:420:5: danger: ‘fopen("sample_comps_bad2.xml", "r")’ leaks here; was allocated at [(139)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/138)
#  418|       comps_parse_file(parsed, fp, NULL);
#  419|   
#  420|->     fail_if(parsed->log->entries->first == NULL);
#  421|       check_errors(parsed->log, known_errors, 15);
#  422|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def579]
libcomps-0.1.23/libcomps/tests/check_parse.c:454:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("sample_comps_bad3.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:430:1: enter_function: entry to ‘test_comps_parse5_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:441:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse5_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:441:23: return_function: returning to ‘test_comps_parse5_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:444:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse5_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:444:23: return_function: returning to ‘test_comps_parse5_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:449:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:449:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:450:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_parse.c:454:5: danger: ‘fopen("sample_comps_bad3.xml", "r")’ leaks here; was opened at [(22)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/21)
#  452|       //comps_log_print(parsed->log);
#  453|   
#  454|->     fail_if(parsed->log->entries->first == NULL);
#  455|       check_errors(parsed->log, known_errors, 2);
#  456|       //comps2xml_f(parsed->comps_doc, "fed2.xml", 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def580]
libcomps-0.1.23/libcomps/tests/check_parse.c:454:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("sample_comps_bad3.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:430:1: enter_function: entry to ‘test_comps_parse5_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:441:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse5_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:441:23: return_function: returning to ‘test_comps_parse5_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:444:23: call_function: calling ‘__log_entry_x’ from ‘test_comps_parse5_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:444:23: return_function: returning to ‘test_comps_parse5_fn’ from ‘__log_entry_x’
libcomps-0.1.23/libcomps/tests/check_parse.c:449:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:449:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:450:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_parse.c:454:5: danger: ‘fopen("sample_comps_bad3.xml", "r")’ leaks here; was allocated at [(22)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/21)
#  452|       //comps_log_print(parsed->log);
#  453|   
#  454|->     fail_if(parsed->log->entries->first == NULL);
#  455|       check_errors(parsed->log, known_errors, 2);
#  456|       //comps2xml_f(parsed->comps_doc, "fed2.xml", 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def581]
libcomps-0.1.23/libcomps/tests/check_parse.c:479:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("fedora_comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:475:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:475:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:476:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_parse.c:479:5: danger: ‘fopen("fedora_comps.xml", "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
#  477|       comps_parse_file(parsed, fp, NULL);
#  478|       //printf("log len:%d\n", parsed->log->logger_data->len);
#  479|->     fail_if(parsed->fatal_error != 0, "Some fatal errors found after parsing");
#  480|       //printf("log len:%d\n", parsed->log->logger_data->len);
#  481|       //err_str = comps_log_str(parsed->log);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def582]
libcomps-0.1.23/libcomps/tests/check_parse.c:479:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("fedora_comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:475:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:475:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:476:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_parse.c:479:5: danger: ‘fopen("fedora_comps.xml", "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  477|       comps_parse_file(parsed, fp, NULL);
#  478|       //printf("log len:%d\n", parsed->log->logger_data->len);
#  479|->     fail_if(parsed->fatal_error != 0, "Some fatal errors found after parsing");
#  480|       //printf("log len:%d\n", parsed->log->logger_data->len);
#  481|       //err_str = comps_log_str(parsed->log);

Error: COMPILER_WARNING (CWE-685): [#def583]
libcomps-0.1.23/libcomps/tests/check_parse.c: scope_hint: In function ‘test_comps_fedora_parse_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:479:39: warning[-Wformat-extra-args]: too many arguments for format
#  479 |     fail_if(parsed->fatal_error != 0, "Some fatal errors found after parsing");
#      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  477|       comps_parse_file(parsed, fp, NULL);
#  478|       //printf("log len:%d\n", parsed->log->logger_data->len);
#  479|->     fail_if(parsed->fatal_error != 0, "Some fatal errors found after parsing");
#  480|       //printf("log len:%d\n", parsed->log->logger_data->len);
#  481|       //err_str = comps_log_str(parsed->log);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def584]
libcomps-0.1.23/libcomps/tests/check_parse.c:507:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("main_comps2.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:504:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:504:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:505:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_parse.c:507:5: danger: ‘fopen("main_comps2.xml", "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
#  505|       fp = fopen("main_comps2.xml", "r");
#  506|       comps_parse_file(parsed, fp, NULL);
#  507|->     fail_if(parsed->fatal_error != 0, "Some fatal errors found after parsing");
#  508|       //comps2xml_f(parsed->comps_doc, "fed2.xml", 0);
#  509|       comps_parse_parsed_destroy(parsed);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def585]
libcomps-0.1.23/libcomps/tests/check_parse.c:507:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("main_comps2.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:504:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:504:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:505:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_parse.c:507:5: danger: ‘fopen("main_comps2.xml", "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
#  505|       fp = fopen("main_comps2.xml", "r");
#  506|       comps_parse_file(parsed, fp, NULL);
#  507|->     fail_if(parsed->fatal_error != 0, "Some fatal errors found after parsing");
#  508|       //comps2xml_f(parsed->comps_doc, "fed2.xml", 0);
#  509|       comps_parse_parsed_destroy(parsed);

Error: COMPILER_WARNING (CWE-685): [#def586]
libcomps-0.1.23/libcomps/tests/check_parse.c: scope_hint: In function ‘test_main2_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:507:39: warning[-Wformat-extra-args]: too many arguments for format
#  507 |     fail_if(parsed->fatal_error != 0, "Some fatal errors found after parsing");
#      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  505|       fp = fopen("main_comps2.xml", "r");
#  506|       comps_parse_file(parsed, fp, NULL);
#  507|->     fail_if(parsed->fatal_error != 0, "Some fatal errors found after parsing");
#  508|       //comps2xml_f(parsed->comps_doc, "fed2.xml", 0);
#  509|       comps_parse_parsed_destroy(parsed);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def587]
libcomps-0.1.23/libcomps/tests/check_parse.c:557:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("main_arches.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:553:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:553:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:554:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_parse.c:557:5: danger: ‘fopen("main_arches.xml", "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
#  555|       comps_parse_file(parsed, fp, NULL);
#  556|       //comps_log_print(parsed->log);
#  557|->     fail_if(parsed->fatal_error != 0, "Some fatal errors found after parsing");
#  558|       //comps2xml_f(parsed->comps_doc, "fed2.xml", 0);
#  559|       arches = (COMPS_ObjList*)comps_object_create(&COMPS_ObjList_ObjInfo, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def588]
libcomps-0.1.23/libcomps/tests/check_parse.c:557:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("main_arches.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_parse.c:553:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_parse.c:553:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_parse.c:554:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_parse.c:557:5: danger: ‘fopen("main_arches.xml", "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
#  555|       comps_parse_file(parsed, fp, NULL);
#  556|       //comps_log_print(parsed->log);
#  557|->     fail_if(parsed->fatal_error != 0, "Some fatal errors found after parsing");
#  558|       //comps2xml_f(parsed->comps_doc, "fed2.xml", 0);
#  559|       arches = (COMPS_ObjList*)comps_object_create(&COMPS_ObjList_ObjInfo, NULL);

Error: COMPILER_WARNING (CWE-685): [#def589]
libcomps-0.1.23/libcomps/tests/check_parse.c: scope_hint: In function ‘test_arch_fn’
libcomps-0.1.23/libcomps/tests/check_parse.c:557:39: warning[-Wformat-extra-args]: too many arguments for format
#  557 |     fail_if(parsed->fatal_error != 0, "Some fatal errors found after parsing");
#      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  555|       comps_parse_file(parsed, fp, NULL);
#  556|       //comps_log_print(parsed->log);
#  557|->     fail_if(parsed->fatal_error != 0, "Some fatal errors found after parsing");
#  558|       //comps2xml_f(parsed->comps_doc, "fed2.xml", 0);
#  559|       arches = (COMPS_ObjList*)comps_object_create(&COMPS_ObjList_ObjInfo, NULL);

Error: CPPCHECK_WARNING (CWE-476): [#def590]
libcomps-0.1.23/libcomps/tests/check_rtree.c:40: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   38|   void* int_cloner(void * int_v) {
#   39|       void * ret = malloc(sizeof(int));
#   40|->     memcpy(ret, int_v, sizeof(int));
#   41|       return ret;
#   42|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def591]
libcomps-0.1.23/libcomps/tests/check_rtree.c:40:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’
libcomps-0.1.23/libcomps/tests/check_rtree.c:127:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:148:5: call_function: inlined call to ‘int_cloner’ from ‘main’
#   38|   void* int_cloner(void * int_v) {
#   39|       void * ret = malloc(sizeof(int));
#   40|->     memcpy(ret, int_v, sizeof(int));
#   41|       return ret;
#   42|   }

Error: CPPCHECK_WARNING (CWE-476): [#def592]
libcomps-0.1.23/libcomps/tests/check_rtree.c:46: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   44|   void* str_cloner(void *str) {
#   45|       void *ret = malloc(sizeof(char)* (strlen((char*)str)+1));
#   46|->     memcpy(ret, str, (strlen((char*)str)+1));
#   47|       return ret;
#   48|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def593]
libcomps-0.1.23/libcomps/tests/check_rtree.c:115:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
libcomps-0.1.23/libcomps/tests/check_rtree.c:127:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:269:12: call_function: calling ‘load_acrodict’ from ‘main’
#  113|           val = str_cloner(pch+1);
#  114|           //printf("%s = %s\n", (char*)val, pch+1);
#  115|->         comps_rtree_set(rt, buffer, val);
#  116|           //printf("--------------------\n");
#  117|           /*for (COMPS_HSListItem *it = rt->subnodes->first;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def594]
libcomps-0.1.23/libcomps/tests/check_rtree.c:115:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
libcomps-0.1.23/libcomps/tests/check_rtree.c:127:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:269:12: call_function: calling ‘load_acrodict’ from ‘main’
#  113|           val = str_cloner(pch+1);
#  114|           //printf("%s = %s\n", (char*)val, pch+1);
#  115|->         comps_rtree_set(rt, buffer, val);
#  116|           //printf("--------------------\n");
#  117|           /*for (COMPS_HSListItem *it = rt->subnodes->first;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def595]
libcomps-0.1.23/libcomps/tests/check_rtree.c:115:9: warning[-Wanalyzer-malloc-leak]: leak of ‘str_cloner(pch + 1)’
libcomps-0.1.23/libcomps/tests/check_rtree.c:127:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:269:12: call_function: calling ‘load_acrodict’ from ‘main’
#  113|           val = str_cloner(pch+1);
#  114|           //printf("%s = %s\n", (char*)val, pch+1);
#  115|->         comps_rtree_set(rt, buffer, val);
#  116|           //printf("--------------------\n");
#  117|           /*for (COMPS_HSListItem *it = rt->subnodes->first;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def596]
libcomps-0.1.23/libcomps/tests/check_rtree.c:148:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/tests/check_rtree.c:127:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:148:5: call_function: inlined call to ‘int_cloner’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:148:5: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  146|   /*          Root
#  147|    */
#  148|->     comps_rtree_set(tree,"some key",int_cloner((void*)&x));
#  149|   /*          Root
#  150|    *              ['some key']-->10

Error: GCC_ANALYZER_WARNING (CWE-401): [#def597]
libcomps-0.1.23/libcomps/tests/check_rtree.c:152:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/tests/check_rtree.c:127:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:152:5: call_function: inlined call to ‘int_cloner’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:152:5: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  150|    *              ['some key']-->10
#  151|    */
#  152|->     comps_rtree_set(tree,"some Cray",int_cloner((void*)&y));
#  153|   /*          Root
#  154|    *              ['some']-->|-['Cray']-->20

Error: GCC_ANALYZER_WARNING (CWE-401): [#def598]
libcomps-0.1.23/libcomps/tests/check_rtree.c:157:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/tests/check_rtree.c:127:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:157:5: call_function: inlined call to ‘int_cloner’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:157:5: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  155|    *                         |-['key']-->10
#  156|    */
#  157|->     comps_rtree_set(tree,"some",int_cloner((void*)&z));
#  158|   /*          Root
#  159|    *              ['some']-->|-['Cray']-->20

Error: GCC_ANALYZER_WARNING (CWE-401): [#def599]
libcomps-0.1.23/libcomps/tests/check_rtree.c:164:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/tests/check_rtree.c:127:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:164:5: call_function: inlined call to ‘int_cloner’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:164:5: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  162|    *                 30
#  163|    */
#  164|->     comps_rtree_set(tree,"anything",int_cloner((void*)&a));
#  165|   /*          Root
#  166|    *              ['some']-->|-['Cray']-->20

Error: GCC_ANALYZER_WARNING (CWE-401): [#def600]
libcomps-0.1.23/libcomps/tests/check_rtree.c:212:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’
libcomps-0.1.23/libcomps/tests/check_rtree.c:127:5: enter_function: entry to ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:212:5: call_function: inlined call to ‘int_cloner’ from ‘main’
libcomps-0.1.23/libcomps/tests/check_rtree.c:212:5: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  210|       printf("------------\n");
#  211|   
#  212|->     comps_rtree_set(tree,"some key",int_cloner((void*)&x2));
#  213|   /*          Root
#  214|    *              ['some']-->|-['Cray']-->20

Error: GCC_ANALYZER_WARNING (CWE-688): [#def601]
libcomps-0.1.23/libcomps/tests/check_utils.c:51:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
 branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_utils.c:51:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_utils.c:51:5: danger: argument 1 (‘<unknown>’) NULL where non-null expected
#argument 1 of ‘__builtin_puts’ must be non-null
#   49|       printf("%s type=", str);
#   50|       free(str);
#   51|->     printf("%s\n", pkg_type2str(((COMPS_DocGroupPackage*)obj)->type));
#   52|   }
#   53|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def602]
libcomps-0.1.23/libcomps/tests/check_validate.c:134:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("f21-rawhide-comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_validate.c:133:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_validate.c:134:14: danger: ‘fopen("f21-rawhide-comps.xml", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  132|   
#  133|       fp = fopen("f21-rawhide-comps.xml", "r");
#  134|->     parsed = comps_parse_parsed_create();
#  135|       fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) != 1);
#  136|       comps_parse_file(parsed, fp, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def603]
libcomps-0.1.23/libcomps/tests/check_validate.c:134:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("f21-rawhide-comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_validate.c:133:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_validate.c:134:14: danger: ‘fopen("f21-rawhide-comps.xml", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  132|   
#  133|       fp = fopen("f21-rawhide-comps.xml", "r");
#  134|->     parsed = comps_parse_parsed_create();
#  135|       fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) != 1);
#  136|       comps_parse_file(parsed, fp, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def604]
libcomps-0.1.23/libcomps/tests/check_validate.c:135:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("f21-rawhide-comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_validate.c:133:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_validate.c:135:5: danger: ‘fopen("f21-rawhide-comps.xml", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  133|       fp = fopen("f21-rawhide-comps.xml", "r");
#  134|       parsed = comps_parse_parsed_create();
#  135|->     fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) != 1);
#  136|       comps_parse_file(parsed, fp, NULL);
#  137|       doc = parsed->comps_doc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def605]
libcomps-0.1.23/libcomps/tests/check_validate.c:135:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("f21-rawhide-comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_validate.c:133:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_validate.c:135:5: danger: ‘fopen("f21-rawhide-comps.xml", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  133|       fp = fopen("f21-rawhide-comps.xml", "r");
#  134|       parsed = comps_parse_parsed_create();
#  135|->     fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) != 1);
#  136|       comps_parse_file(parsed, fp, NULL);
#  137|       doc = parsed->comps_doc;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def606]
libcomps-0.1.23/libcomps/tests/check_validate.c:137:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("f21-rawhide-comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_validate.c:133:10: acquire_resource: opened here
libcomps-0.1.23/libcomps/tests/check_validate.c:135:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_validate.c:135:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_validate.c:137:5: danger: ‘fopen("f21-rawhide-comps.xml", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  135|       fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) != 1);
#  136|       comps_parse_file(parsed, fp, NULL);
#  137|->     doc = parsed->comps_doc;
#  138|       result = comps_validate_execute((COMPS_Object*)doc, COMPS_Doc_ValidateRules);
#  139|       comps_valgenres_print(result, stdout);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def607]
libcomps-0.1.23/libcomps/tests/check_validate.c:137:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("f21-rawhide-comps.xml", "r")’
libcomps-0.1.23/libcomps/tests/check_validate.c:133:10: acquire_memory: allocated here
libcomps-0.1.23/libcomps/tests/check_validate.c:135:5: branch_false: following ‘false’ branch...
libcomps-0.1.23/libcomps/tests/check_validate.c:135:5: branch_false: ...to here
libcomps-0.1.23/libcomps/tests/check_validate.c:137:5: danger: ‘fopen("f21-rawhide-comps.xml", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  135|       fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) != 1);
#  136|       comps_parse_file(parsed, fp, NULL);
#  137|->     doc = parsed->comps_doc;
#  138|       result = comps_validate_execute((COMPS_Object*)doc, COMPS_Doc_ValidateRules);
#  139|       comps_valgenres_print(result, stdout);

Scan Properties

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