summaryrefslogtreecommitdiff
path: root/source4/param/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/param/util.c')
-rw-r--r--source4/param/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/param/util.c b/source4/param/util.c
index 4d4e562590..1cf05d4fa7 100644
--- a/source4/param/util.c
+++ b/source4/param/util.c
@@ -106,6 +106,9 @@ _PUBLIC_ char *config_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx,
{
char *fname, *config_dir, *p;
config_dir = talloc_strdup(mem_ctx, lp_configfile(lp_ctx));
+ if (config_dir == NULL) {
+ return NULL;
+ }
p = strrchr(config_dir, '/');
if (p == NULL) {
return NULL;