mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 17:29:36 +01:00
Fix leaks in nix_api_store_test.nix_eval_state_lookup_path
This commit is contained in:
parent
57f526ecda
commit
2872c8ede0
1 changed files with 4 additions and 0 deletions
|
|
@ -42,12 +42,16 @@ TEST_F(nix_api_expr_test, nix_eval_state_lookup_path)
|
|||
nix_expr_eval_from_string(ctx, state, "builtins.seq <nixos-config> <nixpkgs>", ".", value);
|
||||
assert_ctx_ok();
|
||||
|
||||
nix_state_free(state);
|
||||
|
||||
ASSERT_EQ(nix_get_type(ctx, value), NIX_TYPE_PATH);
|
||||
assert_ctx_ok();
|
||||
|
||||
auto pathStr = nix_get_path_string(ctx, value);
|
||||
assert_ctx_ok();
|
||||
ASSERT_EQ(0, strcmp(pathStr, nixpkgs.c_str()));
|
||||
|
||||
nix_gc_decref(nullptr, value);
|
||||
}
|
||||
|
||||
TEST_F(nix_api_expr_test, nix_expr_eval_from_string)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue