diff options
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/util.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/param/util.c b/source4/param/util.c index 366c3f1d78..d9d4eb5e2b 100644 --- a/source4/param/util.c +++ b/source4/param/util.c @@ -118,9 +118,14 @@ char *config_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx, } p = strrchr(config_dir, '/'); if (p == NULL) { - return NULL; + talloc_free(config_dir); + config_dir = talloc_strdup(mem_ctx, "."); + if (config_dir == NULL) { + return NULL; + } + } else { + p[0] = '\0'; } - p[0] = '\0'; fname = talloc_asprintf(mem_ctx, "%s/%s", config_dir, name); talloc_free(config_dir); return fname; |