s3: Fix Coverity ID 1340, NULL_RETURNS
authorVolker Lendecke <vl@samba.org>
Thu, 21 Apr 2011 20:09:27 +0000 (22:09 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 22 Apr 2011 08:06:33 +0000 (10:06 +0200)
source3/lib/smbconf/smbconf_reg.c

index adac233732206e6a9a9608cbcb8a338a4c4299e5..67df03cbd2d67ec69d193ea0924e86b1f4c378f0 100644 (file)
@@ -714,6 +714,10 @@ static WERROR smbconf_reg_drop(struct smbconf_ctx *ctx)
                goto done;
        }
        p = strrchr(path, '\\');
+       if (p == NULL) {
+               werr = WERR_INVALID_PARAM;
+               goto done;
+       }
        *p = '\0';
        werr = reg_open_path(mem_ctx, path, REG_KEY_WRITE, token,
                             &parent_key);