Skip to content

Commit c6897bd

Browse files
committed
Remove free() in recipes
1 parent 1058d33 commit c6897bd

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/recipe/lang/Rust/Cargo.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ pl_rust_cargo_getsrc (char *option)
7575
char *raw_content = xy_file_read (cargo_config_file);
7676
char *formatted_content = xy_str_gsub (raw_content, " ", "");
7777
formatted_content = xy_str_gsub (formatted_content, "'", "\"");
78-
free (raw_content);
7978

8079
XyStrFindResult_t result_has_mirror = xy_str_find (formatted_content, "replace-with");
8180
if (result_has_mirror.found)
@@ -112,7 +111,6 @@ pl_write_rust_config (const char *path, const char *url)
112111
char *content = RAWSTR_pl_rust_cargo_config;
113112
content = xy_str_gsub (content, "@url@", url);
114113
chsrc_overwrite_file (content, path);
115-
free (content);
116114
}
117115

118116
/**
@@ -172,7 +170,6 @@ pl_rust_cargo_setsrc (char *option)
172170

173171
char *final_content = xy_str_gsub (raw_content, mirror_url, xy_2strcat ("sparse+", source.url));
174172
chsrc_overwrite_file (final_content, cargo_config_file);
175-
free (final_content);
176173
goto finish;
177174
}
178175

0 commit comments

Comments
 (0)