From 5d49b172e0cb4142b30d003ce02583417ff417bd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 8 Sep 2007 04:57:17 +0000 Subject: r25020: Fix coverity #374, possible null deref. Jeremy. (This used to be commit 82b3656b4b26ff63d894eed975d73ef3c8b5d2b2) --- source3/nsswitch/winbindd_util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/nsswitch') 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 -- cgit