summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/smbconf/smbconf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/smbconf/smbconf.c b/source3/lib/smbconf/smbconf.c
index 0359e000d3..9565540df4 100644
--- a/source3/lib/smbconf/smbconf.c
+++ b/source3/lib/smbconf/smbconf.c
@@ -192,7 +192,7 @@ bool smbconf_share_exists(struct smbconf_ctx *ctx,
WERROR smbconf_create_share(struct smbconf_ctx *ctx,
const char *servicename)
{
- if (smbconf_share_exists(ctx, servicename)) {
+ if ((servicename != NULL) && smbconf_share_exists(ctx, servicename)) {
return WERR_ALREADY_EXISTS;
}