diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-03-21 10:25:52 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-03-22 19:04:49 +0100 |
commit | 5d09acab7e5e671f244d69f59d1714a16bdb93fb (patch) | |
tree | 624a720a12e0a9c8d8124b83edace1e3ef605104 | |
parent | bd25bc133a2a6f2b4d755b6d3ea83c956a60e3af (diff) | |
download | samba-5d09acab7e5e671f244d69f59d1714a16bdb93fb.tar.gz samba-5d09acab7e5e671f244d69f59d1714a16bdb93fb.tar.bz2 samba-5d09acab7e5e671f244d69f59d1714a16bdb93fb.zip |
s4:param/loadparm.c - check for OOM
Return NULL if the loadparm context hasn't been allocated
Reviewed-by: Jelmer
-rw-r--r-- | source4/param/loadparm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 186443662a..49d2e1cf74 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -2533,6 +2533,9 @@ struct loadparm_context *loadparm_init_global(bool load_default) if (global_loadparm_context == NULL) { global_loadparm_context = loadparm_init(NULL); } + if (global_loadparm_context == NULL) { + return NULL; + } if (load_default && !global_loadparm_context->loaded) { lpcfg_load_default(global_loadparm_context); } |