summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libgpo/pygpo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c
index a54ddb98fe7..619985239cb 100644
--- a/libgpo/pygpo.c
+++ b/libgpo/pygpo.c
@@ -175,12 +175,16 @@ static int py_ads_init(ADS *self, PyObject *args, PyObject *kwds)
}
if (lp_obj) {
+ bool ok;
lp_ctx = pytalloc_get_type(lp_obj, struct loadparm_context);
if (lp_ctx == NULL) {
return -1;
}
+ ok = lp_load_initial_only(lp_ctx->szConfigFile);
+ if (!ok) {
+ return -1;
+ }
}
- if (!lp_load_initial_only(lp_ctx->szConfigFile)) return -1;
if (self->cli_creds) {
realm = cli_credentials_get_realm(self->cli_creds);