summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/srv_samr_nt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 693ef95df9..e4289dd457 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -79,8 +79,8 @@ static void samr_clear_sam_passwd(SAM_ACCOUNT *sam_pass)
if (!sam_pass)
return;
- memset(sam_pass->lm_pw, '\0', 16);
- memset(sam_pass->nt_pw, '\0', 16);
+ if (sam_pass->lm_pw) memset(sam_pass->lm_pw, '\0', 16);
+ if (sam_pass->nt_pw) memset(sam_pass->nt_pw, '\0', 16);
}
/*******************************************************************