diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-02-04 11:46:17 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-02-04 11:46:17 -0500 |
commit | 825aa472739775a5e2d673043f9d846df1eac924 (patch) | |
tree | 622918f9a81723b830ab8bcc403154271932b591 | |
parent | 0f96da78f6f9c8166f8fd8f5184476c658c3f648 (diff) | |
download | stasis-memfixes.tar.gz |
test_artifactory.c: free allocated resourcesmemfixes
-rw-r--r-- | tests/test_artifactory.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_artifactory.c b/tests/test_artifactory.c index 2c732fa..4f41543 100644 --- a/tests/test_artifactory.c +++ b/tests/test_artifactory.c @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) { memset(&gnoauth, 0, sizeof(gnoauth)); memset(&ctx, 0, sizeof(ctx)); - const char *basedir = realpath(".", NULL); + char *basedir = realpath(".", NULL); const char *ws = "workspace"; mkdir(ws, 0755); if (pushd(ws)) { @@ -107,6 +107,7 @@ int main(int argc, char *argv[]) { ctx._stasis_ini_fp.cfg = ini_open(cfg_path); if (!ctx._stasis_ini_fp.cfg) { SYSERROR("%s: configuration is invalid", cfg_path); + guard_free(basedir); return STASIS_TEST_SUITE_SKIP; } delivery_init_platform(&ctx); @@ -118,6 +119,7 @@ int main(int argc, char *argv[]) { SYSERROR("%s", "Not configured to test Artifactory. Skipping."); return STASIS_TEST_SUITE_SKIP; } + guard_free(basedir); STASIS_TEST_FUNC *tests[] = { test_jfrog_cli_rt_ping, |