diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2001-11-27 05:15:37 +0000 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2001-11-27 05:15:37 +0000 |
commit | db864534d2f54492b21cd11e2838a2b77291fcc0 (patch) | |
tree | 3b3fc98d37bcc274c56ebc78a8c58f72d8bbdc1d /modules/pam_unix/pam_unix_auth.c | |
parent | fc78bb8523d8d6a2c90ded155b555e956156c2b1 (diff) | |
download | pam-db864534d2f54492b21cd11e2838a2b77291fcc0.tar.gz pam-db864534d2f54492b21cd11e2838a2b77291fcc0.tar.bz2 pam-db864534d2f54492b21cd11e2838a2b77291fcc0.zip |
Relevant BUGIDs: 483959
Purpose of commit: fix memory leak
Commit summary:
---------------
Fernando Trias pointed out a silly memory leak in pam_unix.so. It looks
like some allocated memory that is simply not needed for anything.
Diffstat (limited to 'modules/pam_unix/pam_unix_auth.c')
-rw-r--r-- | modules/pam_unix/pam_unix_auth.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/modules/pam_unix/pam_unix_auth.c b/modules/pam_unix/pam_unix_auth.c index f08ea515..f55ae469 100644 --- a/modules/pam_unix/pam_unix_auth.c +++ b/modules/pam_unix/pam_unix_auth.c @@ -82,7 +82,7 @@ #define AUTH_RETURN \ { \ - if (on(UNIX_LIKE_AUTH, ctrl) && ret_data) { \ + if (on(UNIX_LIKE_AUTH, ctrl)) { \ D(("recording return code for next time [%d]", \ retval)); \ pam_set_data(pamh, "unix_setcred_return", \ @@ -96,17 +96,13 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags ,int argc, const char **argv) { unsigned int ctrl; - int retval, *ret_data = NULL; + int retval; const char *name, *p; D(("called.")); ctrl = _set_ctrl(pamh, flags, NULL, argc, argv); - /* Get a few bytes so we can pass our return value to - pam_sm_setcred(). */ - ret_data = malloc(sizeof(int)); - /* get the user'name' */ retval = pam_get_user(pamh, &name, "login: "); |