summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-09-10 23:33:18 -0700
committerJeremy Allison <jra@samba.org>2010-09-10 23:33:18 -0700
commita89b0ef53b990721d6e897b938bed75577b623d9 (patch)
treec4b331f3dea373e45aea8cd28991f36b9cda2b08
parent1787c1dfc3a506c0afee6d2bb67ba8789c709b86 (diff)
downloadsamba-a89b0ef53b990721d6e897b938bed75577b623d9.tar.gz
samba-a89b0ef53b990721d6e897b938bed75577b623d9.tar.bz2
samba-a89b0ef53b990721d6e897b938bed75577b623d9.zip
Add check missing from previous patch after talloc_strdup().
Jeremy.
-rw-r--r--source3/smbd/filename.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 49171732a9..7bc8607400 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -170,6 +170,9 @@ static NTSTATUS check_parent_exists(TALLOC_CTX *ctx,
/* Update dirpath. */
TALLOC_FREE(*pp_dirpath);
*pp_dirpath = talloc_strdup(ctx, parent_fname.base_name);
+ if (!*pp_dirpath) {
+ return NT_STATUS_NO_MEMORY;
+ }
DEBUG(5,("check_parent_exists: name "
"= %s, dirpath = %s, "