From c61e75e3e56186c250de55c655a548de8ccb71eb Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 11 May 2001 07:03:13 +0000 Subject: Added talloc_strdup() funcion. (This used to be commit eea43a5a916eb7f4bef6817ce0aa8051f9145b18) --- source3/lib/talloc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index 860fc67bcb..4c263ec4d6 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -158,3 +158,9 @@ void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size) return newp; } + +/* strdup with a talloc */ +char *talloc_strdup(TALLOC_CTX *t, char *p) +{ + return talloc_memdup(t, p, strlen(p) + 1); +} -- cgit