From 83f9ee5860e581fda07932e0fda1326fa3bd4d4c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 13 Dec 2007 22:46:30 +0100 Subject: r26433: Don't crash when a NULL lp_ctx is specified to a lp_parm_* function. (This used to be commit 7f28b53b579182500c57c4ac0c3d7591f5ddb214) --- source4/param/loadparm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4') 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); -- cgit