summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/substitute.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index 85c06e9374..6ecc3fc635 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -483,6 +483,9 @@ static const char *automount_server(const char *user_name)
return "";
}
srv = talloc_strdup(ctx, automount_value);
+ if (!srv) {
+ return "";
+ }
p = strchr_m(srv, ':');
if (!p) {
return "";
@@ -494,9 +497,6 @@ static const char *automount_server(const char *user_name)
}
#endif
- if (!server_name) {
- server_name = "";
- }
DEBUG(4,("Home server: %s\n", server_name));
return server_name;
}