mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-03 08:03:38 +08:00
Follow-up to #206. Adds the allocation-check coverage that the original PR did not reach: - store: NULL-check malloc in cbm_store_get_schema node-labels and edge-types blocks; replace safe_realloc with non-destructive realloc + cleanup so a partial result is freed (and node-labels block freed via cbm_store_schema_free) instead of leaked. - cypher: NULL-check heap_strdup return in parse_props (key/value), parse_rel_types (first and subsequent types), and parse_in_list (op and list values). Each failure path frees prior heap_strdup'd entries before returning. - cypher: parse_case_expr realloc-failure cleanup now also frees then_val for the just-parsed branch and for each previously stored branch, not just the when_expr trees.