summaryrefslogtreecommitdiff
path: root/libpam/pam_env.c
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2004-09-15 12:06:17 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2004-09-15 12:06:17 +0000
commite1f75a80821125170e23a9b920d138a4a952c708 (patch)
tree06b15c3d9d4fa69fad768cb5071bb4bfc80f9d92 /libpam/pam_env.c
parentd7987be1aade2b11454a8b3b3d8e9c1c3df93d5f (diff)
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.c5
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;
}
}