diff options
author | Derrell Lipman <derrell.lipman@unwireduniverse.com> | 2008-03-06 09:00:37 -0500 |
---|---|---|
committer | Derrell Lipman <derrell.lipman@unwireduniverse.com> | 2008-03-06 09:00:37 -0500 |
commit | 5b80b9340fb64413f68d625cf5ca57344c0adbd7 (patch) | |
tree | 692ff8696df42c8a6b9839cffbaf861459016aef /source3 | |
parent | a521f39c89e933aa11838e1189274c43c57ecfd6 (diff) | |
download | samba-5b80b9340fb64413f68d625cf5ca57344c0adbd7.tar.gz samba-5b80b9340fb64413f68d625cf5ca57344c0adbd7.tar.bz2 samba-5b80b9340fb64413f68d625cf5ca57344c0adbd7.zip |
Check for NULL pointers before dereferencing them.
(This used to be commit 6f65390cec218a6aac4370ee381f30439617dcec)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/libsmb_server.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c index 64eb1ea584..37612c6e39 100644 --- a/source3/libsmb/libsmb_server.c +++ b/source3/libsmb/libsmb_server.c @@ -144,6 +144,10 @@ SMBC_find_server(TALLOC_CTX *ctx, SMBCSRV *srv; int auth_called = 0; + if (!pp_workgroup || !pp_username || !pp_password) { + return NULL; + } + check_server_cache: srv = smbc_getFunctionGetCachedServer(context)(context, @@ -156,10 +160,6 @@ check_server_cache: SMBC_call_auth_fn(ctx, context, server, share, pp_workgroup, pp_username, pp_password); - if (!pp_workgroup || !pp_username || !pp_password) { - return NULL; - } - /* * However, smbc_auth_fn may have picked up info relating to * an existing connection, so try for an existing connection |