mirror of
https://github.com/samba-team/samba.git
synced 2025-12-10 04:23:50 +03:00
Move to talloc control of SPOOL_XXX structs. Move to talloc control of
security descriptors and pointers. Syncup with 2.2 tree. Jeremy.
This commit is contained in:
@@ -139,3 +139,16 @@ void *talloc_zero(TALLOC_CTX *t, size_t size)
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
/* memdup with a talloc. */
|
||||
void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size)
|
||||
{
|
||||
void *newp = talloc(t,size);
|
||||
|
||||
if (!newp)
|
||||
return 0;
|
||||
|
||||
memcpy(newp, p, size);
|
||||
|
||||
return newp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user