mirror of
https://github.com/NixOS/nix
synced 2025-06-25 19:01:16 +02:00
c-api: fix a few memory leaks
This commit is contained in:
parent
47e23811ff
commit
79b019ec4f
3 changed files with 9 additions and 1 deletions
|
@ -199,7 +199,9 @@ EvalState * nix_state_create(nix_c_context * context, const char ** lookupPath_c
|
|||
!= NIX_OK)
|
||||
return nullptr;
|
||||
|
||||
return nix_eval_state_build(context, builder);
|
||||
auto *state = nix_eval_state_build(context, builder);
|
||||
nix_eval_state_builder_free(builder);
|
||||
return state;
|
||||
}
|
||||
|
||||
void nix_state_free(EvalState * state)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue