r26433: Don't crash when a NULL lp_ctx is specified to a lp_parm_* function.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 13 Dec 2007 21:46:30 +0000 (22:46 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:50:03 +0000 (05:50 +0100)
source/param/loadparm.c

index af3986c885ae05f75fd709115f5c7e8cb8d28656..2b1937de05b0f39ebdab55dadcdce17927720f41 100644 (file)
@@ -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);