Ensure the potentially null winbind context is not dereferenced on
cleanup.
https://bugzilla.samba.org/show_bug.cgi?id=8564
Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Oct 26 22:40:57 CEST 2012 on sn-devel-104
_pam_free_data_info3(pamh);
}
- _PAM_LOG_FUNCTION_LEAVE("pam_sm_authenticate", ctx, retval);
-
- TALLOC_FREE(ctx);
+ if (ctx != NULL) {
+ _PAM_LOG_FUNCTION_LEAVE("pam_sm_authenticate", ctx, retval);
+ TALLOC_FREE(ctx);
+ }
return retval;
}