diff options
author | Volker Lendecke <vl@samba.org> | 2008-12-24 13:18:35 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-12-31 19:33:24 +0100 |
commit | 8a507b1e7fa179c16c2dd6ddc2bdd345d00545f4 (patch) | |
tree | 3426022c36f5a363c457ba5f335571958cda6a59 | |
parent | add3d572d05951f6f5ac89044d449c4dbdc03308 (diff) | |
download | samba-8a507b1e7fa179c16c2dd6ddc2bdd345d00545f4.tar.gz samba-8a507b1e7fa179c16c2dd6ddc2bdd345d00545f4.tar.bz2 samba-8a507b1e7fa179c16c2dd6ddc2bdd345d00545f4.zip |
Make use of TALLOC_MEMDUP in parent_dirname_talloc()
-rw-r--r-- | source3/lib/util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 7053fdc266..82c4822a86 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -2367,10 +2367,9 @@ bool parent_dirname_talloc(TALLOC_CTX *mem_ctx, const char *dir, len = p-dir; - if (!(*parent = TALLOC_ARRAY(mem_ctx, char, len+1))) { + if (!(*parent = (char *)TALLOC_MEMDUP(mem_ctx, dir, len+1))) { return False; } - memcpy(*parent, dir, len); (*parent)[len] = '\0'; if (name) { |