Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

fix(discover): address QA round 2 findings

Shane McCarron57e08e616b62
diff --git a/src/pipeline/pipeline.c b/src/pipeline/pipeline.c
index e6ee73a69..b553171db 100644
--- a/src/pipeline/pipeline.c
+++ b/src/pipeline/pipeline.c
@@ -101,6 +101,12 @@ void cbm_pipeline_free(cbm_pipeline_t *p) {
free(p->db_path);
free(p->project_name);
/* gbuf, store, registry freed during/after run */
+ /* Defensively free userconfig in case run() was never called or panicked */
+ if (p->userconfig) {
+ cbm_set_user_lang_config(NULL);
+ cbm_userconfig_free(p->userconfig);
+ p->userconfig = NULL;
+ }
free(p);
}