diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-03-10 09:07:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:15:13 -0500 |
commit | 2a7601fcb455ab626f6a5f21dfc67637181e13f1 (patch) | |
tree | af8eb10934cf1182d32d25f717775b7efd752df9 /source3/rpc_parse | |
parent | 4d0795a21b6d097b5378b5b723f7eb06181d7962 (diff) | |
download | samba-2a7601fcb455ab626f6a5f21dfc67637181e13f1.tar.gz samba-2a7601fcb455ab626f6a5f21dfc67637181e13f1.tar.bz2 samba-2a7601fcb455ab626f6a5f21dfc67637181e13f1.zip |
r14134: Fix Coverity bug # 137
(This used to be commit 62e58d939bf3abf71bb19aade57d406e07403bc8)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_lsa.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index d4dd251fc5..d285f5d36b 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -567,10 +567,16 @@ void init_r_enum_trust_dom(TALLOC_CTX *ctx, LSA_R_ENUM_TRUST_DOM *out, /* allocate container memory */ out->domlist = TALLOC_P( ctx, DOMAIN_LIST ); + + if ( !out->domlist ) { + out->status = NT_STATUS_NO_MEMORY; + return; + } + out->domlist->domains = TALLOC_ARRAY( ctx, DOMAIN_INFO, out->count ); - if ( !out->domlist || !out->domlist->domains ) { + if ( !out->domlist->domains ) { out->status = NT_STATUS_NO_MEMORY; return; } |