diff options
Diffstat (limited to 'source/nsswitch/pam_winbind.c')
-rw-r--r-- | source/nsswitch/pam_winbind.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/nsswitch/pam_winbind.c b/source/nsswitch/pam_winbind.c index 3d0c5ef90e5..74540817af0 100644 --- a/source/nsswitch/pam_winbind.c +++ b/source/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 { |