diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-07-09 08:00:50 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:23:53 -0500 |
commit | 161ebbc17a8607dca665367334ef7af6ecf07418 (patch) | |
tree | 25a91b4a4f6b8644427da50cd2aaa3f51cb6f12d | |
parent | 1a7eb52aeeee94e2e91fae69a003ce1b23e4eecd (diff) | |
download | samba-161ebbc17a8607dca665367334ef7af6ecf07418.tar.gz samba-161ebbc17a8607dca665367334ef7af6ecf07418.tar.bz2 samba-161ebbc17a8607dca665367334ef7af6ecf07418.zip |
r23757: Fix Coverity id 386
(This used to be commit 91be38f7ab42991e04a41e91132137a834c10996)
-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); |