summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-13 22:46:30 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:50:03 +0100
commit83f9ee5860e581fda07932e0fda1326fa3bd4d4c (patch)
treeec3ee317c4de7f8847d2974e3cb337726caabfd1 /source4
parentd1e716cf4331bf09cfe15a6634bc5887aff81d20 (diff)
downloadsamba-83f9ee5860e581fda07932e0fda1326fa3bd4d4c.tar.gz
samba-83f9ee5860e581fda07932e0fda1326fa3bd4d4c.tar.bz2
samba-83f9ee5860e581fda07932e0fda1326fa3bd4d4c.zip
r26433: Don't crash when a NULL lp_ctx is specified to a lp_parm_* function.
(This used to be commit 7f28b53b579182500c57c4ac0c3d7591f5ddb214)
Diffstat (limited to 'source4')
-rw-r--r--source4/param/loadparm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index af3986c885..2b1937de05 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -764,6 +764,9 @@ const char *lp_get_parametric(struct loadparm_context *lp_ctx,
{
char *vfskey;
struct param_opt *data;
+
+ if (lp_ctx == NULL)
+ return NULL;
data = (service == NULL ? lp_ctx->globals->param_opt : service->param_opt);