]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix Coverity ID 538
authorVolker Lendecke <vl@samba.org>
Fri, 21 Mar 2008 10:41:15 +0000 (11:41 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 21 Mar 2008 10:41:15 +0000 (11:41 +0100)
source/lib/substitute.c

index ce97a36188766b027f4a21d1e8572c55c47afaf9..85c06e93741bc9dac85cf859c6d149cc37c8b9b5 100644 (file)
@@ -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;
 }