src: fix memory leaks

This commit is contained in:
Jacob Young
2023-11-05 09:29:34 -05:00
parent 7b9f8782c8
commit c2cda947c9
3 changed files with 3 additions and 1 deletions

View File

@@ -4120,7 +4120,7 @@ pub fn embedFile(
}
return error.ImportOutsideModulePath;
};
errdefer gpa.free(sub_file_path);
defer gpa.free(sub_file_path);
return newEmbedFile(mod, cur_file.mod, sub_file_path, resolved_path, gop, src_loc);
}