| 112 | } |
| 113 | |
| 114 | static void gpa_cleanup(GpaProj *lp, cbm_store_t *store) { |
| 115 | if (store) cbm_store_close(store); |
| 116 | if (lp->srv) { cbm_mcp_server_free(lp->srv); lp->srv = NULL; } |
| 117 | free(lp->project); |
| 118 | lp->project = NULL; |
| 119 | th_rmtree(lp->tmpdir); |
| 120 | unlink(lp->dbpath); |
| 121 | char wal[600], shm[600]; |
| 122 | snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath); |
| 123 | unlink(wal); |
| 124 | snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath); |
| 125 | unlink(shm); |
| 126 | } |
| 127 | |
| 128 | /* ── Node-count helpers ─────────────────────────────────────────── */ |
| 129 |
no test coverage detected