summaryrefslogtreecommitdiff
path: root/source3/smbd/filename.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/filename.c')
-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, "