diff options
-rw-r--r-- | source3/utils/net_rpc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 844207bff2..3c722d2760 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -4074,7 +4074,11 @@ static void init_user_token(NT_USER_TOKEN *token, DOM_SID *user_sid) { token->num_sids = 4; - token->user_sids = SMB_MALLOC_ARRAY(DOM_SID, 4); + if (!(token->user_sids = SMB_MALLOC_ARRAY(DOM_SID, 4))) { + d_fprintf(stderr, "malloc failed\n"); + token->num_sids = 0; + return; + } token->user_sids[0] = *user_sid; sid_copy(&token->user_sids[1], &global_sid_World); |