diff options
-rw-r--r-- | source3/lib/talloc.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); +} |