mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
Merge data_blob_talloc_zero() from samba4.
Guenther (This used to be commit 9fca3ca37eaf10c24f852e854dd28b7155c3e536)
This commit is contained in:
parent
85e3c091d4
commit
0622fd72a3
@ -144,3 +144,15 @@ DATA_BLOB data_blob_const(const void *p, size_t length)
|
||||
blob.free = NULL;
|
||||
return blob;
|
||||
}
|
||||
|
||||
/**
|
||||
construct a zero data blob, using supplied TALLOC_CTX.
|
||||
use this sparingly as it initialises data - better to initialise
|
||||
yourself if you want specific data in the blob
|
||||
**/
|
||||
DATA_BLOB data_blob_talloc_zero(TALLOC_CTX *mem_ctx, size_t length)
|
||||
{
|
||||
DATA_BLOB blob = data_blob_talloc(mem_ctx, NULL, length);
|
||||
data_blob_clear(&blob);
|
||||
return blob;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user