Found by Covscan.
"Error: USE_AFTER_FREE (CWE-416):
samba-4.20.0rc2/nsswitch/krb5_plugin/winbind_krb5_localauth.c:122: freed_arg: ""wbcFreeMemory"" frees ""pwd"".
samba-4.20.0rc2/nsswitch/krb5_plugin/winbind_krb5_localauth.c:144: pass_freed_arg: Passing freed pointer ""pwd"" as an argument to ""wbcFreeMemory"".
142| break;
143| }
144|-> wbcFreeMemory(pwd);
145| if (code != 0) {
146| goto out;"
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
break;
}
wbcFreeMemory(pwd);
+ pwd = NULL;
if (code != 0) {
goto out;
}