diff options
author | des <des@FreeBSD.org> | 2002-04-01 12:20:48 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-04-01 12:20:48 +0000 |
commit | 191bd7d163c8bb0d405b52eb41d1d91baaca3d1e (patch) | |
tree | fd0ce8931943ac01dd8bb22d77f586d27c0c8da2 /contrib/openpam/lib | |
parent | a0947ef00dbb52ca5dcd9ce549866938b032075a (diff) | |
download | FreeBSD-src-191bd7d163c8bb0d405b52eb41d1d91baaca3d1e.zip FreeBSD-src-191bd7d163c8bb0d405b52eb41d1d91baaca3d1e.tar.gz |
Fix braino in code path for new items (perforce change 8760).
Based on a patch submitted by Joe Marcus Clarke <marcus@marcuscom.com>.
Sponsored by: DARPA, NAI LabS
cvs: ----------------------------------------------------------------------
Diffstat (limited to 'contrib/openpam/lib')
-rw-r--r-- | contrib/openpam/lib/pam_set_data.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/openpam/lib/pam_set_data.c b/contrib/openpam/lib/pam_set_data.c index 4ff3617..253a4bf 100644 --- a/contrib/openpam/lib/pam_set_data.c +++ b/contrib/openpam/lib/pam_set_data.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_set_data.c#8 $ + * $P4: //depot/projects/openpam/lib/pam_set_data.c#9 $ */ #include <stdlib.h> @@ -74,11 +74,13 @@ pam_set_data(pam_handle_t *pamh, if ((dp = malloc(sizeof *dp)) == NULL) return (PAM_BUF_ERR); if ((dp->name = strdup(module_data_name)) == NULL) { - free(data); + free(dp); return (PAM_BUF_ERR); } + dp->data = data; + dp->cleanup = cleanup; dp->next = pamh->module_data; - pamh->module_data = data; + pamh->module_data = dp; return (PAM_SUCCESS); } |