From db864534d2f54492b21cd11e2838a2b77291fcc0 Mon Sep 17 00:00:00 2001 From: "Andrew G. Morgan" Date: Tue, 27 Nov 2001 05:15:37 +0000 Subject: 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. --- modules/pam_unix/pam_unix_auth.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'modules/pam_unix/pam_unix_auth.c') 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: "); -- cgit v1.2.3