summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-09-08 04:57:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:34 -0500
commit5d49b172e0cb4142b30d003ce02583417ff417bd (patch)
treede237d9aa2a75c92d5452dbea5e03f0562b664d7 /source3/nsswitch
parentfc213876d50909bbd8401794822aaa8a80ec4100 (diff)
downloadsamba-5d49b172e0cb4142b30d003ce02583417ff417bd.tar.gz
samba-5d49b172e0cb4142b30d003ce02583417ff417bd.tar.bz2
samba-5d49b172e0cb4142b30d003ce02583417ff417bd.zip
r25020: Fix coverity #374, possible null deref.
Jeremy. (This used to be commit 82b3656b4b26ff63d894eed975d73ef3c8b5d2b2)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index 69d9d31103..37d29e1765 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -146,7 +146,7 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
/* See if we found a match. Check if we need to update the
SID. */
- if ( domain ) {
+ if ( domain && sid) {
if ( sid_equal( &domain->sid, &global_sid_NULL ) )
sid_copy( &domain->sid, sid );
@@ -305,10 +305,10 @@ static void trustdom_recv(void *private_data, BOOL success)
}
}
- /* use the real alt_name if we have one, else pass in NULL */
+ /* use the real alt_name if we have one, else pass in NULL */
- if ( !strequal( alt_name, "(null)" ) )
- alternate_name = alt_name;
+ if ( !strequal( alt_name, "(null)" ) )
+ alternate_name = alt_name;
/* If we have an existing domain structure, calling
add_trusted_domain() will update the SID if