Skip to content

Commit

Permalink
DAOS-15717 bug: Fix memory leak cid 2555536 (#14231)
Browse files Browse the repository at this point in the history
- Fix mem leak for coverity 2555536

Signed-off-by: Alexander A Oganezov <[email protected]>
  • Loading branch information
frostedcmos authored Apr 26, 2024
1 parent d8e09d2 commit 1608fab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mgmt/cli_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,15 @@ get_env_deprecated(char **val, const char *new_env, const char *old_env)
D_WARN("Both %s and %s are set! Deprecated %s (%s) will be ignored\n",
new_env, old_env, old_env, old);
*val = new;
d_freeenv_str(&old);
return 0;
}

if (rc_old == 0) {
D_INFO("%s is deprecated, upgrade your environment to use %s instead\n", old_env,
new_env);
*val = old;
d_freeenv_str(&new);
return 0;
}

Expand Down

0 comments on commit 1608fab

Please sign in to comment.