1
0
Fork 0
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:
Brian McKenna 2025-03-03 13:36:54 +11:00
parent 47e23811ff
commit 79b019ec4f
3 changed files with 9 additions and 1 deletions

View file

@ -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)