git.samba.org
/
obnox
/
samba-ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
587ca74
)
s3: Fix crash in pam_winbind, another reference to freed memory.
author
Bo Yang
<boyang@samba.org>
Sat, 24 Oct 2009 01:20:00 +0000
(09:20 +0800)
committer
Karolin Seeger
<kseeger@samba.org>
Mon, 26 Oct 2009 07:56:44 +0000
(08:56 +0100)
Fix bug #6840.
Signed-off-by: Bo Yang <boyang@samba.org>
(cherry picked from commit
b9a3f1dd85d168c15df846dba525f4f882d1acf8
)
nsswitch/pam_winbind.c
patch
|
blob
|
history
diff --git
a/nsswitch/pam_winbind.c
b/nsswitch/pam_winbind.c
index ab22c7cbb57c3ad0dc042b2e581fdc376871ed0a..ec05f7569759bfe55ca9542fd323acdeb4c22d33 100644
(file)
--- a/
nsswitch/pam_winbind.c
+++ b/
nsswitch/pam_winbind.c
@@
-1784,7
+1784,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) {
@@
-3138,10
+3138,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 {