From 7ca6192c1ac6b59d295be825dea969bae36659ec Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 21 Mar 2008 11:41:15 +0100 Subject: Fix Coverity ID 538 (This used to be commit d69b8b19aeac2266fb5e5ee280ffffe48a690099) --- source3/lib/substitute.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c index ce97a36188..85c06e9374 100644 --- a/source3/lib/substitute.c +++ b/source3/lib/substitute.c @@ -433,6 +433,9 @@ static const char *automount_path(const char *user_name) (home_path_start+1):"")); server_path = talloc_strdup(ctx, home_path_start+1); + if (!server_path) { + server_path = ""; + } } } else { /* NIS key lookup failed: default to @@ -443,9 +446,6 @@ static const char *automount_path(const char *user_name) } #endif - if (!server_path) { - server_path = ""; - } DEBUG(4,("Home server path: %s\n", server_path)); return server_path; } -- cgit