| 96 | } |
| 97 | |
| 98 | static void flow_cache_clear_locked(void) { |
| 99 | for (int i = 0; i < g_flow_cache.node_count; i++) { |
| 100 | cbm_free(CBM_MEM_CLASS_OTHER, g_flow_cache.nodes[i].name); |
| 101 | cbm_free(CBM_MEM_CLASS_OTHER, g_flow_cache.nodes[i].file_path); |
| 102 | } |
| 103 | cbm_free(CBM_MEM_CLASS_OTHER, g_flow_cache.nodes); |
| 104 | cbm_free(CBM_MEM_CLASS_OTHER, g_flow_cache.out_edges); |
| 105 | cbm_free(CBM_MEM_CLASS_OTHER, g_flow_cache.in_first); |
| 106 | cbm_free(CBM_MEM_CLASS_OTHER, g_flow_cache.in_edges); |
| 107 | cbm_free(CBM_MEM_CLASS_OTHER, g_flow_cache.data_first); |
| 108 | cbm_free(CBM_MEM_CLASS_OTHER, g_flow_cache.data_count); |
| 109 | cbm_free(CBM_MEM_CLASS_OTHER, g_flow_cache.data_edges); |
| 110 | cbm_free(CBM_MEM_CLASS_OTHER, g_flow_cache.flows); |
| 111 | memset(&g_flow_cache, 0, sizeof(g_flow_cache)); |
| 112 | } |
| 113 | |
| 114 | void cbm_atlas_flows_cache_clear(void) { |
| 115 | pthread_mutex_lock(&g_flow_mu); |
no test coverage detected