diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2004-09-15 12:06:17 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2004-09-15 12:06:17 +0000 |
commit | e1f75a80821125170e23a9b920d138a4a952c708 (patch) | |
tree | 06b15c3d9d4fa69fad768cb5071bb4bfc80f9d92 /libpam/pam_env.c | |
parent | d7987be1aade2b11454a8b3b3d8e9c1c3df93d5f (diff) | |
download | pam-e1f75a80821125170e23a9b920d138a4a952c708.tar.gz pam-e1f75a80821125170e23a9b920d138a4a952c708.tar.bz2 pam-e1f75a80821125170e23a9b920d138a4a952c708.zip |
Relevant BUGIDs:
Purpose of commit:
Commit summary:
---------------
bugfix: Add parts of Steve Grubb's resource leak and other fixes
Diffstat (limited to 'libpam/pam_env.c')
-rw-r--r-- | libpam/pam_env.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libpam/pam_env.c b/libpam/pam_env.c index d5a26ccb..ae1ddf2e 100644 --- a/libpam/pam_env.c +++ b/libpam/pam_env.c @@ -75,7 +75,7 @@ int _pam_make_env(pam_handle_t *pamh) /* * fill entries in pamh->env */ - + pamh->env->entries = PAM_ENV_CHUNK; pamh->env->requested = 1; pamh->env->list[0] = NULL; @@ -223,7 +223,7 @@ int pam_putenv(pam_handle_t *pamh, const char *name_value) /* add a new NULL entry at end; increase counter */ pamh->env->list[pamh->env->requested++] = NULL; - + } else { /* replace old */ D(("replacing item: %s\n with: %s" , pamh->env->list[item], name_value)); @@ -344,6 +344,7 @@ static char **_copy_env(pam_handle_t *pamh) _pam_overwrite(dump[i]); _pam_drop(dump[i]); } + __pam_drop(dump); return NULL; } } |