Skip to content

Commit 492ae13

Browse files
committed
chore(lint): release the #2127 import-filter strings through safe_free
The memory-core ratchet flagged src/pipeline/pass_pkgmap.c growing by 2 raw allocator sites (82 -> 84). Both are frees of strings returned by cbm_pipeline_fqn_compute and cbm_pipeline_resolve_module, which the core never counted, so they now go through safe_free as the rest of the codebase does rather than raw free or cbm_free. Behaviour is unchanged; pass_pkgmap.c is back at its baseline of 82. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 5acd91a commit 492ae13

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/pipeline/pass_pkgmap.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,7 +1630,7 @@ static bool python_import_local_materialized(const cbm_gbuf_t *gbuf, const char
16301630
}
16311631
char *file_qn = cbm_pipeline_fqn_compute(project_name, rel_path, "__file__");
16321632
const cbm_gbuf_node_t *file_node = file_qn ? cbm_gbuf_find_by_qn(gbuf, file_qn) : NULL;
1633-
free(file_qn);
1633+
safe_free(file_qn);
16341634
const cbm_gbuf_edge_t **edges = NULL;
16351635
int edge_count = 0;
16361636
if (!file_node || cbm_gbuf_find_edges_by_source_type(gbuf, file_node->id, "IMPORTS", &edges,
@@ -1713,7 +1713,7 @@ static bool python_import_module_in_project(const cbm_pipeline_ctx_t *ctx, const
17131713
*dot = '\0';
17141714
char *qn = cbm_pipeline_resolve_module(ctx, source_rel, part);
17151715
bool found = qn && cbm_gbuf_find_by_qn(ctx->gbuf, qn) != NULL;
1716-
free(qn);
1716+
safe_free(qn);
17171717
return found;
17181718
}
17191719

0 commit comments

Comments
 (0)