| 104 | } |
| 105 | |
| 106 | static void mn_cleanup(MN_LangProj *lp, cbm_store_t *store) { |
| 107 | if (store) cbm_store_close(store); |
| 108 | if (lp->srv) { cbm_mcp_server_free(lp->srv); lp->srv = NULL; } |
| 109 | free(lp->project); |
| 110 | lp->project = NULL; |
| 111 | th_rmtree(lp->tmpdir); |
| 112 | unlink(lp->dbpath); |
| 113 | char wal[600], shm[600]; |
| 114 | snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath); |
| 115 | unlink(wal); |
| 116 | snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath); |
| 117 | unlink(shm); |
| 118 | } |
| 119 | |
| 120 | /* Count nodes with a given label; -1 on error. */ |
| 121 | static int mn_count_label(cbm_store_t *store, const char *project, const char *label) { |
no test coverage detected