Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
bool pdb_set_plaintext_pw_only(struct samu *sampass, const char *password, enum pdb_value_state flag)
{
- if (password) {
- if (sampass->plaintext_pw!=NULL)
- memset(sampass->plaintext_pw,'\0',strlen(sampass->plaintext_pw)+1);
+ BURN_STR(sampass->plaintext_pw);
+ if (password != NULL) {
sampass->plaintext_pw = talloc_strdup(sampass, password);
if (!sampass->plaintext_pw) {
}
py_plaintext_pw = PyUnicode_FromString(plaintext_pw);
+
+ BURN_STR(discard_const_p(char, plaintext_pw));
talloc_free(frame);
return py_plaintext_pw;
}