summaryrefslogtreecommitdiff
path: root/libgpo/pygpo.c
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2017-11-22 10:57:18 +1300
committerJeremy Allison <jra@samba.org>2017-12-15 21:43:18 +0100
commita194fb3821ab72b3d5fa9d9047cccd8fa415c4a5 (patch)
tree4d5e0fe22716efd404eda5b8e282efa2c91f635b /libgpo/pygpo.c
parent964bc8d19aa695f6c5188ab1a941127a259c0bc8 (diff)
downloadsamba-a194fb3821ab72b3d5fa9d9047cccd8fa415c4a5.tar.gz
libgpo: Always check for ldap_server argument
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'libgpo/pygpo.c')
-rw-r--r--libgpo/pygpo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c
index d7bb17382b2..fba0e342c7f 100644
--- a/libgpo/pygpo.c
+++ b/libgpo/pygpo.c
@@ -192,9 +192,11 @@ static int py_ads_init(ADS *self, PyObject *args, PyObject *kwds)
} else {
realm = lp_realm();
workgroup = lp_workgroup();
- if (!ldap_server) return -1;
}
+ if (ldap_server == NULL) {
+ return -1;
+ }
if ( !(self->ads_ptr = ads_init(realm, workgroup, ldap_server)) )
return -1;