From 7e7ad53cbd77ce2201fd46bd2c08a601725f9f5b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 21 Apr 2011 22:09:27 +0200 Subject: s3: Fix Coverity ID 1340, NULL_RETURNS --- source3/lib/smbconf/smbconf_reg.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib') 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); -- cgit