diff options
author | todd stecher <todd.stecher@gmail.com> | 2009-01-22 10:17:37 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-01-23 09:07:38 +0100 |
commit | 6b93dd04ee4dff93be3d66d7ab223e8b81e77d93 (patch) | |
tree | f50ca2b7161905538019f3afca714b7c3ecb805f /source/winbindd/winbindd_util.c | |
parent | 5739cc5eb4d222b435a3cc32c1733288bf3d5635 (diff) | |
download | samba-6b93dd04ee4dff93be3d66d7ab223e8b81e77d93.tar.gz samba-6b93dd04ee4dff93be3d66d7ab223e8b81e77d93.tar.xz samba-6b93dd04ee4dff93be3d66d7ab223e8b81e77d93.zip |
Memory leaks and other fixes found by Coverity
(cherry picked from commit ba576efa8f884f3dd37bb5035fbb47ae0305c0b0)
Diffstat (limited to 'source/winbindd/winbindd_util.c')
-rw-r--r-- | source/winbindd/winbindd_util.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/winbindd/winbindd_util.c b/source/winbindd/winbindd_util.c index 748099a32e5..2d87015fec0 100644 --- a/source/winbindd/winbindd_util.c +++ b/source/winbindd/winbindd_util.c @@ -682,8 +682,16 @@ static void init_child_recv(void *private_data, bool success) state->response->data.domain_info.name); fstrcpy(state->domain->alt_name, state->response->data.domain_info.alt_name); - string_to_sid(&state->domain->sid, - state->response->data.domain_info.sid); + if (!string_to_sid(&state->domain->sid, + state->response->data.domain_info.sid)) { + DEBUG(1,("init_child_recv: Could not convert sid %s " + "from string\n", + state->response->data.domain_info.sid)); + state->continuation(state->private_data, False); + talloc_destroy(state->mem_ctx); + return; + } + state->domain->native_mode = state->response->data.domain_info.native_mode; state->domain->active_directory = |