1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

s3: Fix crash in pam_winbind, another reference to freed memory.

Signed-off-by: Bo Yang <boyang@samba.org>
This commit is contained in:
Bo Yang 2009-10-24 09:20:00 +08:00
parent 3050f83288
commit b9a3f1dd85

View File

@ -1788,7 +1788,7 @@ static int winbind_auth_request(struct pwb_context *ctx,
if (logon.blobs) {
wbcFreeMemory(logon.blobs);
}
if (info && info->blobs) {
if (info && info->blobs && !p_info) {
wbcFreeMemory(info->blobs);
}
if (error && !p_error) {
@ -3141,10 +3141,14 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
free(username_ret);
}
wbcFreeMemory(info);
wbcFreeMemory(policy);
}
if (info && info->blobs) {
wbcFreeMemory(info->blobs);
}
wbcFreeMemory(info);
wbcFreeMemory(policy);
goto out;
}
} else {