Added talloc_strdup() funcion.
authorTim Potter <tpot@samba.org>
Fri, 11 May 2001 07:03:13 +0000 (07:03 +0000)
committerTim Potter <tpot@samba.org>
Fri, 11 May 2001 07:03:13 +0000 (07:03 +0000)
(This used to be commit eea43a5a916eb7f4bef6817ce0aa8051f9145b18)

source3/lib/talloc.c

index 860fc67bcbb4f1f957f60e6ba928c012b4e9ab28..4c263ec4d6189f1d733f81c3f82d16c121aa53b5 100644 (file)
@@ -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);
+}