summaryrefslogtreecommitdiffstats
path: root/source/lib/talloc.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-05-11 07:03:13 +0000
committerTim Potter <tpot@samba.org>2001-05-11 07:03:13 +0000
commiteea43a5a916eb7f4bef6817ce0aa8051f9145b18 (patch)
tree3a8eef225988df1e2805c74d7dcb13a7e177eb2b /source/lib/talloc.c
parentfa6a5bf94a3716c0554e2bcbe0eb4b0912f15604 (diff)
downloadsamba-eea43a5a916eb7f4bef6817ce0aa8051f9145b18.tar.gz
samba-eea43a5a916eb7f4bef6817ce0aa8051f9145b18.tar.xz
samba-eea43a5a916eb7f4bef6817ce0aa8051f9145b18.zip
Added talloc_strdup() funcion.
Diffstat (limited to 'source/lib/talloc.c')
-rw-r--r--source/lib/talloc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/lib/talloc.c b/source/lib/talloc.c
index 860fc67bcbb..4c263ec4d61 100644
--- a/source/lib/talloc.c
+++ b/source/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);
+}