| 136 | } |
| 137 | |
| 138 | static void lang_cleanup(LangProj *lp, cbm_store_t *store) { |
| 139 | if (store) { |
| 140 | cbm_store_close(store); |
| 141 | } |
| 142 | if (lp->srv) { |
| 143 | cbm_mcp_server_free(lp->srv); |
| 144 | lp->srv = NULL; |
| 145 | } |
| 146 | free(lp->project); |
| 147 | lp->project = NULL; |
| 148 | th_rmtree(lp->tmpdir); |
| 149 | unlink(lp->dbpath); |
| 150 | char wal[600]; |
| 151 | char shm[600]; |
| 152 | snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath); |
| 153 | unlink(wal); |
| 154 | snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath); |
| 155 | unlink(shm); |
| 156 | } |
| 157 | |
| 158 | /* Count nodes of `label` with >=1 outbound edge. Returns -1 on query error. */ |
| 159 | static int label_with_outbound(cbm_store_t *store, const char *project, const char *label) { |
no test coverage detected