From: Michael Adam Date: Tue, 15 Apr 2008 15:37:39 +0000 (+0200) Subject: libsmbconf: don't complain with WERR_ALREADY_EXISTS for NULL share in smbconf_create_... X-Git-Tag: samba-3.3.0pre1~2644 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aa167de8252bb615bd21fb3fd9468383b8357d32;p=thirdparty%2Fsamba.git libsmbconf: don't complain with WERR_ALREADY_EXISTS for NULL share in smbconf_create_share(). These are values stored inside the base key for registry. This is not getting deleted. Michael --- diff --git a/source/lib/smbconf/smbconf.c b/source/lib/smbconf/smbconf.c index 0359e000d38..9565540df4f 100644 --- a/source/lib/smbconf/smbconf.c +++ b/source/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; }