1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

libgpo: Fix CID 1422262 Explicit null dereferenced

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2017-11-21 20:30:08 +01:00 committed by Jeremy Allison
parent 33f88abe6b
commit 4806f0505e

View File

@ -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);