mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
lib/util: remove data_blob_talloc_reference()
We want to avoid the usage of talloc_reference() in Samba. metze
This commit is contained in:
parent
1c76df6219
commit
ad6ea7b189
@ -67,23 +67,6 @@ _PUBLIC_ DATA_BLOB data_blob_talloc_named(TALLOC_CTX *mem_ctx, const void *p, si
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
reference a data blob, to the supplied TALLOC_CTX.
|
||||
Returns a NULL DATA_BLOB on failure
|
||||
**/
|
||||
_PUBLIC_ DATA_BLOB data_blob_talloc_reference(TALLOC_CTX *mem_ctx, DATA_BLOB *blob)
|
||||
{
|
||||
DATA_BLOB ret = *blob;
|
||||
|
||||
ret.data = talloc_reference(mem_ctx, blob->data);
|
||||
|
||||
if (!ret.data) {
|
||||
return data_blob(NULL, 0);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
construct a zero data blob, using supplied TALLOC_CTX.
|
||||
use this sparingly as it initialises data - better to initialise
|
||||
|
@ -60,12 +60,6 @@ _PUBLIC_ DATA_BLOB data_blob_named(const void *p, size_t length, const char *nam
|
||||
**/
|
||||
_PUBLIC_ DATA_BLOB data_blob_talloc_named(TALLOC_CTX *mem_ctx, const void *p, size_t length, const char *name);
|
||||
|
||||
/**
|
||||
reference a data blob, to the supplied TALLOC_CTX.
|
||||
Returns a NULL DATA_BLOB on failure
|
||||
**/
|
||||
_PUBLIC_ DATA_BLOB data_blob_talloc_reference(TALLOC_CTX *mem_ctx, DATA_BLOB *blob);
|
||||
|
||||
/**
|
||||
construct a zero data blob, using supplied TALLOC_CTX.
|
||||
use this sparingly as it initialises data - better to initialise
|
||||
|
Loading…
Reference in New Issue
Block a user