summaryrefslogtreecommitdiff
path: root/source3/lib/smbconf
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-04-21 22:09:27 +0200
committerVolker Lendecke <vl@samba.org>2011-04-22 10:06:33 +0200
commit7e7ad53cbd77ce2201fd46bd2c08a601725f9f5b (patch)
tree75f330904cd9b03eb54a75513e41e38834f1cd45 /source3/lib/smbconf
parente919e767fb846fc91160cf44cbc838a9b4f2a832 (diff)
downloadsamba-7e7ad53cbd77ce2201fd46bd2c08a601725f9f5b.tar.gz
samba-7e7ad53cbd77ce2201fd46bd2c08a601725f9f5b.tar.bz2
samba-7e7ad53cbd77ce2201fd46bd2c08a601725f9f5b.zip
s3: Fix Coverity ID 1340, NULL_RETURNS
Diffstat (limited to 'source3/lib/smbconf')
-rw-r--r--source3/lib/smbconf/smbconf_reg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c
index adac233732..67df03cbd2 100644
--- a/source3/lib/smbconf/smbconf_reg.c
+++ b/source3/lib/smbconf/smbconf_reg.c
@@ -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);