diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-02-12 16:49:37 -0500 | 
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-02-12 16:49:37 -0500 | 
| commit | 20fbf33e8bc991b417ab1579404eb6d681599e5c (patch) | |
| tree | 0523b95bb4c791f451a5ef7bf867f5ec7678c4ef /src | |
| parent | 7c83754fd59e58aed2f958bfcbd52975499e1400 (diff) | |
| download | stasis-20fbf33e8bc991b417ab1579404eb6d681599e5c.tar.gz | |
Fix memory leaks in delivery_purge_packages
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/delivery/delivery_install.c | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/src/lib/delivery/delivery_install.c b/src/lib/delivery/delivery_install.c index d3aab01..15ad7e0 100644 --- a/src/lib/delivery/delivery_install.c +++ b/src/lib/delivery/delivery_install.c @@ -128,7 +128,7 @@ int delivery_purge_packages(struct Delivery *ctx, const char *env_name, int use_      char package_manager[100] = {0};      typedef int (fnptr)(const char *); -    const char *current_env = conda_get_active_environment(); +    char *current_env = conda_get_active_environment();      if (current_env) {          conda_activate(ctx->storage.conda_install_prefix, env_name);      } @@ -171,10 +171,12 @@ int delivery_purge_packages(struct Delivery *ctx, const char *env_name, int use_              status = 1;              break;          } +        guard_free(command);      }      if (current_env) {          conda_activate(ctx->storage.conda_install_prefix, current_env); +        guard_free(current_env);      }      return status; | 
