diff options
author | Jeremy Allison <jra@samba.org> | 2010-09-10 23:33:18 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-09-10 23:33:18 -0700 |
commit | a89b0ef53b990721d6e897b938bed75577b623d9 (patch) | |
tree | c4b331f3dea373e45aea8cd28991f36b9cda2b08 | |
parent | 1787c1dfc3a506c0afee6d2bb67ba8789c709b86 (diff) | |
download | samba-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.c | 3 |
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, " |