diff options
author | Tim Potter <tpot@samba.org> | 2001-05-11 07:03:13 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-05-11 07:03:13 +0000 |
commit | c61e75e3e56186c250de55c655a548de8ccb71eb (patch) | |
tree | f713f9cb61e7ab484a3bb9ef1f02cb5cd3ab2532 | |
parent | 91febc38e32bd2f519d3254503f41b1e6014776c (diff) | |
download | samba-c61e75e3e56186c250de55c655a548de8ccb71eb.tar.gz samba-c61e75e3e56186c250de55c655a548de8ccb71eb.tar.bz2 samba-c61e75e3e56186c250de55c655a548de8ccb71eb.zip |
Added talloc_strdup() funcion.
(This used to be commit eea43a5a916eb7f4bef6817ce0aa8051f9145b18)
-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); +} |