From a89b0ef53b990721d6e897b938bed75577b623d9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 10 Sep 2010 23:33:18 -0700 Subject: [PATCH] Add check missing from previous patch after talloc_strdup(). Jeremy. --- source3/smbd/filename.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 49171732a9d..7bc86074008 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, "