diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-27 17:28:52 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-28 10:04:47 +0200 |
commit | e831af7f076fe464d8860535ecae1986299765bd (patch) | |
tree | a63016d61e13879b3294f9254e370c71da24c9b8 /source4 | |
parent | 7a3a1cb5a76aae697f7a820c4fc5305f5684487f (diff) | |
download | samba-e831af7f076fe464d8860535ecae1986299765bd.tar.gz samba-e831af7f076fe464d8860535ecae1986299765bd.tar.bz2 samba-e831af7f076fe464d8860535ecae1986299765bd.zip |
s4:param/loadparm.c - fix "asprintf" call
Diffstat (limited to 'source4')
-rw-r--r-- | source4/param/loadparm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 1264106a60..8c0f7d4d24 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -771,8 +771,8 @@ const char *lp_get_parametric(struct loadparm_context *lp_ctx, struct loadparm_service *service, const char *type, const char *option) { - char *vfskey; - struct parmlist_entry *data; + char *vfskey = NULL; + struct parmlist_entry *data; if (lp_ctx == NULL) return NULL; @@ -780,6 +780,7 @@ const char *lp_get_parametric(struct loadparm_context *lp_ctx, data = (service == NULL ? lp_ctx->globals->param_opt : service->param_opt); asprintf(&vfskey, "%s:%s", type, option); + if (vfskey == NULL) return NULL; strlower(vfskey); while (data) { |