From c6897bd73ece0431ff7e01478233c4d84f59aae5 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Mon, 27 Oct 2025 22:11:34 +0800 Subject: [PATCH] Remove `free()` in recipes --- src/recipe/lang/Rust/Cargo.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/recipe/lang/Rust/Cargo.c b/src/recipe/lang/Rust/Cargo.c index 5ca237a..d4dbbb1 100644 --- a/src/recipe/lang/Rust/Cargo.c +++ b/src/recipe/lang/Rust/Cargo.c @@ -75,7 +75,6 @@ pl_rust_cargo_getsrc (char *option) char *raw_content = xy_file_read (cargo_config_file); char *formatted_content = xy_str_gsub (raw_content, " ", ""); formatted_content = xy_str_gsub (formatted_content, "'", "\""); - free (raw_content); XyStrFindResult_t result_has_mirror = xy_str_find (formatted_content, "replace-with"); if (result_has_mirror.found) @@ -112,7 +111,6 @@ pl_write_rust_config (const char *path, const char *url) char *content = RAWSTR_pl_rust_cargo_config; content = xy_str_gsub (content, "@url@", url); chsrc_overwrite_file (content, path); - free (content); } /** @@ -172,7 +170,6 @@ pl_rust_cargo_setsrc (char *option) char *final_content = xy_str_gsub (raw_content, mirror_url, xy_2strcat ("sparse+", source.url)); chsrc_overwrite_file (final_content, cargo_config_file); - free (final_content); goto finish; }