fix: Plug leak in EvalState::realise_string

(cherry picked from commit d9f9aa64ceb48c39c028d48680a664063d70bc23)
This commit is contained in:
Robert Hensing 2024-05-22 13:38:55 +02:00
parent 87203ef394
commit 7e347314bb

View file

@ -175,6 +175,11 @@ impl EvalState {
paths
};
// We've converted the nix_realised_string to a native struct containing copies, so we can free it now.
unsafe {
raw::realised_string_free(rs);
}
Ok(RealisedString { s, paths })
}