diff options
author | des <des@FreeBSD.org> | 2003-06-18 09:44:09 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-06-18 09:44:09 +0000 |
commit | aceb878fef0eae36eacde19ecf4fc8b043ab6b80 (patch) | |
tree | 9aec3704700b7a1d1108b60902347048e773c5a2 /contrib | |
parent | 7b3aa000d649c087696fd0357690827932b93bf5 (diff) | |
parent | 49e0f275db6cafef33693cb9ac1fdd52cdd63a67 (diff) | |
download | FreeBSD-src-aceb878fef0eae36eacde19ecf4fc8b043ab6b80.zip FreeBSD-src-aceb878fef0eae36eacde19ecf4fc8b043ab6b80.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r116520,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/openpam/lib/openpam_load.c | 7 | ||||
-rw-r--r-- | contrib/openpam/lib/pam_end.c | 8 | ||||
-rw-r--r-- | contrib/openpam/lib/pam_getenvlist.c | 8 |
3 files changed, 15 insertions, 8 deletions
diff --git a/contrib/openpam/lib/openpam_load.c b/contrib/openpam/lib/openpam_load.c index a1057f3..838f72e 100644 --- a/contrib/openpam/lib/openpam_load.c +++ b/contrib/openpam/lib/openpam_load.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_load.c#19 $ + * $P4: //depot/projects/openpam/lib/openpam_load.c#20 $ */ #include <dlfcn.h> @@ -153,10 +153,13 @@ openpam_destroy_chain(pam_chain_t *chain) return; openpam_destroy_chain(chain->next); chain->next = NULL; - while (chain->optc--) + while (chain->optc) { + --chain->optc; FREE(chain->optv[chain->optc]); + } FREE(chain->optv); openpam_release_module(chain->module); + chain->module = NULL; FREE(chain); } diff --git a/contrib/openpam/lib/pam_end.c b/contrib/openpam/lib/pam_end.c index e1762c6..0dd3ea7 100644 --- a/contrib/openpam/lib/pam_end.c +++ b/contrib/openpam/lib/pam_end.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_end.c#13 $ + * $P4: //depot/projects/openpam/lib/pam_end.c#14 $ */ #include <stdlib.h> @@ -68,8 +68,10 @@ pam_end(pam_handle_t *pamh, } /* clear environment */ - while (pamh->env_count) - FREE(pamh->env[--pamh->env_count]); + while (pamh->env_count) { + --pamh->env_count; + FREE(pamh->env[pamh->env_count]); + } FREE(pamh->env); /* clear chains */ diff --git a/contrib/openpam/lib/pam_getenvlist.c b/contrib/openpam/lib/pam_getenvlist.c index 2ba1bdf..82f2320 100644 --- a/contrib/openpam/lib/pam_getenvlist.c +++ b/contrib/openpam/lib/pam_getenvlist.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_getenvlist.c#12 $ + * $P4: //depot/projects/openpam/lib/pam_getenvlist.c#13 $ */ #include <stdlib.h> @@ -65,8 +65,10 @@ pam_getenvlist(pam_handle_t *pamh) } for (i = 0; i < pamh->env_count; ++i) { if ((envlist[i] = strdup(pamh->env[i])) == NULL) { - while (i) - FREE(envlist[--i]); + while (i) { + --i; + FREE(envlist[i]); + } FREE(envlist); openpam_log(PAM_LOG_ERROR, "%s", pam_strerror(pamh, PAM_BUF_ERR)); |