Prevent another segfault.
authorMichael Adam <obnox@samba.org>
Tue, 18 Dec 2007 00:30:52 +0000 (01:30 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 18 Dec 2007 00:30:52 +0000 (01:30 +0100)
Michael
(This used to be commit 0a9874c1c76c0ccc71caba7ee85a0ee1a91808c5)

source3/passdb/passdb.c

index 9311b8a74e6a4663e7cf1926ef9d0cb393af68af..4228f6c32fbd37efbc59872b12870686453fb258 100644 (file)
@@ -1552,7 +1552,9 @@ bool get_trust_pw_clear(const char *domain, char **ret_pwd,
                        return false;
                }
 
-               *channel = SEC_CHAN_DOMAIN;
+               if (channel != NULL) {
+                       *channel = SEC_CHAN_DOMAIN;
+               }
 
                if (account_name != NULL) {
                        *account_name = lp_workgroup();