diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-02-12 16:56:28 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-02-12 16:56:28 -0500 |
commit | 3746e6eec67e4e7a44fb7df78b8be15375448cd0 (patch) | |
tree | a68c00fd4d09ac787dc9259df7f8e5d562a99676 /tests | |
parent | 153fa891dd6ce4358cfecf0c0917f989aa5897af (diff) | |
download | stasis-3746e6eec67e4e7a44fb7df78b8be15375448cd0.tar.gz |
Fix leaks in test_conda.c
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_conda.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_conda.c b/tests/test_conda.c index 63a2781..81f593f 100644 --- a/tests/test_conda.c +++ b/tests/test_conda.c @@ -43,6 +43,8 @@ void test_conda_installation() { delivery_get_conda_installer_url(&ctx, install_url); delivery_get_conda_installer(&ctx, install_url); delivery_install_conda(ctx.conda.installer_path, ctx.storage.conda_install_prefix); + + guard_free(install_url); STASIS_ASSERT_FATAL(access(ctx.storage.conda_install_prefix, F_OK) == 0, "conda was not installed correctly"); STASIS_ASSERT_FATAL(conda_activate(ctx.storage.conda_install_prefix, "base") == 0, "unable to activate base environment"); STASIS_ASSERT_FATAL(conda_exec("info") == 0, "conda was not installed correctly"); @@ -155,7 +157,9 @@ void test_pip_index_provides() { void test_conda_get_active_environment() { conda_activate(ctx.storage.conda_install_prefix, "base"); - STASIS_ASSERT(strcmp(conda_get_active_environment(), "base") == 0, "base environment not active"); + char *active_env = conda_get_active_environment(); + STASIS_ASSERT(strcmp(active_env, "base") == 0, "base environment not active"); + guard_free(active_env); } void test_conda_provides() { |