Fix CID 524 - reference before allocation fail null check.
authorJeremy Allison <jra@samba.org>
Sat, 12 Jan 2008 06:47:25 +0000 (22:47 -0800)
committerJeremy Allison <jra@samba.org>
Sat, 12 Jan 2008 06:47:25 +0000 (22:47 -0800)
Jeremy.
(This used to be commit a5cd3c9b65538588a6c982c6d20022e7476cf3de)

source3/rpc_server/srv_dfs_nt.c

index 690ddd60d683c60f8e87717577c4f5afb50787aa..29538a304f63d4f4921fd3c4cec9a835cef8dc17 100644 (file)
@@ -133,10 +133,10 @@ WERROR _dfs_Remove(pipes_struct *p, struct dfs_Remove *r)
                altpath = talloc_asprintf(ctx, "%s\\%s",
                        r->in.servername,
                        r->in.sharename);
-               strlower_m(altpath);
                if (!altpath) {
                        return WERR_NOMEM;
                }
+               strlower_m(altpath);
                DEBUG(5,("init_reply_dfs_remove: Request to remove %s -> %s\\%s.\n",
                        r->in.dfs_entry_path, r->in.servername, r->in.sharename));
        }