diff options
author | Volker Lendecke <vl@samba.org> | 2017-11-21 20:30:08 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-11-21 22:04:13 +0100 |
commit | 4806f0505e3ab6cd1aedd0e79c81e3a87afb9b18 (patch) | |
tree | 1ad4051cfb9293407bb44ff54cd74c0b033aad0c /libgpo | |
parent | 33f88abe6b14cf86360efd98ab4b66520244c2a7 (diff) | |
download | samba-4806f0505e3ab6cd1aedd0e79c81e3a87afb9b18.tar.gz |
libgpo: Fix CID 1422262 Explicit null dereferenced
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'libgpo')
-rw-r--r-- | libgpo/pygpo.c | 6 |
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); |