Skip to content

Commit 8daa112

Browse files
fix(mcp): release path filter on search launch failure
Signed-off-by: Ertan <ertan.kucukoglu@gmail.com>
1 parent 076c8ae commit 8daa112

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/mcp/mcp.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9813,6 +9813,9 @@ static char *handle_search_code(cbm_mcp_server_t *srv, const char *args) {
98139813
FILE *fp = cbm_popen(cmd, "r");
98149814
if (!fp) {
98159815
search_scratch_close(&scratch);
9816+
if (has_path_filter) {
9817+
cbm_regfree(&path_regex);
9818+
}
98169819
free(root_path);
98179820
free(pattern);
98189821
free(project);

0 commit comments

Comments
 (0)