summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-27 07:08:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:15 -0500
commit759da3b915e2006d4c87b5ace47f399accd9ce91 (patch)
tree6bcaf9d4c0e38ef5e975c041d442c4437aa61e5a /source4/libcli
parent1e42cacf6a8643bd633f631c212d71760852abbc (diff)
downloadsamba-759da3b915e2006d4c87b5ace47f399accd9ce91.tar.gz
samba-759da3b915e2006d4c87b5ace47f399accd9ce91.tar.bz2
samba-759da3b915e2006d4c87b5ace47f399accd9ce91.zip
r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/auth/clikrb5.c2
-rw-r--r--source4/libcli/auth/gensec.c6
-rw-r--r--source4/libcli/auth/gensec_gssapi.c2
-rw-r--r--source4/libcli/auth/gensec_krb5.c2
-rw-r--r--source4/libcli/auth/gensec_ntlmssp.c2
-rw-r--r--source4/libcli/auth/ntlmssp.c4
-rw-r--r--source4/libcli/auth/ntlmssp_parse.c4
-rw-r--r--source4/libcli/auth/schannel.c2
-rw-r--r--source4/libcli/auth/spnego.c4
-rw-r--r--source4/libcli/auth/spnego_parse.c2
-rw-r--r--source4/libcli/cliconnect.c2
-rw-r--r--source4/libcli/clifile.c8
-rw-r--r--source4/libcli/clilist.c10
-rw-r--r--source4/libcli/clitrans2.c14
-rw-r--r--source4/libcli/ldap/ldap.c14
-rw-r--r--source4/libcli/ldap/ldap_client.c6
-rw-r--r--source4/libcli/ldap/ldap_ldif.c8
-rw-r--r--source4/libcli/raw/rawacl.c2
-rw-r--r--source4/libcli/raw/raweas.c6
-rw-r--r--source4/libcli/raw/rawfile.c4
-rw-r--r--source4/libcli/raw/rawfileinfo.c10
-rw-r--r--source4/libcli/raw/rawrequest.c2
-rw-r--r--source4/libcli/raw/rawsetfileinfo.c8
-rw-r--r--source4/libcli/security/dom_sid.c12
-rw-r--r--source4/libcli/security/security_descriptor.c8
-rw-r--r--source4/libcli/security/security_token.c6
-rw-r--r--source4/libcli/util/asn1.c4
-rw-r--r--source4/libcli/util/clilsa.c4
-rw-r--r--source4/libcli/util/smbencrypt.c2
29 files changed, 80 insertions, 80 deletions
diff --git a/source4/libcli/auth/clikrb5.c b/source4/libcli/auth/clikrb5.c
index 122f9510e7..051798c9f1 100644
--- a/source4/libcli/auth/clikrb5.c
+++ b/source4/libcli/auth/clikrb5.c
@@ -321,7 +321,7 @@ static BOOL ads_cleanup_expired_creds(krb5_context context,
krb5_cc_default_name(context),
http_timestring(mem_ctx, credsp->times.endtime)));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
/* we will probably need new tickets if the current ones
will expire within 10 seconds.
diff --git a/source4/libcli/auth/gensec.c b/source4/libcli/auth/gensec.c
index fb638a9000..e9dea6be33 100644
--- a/source4/libcli/auth/gensec.c
+++ b/source4/libcli/auth/gensec.c
@@ -94,7 +94,7 @@ const char **gensec_security_oids(TALLOC_CTX *mem_ctx, const char *skip)
if (!ops) {
return NULL;
}
- oid_list = talloc_array_p(mem_ctx, const char *, num_backends + 1);
+ oid_list = talloc_array(mem_ctx, const char *, num_backends + 1);
if (!oid_list) {
return NULL;
}
@@ -123,7 +123,7 @@ const char **gensec_security_oids(TALLOC_CTX *mem_ctx, const char *skip)
*/
static NTSTATUS gensec_start(TALLOC_CTX *mem_ctx, struct gensec_security **gensec_security)
{
- (*gensec_security) = talloc_p(mem_ctx, struct gensec_security);
+ (*gensec_security) = talloc(mem_ctx, struct gensec_security);
if (!(*gensec_security)) {
return NT_STATUS_NO_MEMORY;
}
@@ -155,7 +155,7 @@ NTSTATUS gensec_subcontext_start(TALLOC_CTX *mem_ctx,
struct gensec_security *parent,
struct gensec_security **gensec_security)
{
- (*gensec_security) = talloc_p(mem_ctx, struct gensec_security);
+ (*gensec_security) = talloc(mem_ctx, struct gensec_security);
if (!(*gensec_security)) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/auth/gensec_gssapi.c b/source4/libcli/auth/gensec_gssapi.c
index 80a17c1b6b..43113412f7 100644
--- a/source4/libcli/auth/gensec_gssapi.c
+++ b/source4/libcli/auth/gensec_gssapi.c
@@ -62,7 +62,7 @@ static NTSTATUS gensec_gssapi_start(struct gensec_security *gensec_security)
{
struct gensec_gssapi_state *gensec_gssapi_state;
- gensec_gssapi_state = talloc_p(gensec_security, struct gensec_gssapi_state);
+ gensec_gssapi_state = talloc(gensec_security, struct gensec_gssapi_state);
if (!gensec_gssapi_state) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/auth/gensec_krb5.c b/source4/libcli/auth/gensec_krb5.c
index aaf892e1e6..e5bfd3865a 100644
--- a/source4/libcli/auth/gensec_krb5.c
+++ b/source4/libcli/auth/gensec_krb5.c
@@ -258,7 +258,7 @@ static NTSTATUS gensec_krb5_start(struct gensec_security *gensec_security)
struct gensec_krb5_state *gensec_krb5_state;
krb5_error_code ret = 0;
- gensec_krb5_state = talloc_p(gensec_security, struct gensec_krb5_state);
+ gensec_krb5_state = talloc(gensec_security, struct gensec_krb5_state);
if (!gensec_krb5_state) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/auth/gensec_ntlmssp.c b/source4/libcli/auth/gensec_ntlmssp.c
index ae97803ef7..59bab6ced2 100644
--- a/source4/libcli/auth/gensec_ntlmssp.c
+++ b/source4/libcli/auth/gensec_ntlmssp.c
@@ -143,7 +143,7 @@ static NTSTATUS gensec_ntlmssp_start(struct gensec_security *gensec_security)
{
struct gensec_ntlmssp_state *gensec_ntlmssp_state;
- gensec_ntlmssp_state = talloc_p(gensec_security, struct gensec_ntlmssp_state);
+ gensec_ntlmssp_state = talloc(gensec_security, struct gensec_ntlmssp_state);
if (!gensec_ntlmssp_state) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/auth/ntlmssp.c b/source4/libcli/auth/ntlmssp.c
index a9fb66d41e..d5ddcfbfb6 100644
--- a/source4/libcli/auth/ntlmssp.c
+++ b/source4/libcli/auth/ntlmssp.c
@@ -909,7 +909,7 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
NTSTATUS ntlmssp_server_start(TALLOC_CTX *mem_ctx, struct ntlmssp_state **ntlmssp_state)
{
- *ntlmssp_state = talloc_p(mem_ctx, struct ntlmssp_state);
+ *ntlmssp_state = talloc(mem_ctx, struct ntlmssp_state);
if (!*ntlmssp_state) {
DEBUG(0,("ntlmssp_server_start: talloc failed!\n"));
return NT_STATUS_NO_MEMORY;
@@ -1269,7 +1269,7 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state,
NTSTATUS ntlmssp_client_start(TALLOC_CTX *mem_ctx, struct ntlmssp_state **ntlmssp_state)
{
- *ntlmssp_state = talloc_p(mem_ctx, struct ntlmssp_state);
+ *ntlmssp_state = talloc(mem_ctx, struct ntlmssp_state);
if (!*ntlmssp_state) {
DEBUG(0,("ntlmssp_client_start: talloc failed!\n"));
return NT_STATUS_NO_MEMORY;
diff --git a/source4/libcli/auth/ntlmssp_parse.c b/source4/libcli/auth/ntlmssp_parse.c
index a713b9896d..543f3d9b61 100644
--- a/source4/libcli/auth/ntlmssp_parse.c
+++ b/source4/libcli/auth/ntlmssp_parse.c
@@ -54,8 +54,8 @@ BOOL msrpc_gen(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
DATA_BLOB *pointers;
- pointers = talloc_array_p(mem_ctx, DATA_BLOB, strlen(format));
- intargs = talloc_array_p(pointers, int, strlen(format));
+ pointers = talloc_array(mem_ctx, DATA_BLOB, strlen(format));
+ intargs = talloc_array(pointers, int, strlen(format));
/* first scan the format to work out the header and body size */
va_start(ap, format);
diff --git a/source4/libcli/auth/schannel.c b/source4/libcli/auth/schannel.c
index 51b8690c97..92442234bd 100644
--- a/source4/libcli/auth/schannel.c
+++ b/source4/libcli/auth/schannel.c
@@ -289,7 +289,7 @@ NTSTATUS schannel_start(struct schannel_state **state,
const uint8_t session_key[16],
BOOL initiator)
{
- (*state) = talloc_p(NULL, struct schannel_state);
+ (*state) = talloc(NULL, struct schannel_state);
if (!(*state)) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/auth/spnego.c b/source4/libcli/auth/spnego.c
index 1e92a7d16e..a61680c9d4 100644
--- a/source4/libcli/auth/spnego.c
+++ b/source4/libcli/auth/spnego.c
@@ -50,7 +50,7 @@ static NTSTATUS gensec_spnego_client_start(struct gensec_security *gensec_securi
{
struct spnego_state *spnego_state;
- spnego_state = talloc_p(gensec_security, struct spnego_state);
+ spnego_state = talloc(gensec_security, struct spnego_state);
if (!spnego_state) {
return NT_STATUS_NO_MEMORY;
}
@@ -68,7 +68,7 @@ static NTSTATUS gensec_spnego_server_start(struct gensec_security *gensec_securi
{
struct spnego_state *spnego_state;
- spnego_state = talloc_p(gensec_security, struct spnego_state);
+ spnego_state = talloc(gensec_security, struct spnego_state);
if (!spnego_state) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/auth/spnego_parse.c b/source4/libcli/auth/spnego_parse.c
index 78a94a6a44..e48c32f0da 100644
--- a/source4/libcli/auth/spnego_parse.c
+++ b/source4/libcli/auth/spnego_parse.c
@@ -49,7 +49,7 @@ static BOOL read_negTokenInit(struct asn1_data *asn1, struct spnego_negTokenInit
asn1_start_tag(asn1, ASN1_CONTEXT(0));
asn1_start_tag(asn1, ASN1_SEQUENCE(0));
- token->mechTypes = talloc_p(NULL, const char *);
+ token->mechTypes = talloc(NULL, const char *);
for (i = 0; !asn1->has_error &&
0 < asn1_tag_remaining(asn1); i++) {
token->mechTypes = talloc_realloc(NULL,
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index 354840b84c..263527ffc0 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -211,7 +211,7 @@ struct smbcli_state *smbcli_state_init(TALLOC_CTX *mem_ctx)
{
struct smbcli_state *cli;
- cli = talloc_zero_p(mem_ctx, struct smbcli_state);
+ cli = talloc_zero(mem_ctx, struct smbcli_state);
if (cli) {
ZERO_STRUCTP(cli);
}
diff --git a/source4/libcli/clifile.c b/source4/libcli/clifile.c
index 992d2c225d..0b9cac4c07 100644
--- a/source4/libcli/clifile.c
+++ b/source4/libcli/clifile.c
@@ -252,7 +252,7 @@ int smbcli_nt_create_full(struct smbcli_tree *tree, const char *fname,
open_parms.ntcreatex.in.fname = fname;
status = smb_raw_open(tree, mem_ctx, &open_parms);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (NT_STATUS_IS_OK(status)) {
return open_parms.ntcreatex.out.fnum;
@@ -319,7 +319,7 @@ int smbcli_open(struct smbcli_tree *tree, const char *fname, int flags,
open_parms.openx.in.fname = fname;
status = smb_raw_open(tree, mem_ctx, &open_parms);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (NT_STATUS_IS_OK(status)) {
return open_parms.openx.out.fnum;
@@ -633,7 +633,7 @@ NTSTATUS smbcli_dskattr(struct smbcli_tree *tree, int *bsize, int *total, int *a
*avail = fsinfo_parms.dskattr.out.units_free;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -660,7 +660,7 @@ int smbcli_ctemp(struct smbcli_tree *tree, const char *path, char **tmp_path)
if (tmp_path) {
*tmp_path = strdup(open_parms.ctemp.out.name);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (NT_STATUS_IS_OK(status)) {
return open_parms.ctemp.out.fnum;
}
diff --git a/source4/libcli/clilist.c b/source4/libcli/clilist.c
index 77fd760837..0d69a386eb 100644
--- a/source4/libcli/clilist.c
+++ b/source4/libcli/clilist.c
@@ -147,7 +147,7 @@ int smbcli_list_new(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
state.mem_ctx, &first_parms,
(void*)&state, smbcli_list_new_callback);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(state.mem_ctx);
+ talloc_free(state.mem_ctx);
return -1;
}
@@ -192,7 +192,7 @@ int smbcli_list_new(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
fn(&state.dirlist[i], Mask, caller_state);
}
- talloc_destroy(state.mem_ctx);
+ talloc_free(state.mem_ctx);
return state.total_received;
}
@@ -283,7 +283,7 @@ int smbcli_list_old(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
smbcli_list_old_callback);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(state.mem_ctx);
+ talloc_free(state.mem_ctx);
return -1;
}
@@ -307,7 +307,7 @@ int smbcli_list_old(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
break;
}
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(state.mem_ctx);
+ talloc_free(state.mem_ctx);
return -1;
}
received = next_parms.search_next.out.count;
@@ -321,7 +321,7 @@ int smbcli_list_old(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
fn(&state.dirlist[i], Mask, caller_state);
}
- talloc_destroy(state.mem_ctx);
+ talloc_free(state.mem_ctx);
return state.total_received;
}
diff --git a/source4/libcli/clitrans2.c b/source4/libcli/clitrans2.c
index eb2c671a95..6be92fa17d 100644
--- a/source4/libcli/clitrans2.c
+++ b/source4/libcli/clitrans2.c
@@ -38,7 +38,7 @@ NTSTATUS smbcli_qpathinfo(struct smbcli_tree *tree, const char *fname,
parms.standard.in.fname = fname;
status = smb_raw_pathinfo(tree, mem_ctx, &parms);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (!NT_STATUS_IS_OK(status))
return status;
@@ -80,7 +80,7 @@ NTSTATUS smbcli_qpathinfo2(struct smbcli_tree *tree, const char *fname,
parms.all_info.in.fname = fname;
status = smb_raw_pathinfo(tree, mem_ctx, &parms);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (!NT_STATUS_IS_OK(status))
return status;
@@ -124,14 +124,14 @@ NTSTATUS smbcli_qfilename(struct smbcli_tree *tree, int fnum, const char **name)
status = smb_raw_fileinfo(tree, mem_ctx, &parms);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
*name = NULL;
return status;
}
*name = strdup(parms.name_info.out.fname.s);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -157,7 +157,7 @@ NTSTATUS smbcli_qfileinfo(struct smbcli_tree *tree, int fnum,
parms.all_info.in.fnum = fnum;
status = smb_raw_fileinfo(tree, mem_ctx, &parms);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -206,7 +206,7 @@ NTSTATUS smbcli_qpathinfo_alt_name(struct smbcli_tree *tree, const char *fname,
status = smb_raw_pathinfo(tree, mem_ctx, &parms);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
*alt_name = NULL;
return smbcli_nt_error(tree);
}
@@ -217,7 +217,7 @@ NTSTATUS smbcli_qpathinfo_alt_name(struct smbcli_tree *tree, const char *fname,
*alt_name = strdup(parms.alt_name_info.out.fname.s);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_OK;
}
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c
index b2a6bd957a..eab94bb194 100644
--- a/source4/libcli/ldap/ldap.c
+++ b/source4/libcli/ldap/ldap.c
@@ -130,7 +130,7 @@ static struct ldap_parse_tree *ldap_parse_simple(TALLOC_CTX *mem_ctx,
if (val && strchr("()&|", *val))
return NULL;
- ret = talloc_p(mem_ctx, struct ldap_parse_tree);
+ ret = talloc(mem_ctx, struct ldap_parse_tree);
if (!ret) {
errno = ENOMEM;
return NULL;
@@ -157,7 +157,7 @@ static struct ldap_parse_tree *ldap_parse_filterlist(TALLOC_CTX *mem_ctx,
{
struct ldap_parse_tree *ret, *next;
- ret = talloc_p(mem_ctx, struct ldap_parse_tree);
+ ret = talloc(mem_ctx, struct ldap_parse_tree);
if (!ret) {
errno = ENOMEM;
return NULL;
@@ -165,7 +165,7 @@ static struct ldap_parse_tree *ldap_parse_filterlist(TALLOC_CTX *mem_ctx,
ret->operation = op;
ret->u.list.num_elements = 1;
- ret->u.list.elements = talloc_p(mem_ctx, struct ldap_parse_tree *);
+ ret->u.list.elements = talloc(mem_ctx, struct ldap_parse_tree *);
if (!ret->u.list.elements) {
errno = ENOMEM;
return NULL;
@@ -180,7 +180,7 @@ static struct ldap_parse_tree *ldap_parse_filterlist(TALLOC_CTX *mem_ctx,
while (*s && (next = ldap_parse_filter(mem_ctx, &s))) {
struct ldap_parse_tree **e;
- e = talloc_realloc_p(ret,
+ e = talloc_realloc(ret,
ret->u.list.elements,
struct ldap_parse_tree *,
ret->u.list.num_elements+1);
@@ -205,7 +205,7 @@ static struct ldap_parse_tree *ldap_parse_not(TALLOC_CTX *mem_ctx, const char *s
{
struct ldap_parse_tree *ret;
- ret = talloc_p(mem_ctx, struct ldap_parse_tree);
+ ret = talloc(mem_ctx, struct ldap_parse_tree);
if (!ret) {
errno = ENOMEM;
return NULL;
@@ -448,7 +448,7 @@ BOOL ldap_encode(struct ldap_message *msg, DATA_BLOB *result)
ldap_push_filter(&data, tree);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
asn1_push_tag(&data, ASN1_SEQUENCE(0));
@@ -1186,7 +1186,7 @@ BOOL ldap_decode(struct asn1_data *data, struct ldap_message *msg)
for (i=0; asn1_peek_tag(data, ASN1_SEQUENCE(0)); i++) {
asn1_start_tag(data, ASN1_SEQUENCE(0));
- ctrl = talloc_realloc_p(msg->mem_ctx, ctrl, struct ldap_Control, i+1);
+ ctrl = talloc_realloc(msg->mem_ctx, ctrl, struct ldap_Control, i+1);
if (!ctrl) {
return False;
}
diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c
index 84fd0f1d64..c9e81ac28f 100644
--- a/source4/libcli/ldap/ldap_client.c
+++ b/source4/libcli/ldap/ldap_client.c
@@ -100,7 +100,7 @@ static struct ldap_connection *new_ldap_connection(TALLOC_CTX *mem_ctx)
{
struct ldap_connection *result;
- result = talloc_p(mem_ctx, struct ldap_connection);
+ result = talloc(mem_ctx, struct ldap_connection);
if (!result) {
return NULL;
@@ -158,7 +158,7 @@ struct ldap_message *new_ldap_message(TALLOC_CTX *mem_ctx)
{
struct ldap_message *result;
- result = talloc_p(mem_ctx, struct ldap_message);
+ result = talloc(mem_ctx, struct ldap_message);
if (!result) {
return NULL;
@@ -472,7 +472,7 @@ int ldap_bind_sasl(struct ldap_connection *conn, const char *username, const cha
done:
if (mem_ctx)
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return result;
}
diff --git a/source4/libcli/ldap/ldap_ldif.c b/source4/libcli/ldap/ldap_ldif.c
index 809c75cf96..a0249a4ba0 100644
--- a/source4/libcli/ldap/ldap_ldif.c
+++ b/source4/libcli/ldap/ldap_ldif.c
@@ -159,7 +159,7 @@ static int next_attr(char **s, const char **attr, struct ldap_val *value)
BOOL add_value_to_attrib(TALLOC_CTX *mem_ctx, struct ldap_val *value,
struct ldap_attribute *attrib)
{
- attrib->values = talloc_realloc_p(mem_ctx,
+ attrib->values = talloc_realloc(mem_ctx,
attrib->values,
DATA_BLOB,
attrib->num_values+1);
@@ -177,7 +177,7 @@ BOOL add_attrib_to_array_talloc(TALLOC_CTX *mem_ctx,
struct ldap_attribute **attribs,
int *num_attribs)
{
- *attribs = talloc_realloc_p(mem_ctx,
+ *attribs = talloc_realloc(mem_ctx,
*attribs,
struct ldap_attribute,
*num_attribs+1);
@@ -211,7 +211,7 @@ static BOOL fill_add_attributes(struct ldap_message *msg, char **chunk)
}
if (attrib == NULL) {
- r->attributes = talloc_realloc_p(msg->mem_ctx,
+ r->attributes = talloc_realloc(msg->mem_ctx,
r->attributes,
struct ldap_attribute,
r->num_attributes+1);
@@ -236,7 +236,7 @@ BOOL add_mod_to_array_talloc(TALLOC_CTX *mem_ctx,
struct ldap_mod **mods,
int *num_mods)
{
- *mods = talloc_realloc_p(mem_ctx, *mods, struct ldap_mod, (*num_mods)+1);
+ *mods = talloc_realloc(mem_ctx, *mods, struct ldap_mod, (*num_mods)+1);
if (*mods == NULL)
return False;
diff --git a/source4/libcli/raw/rawacl.c b/source4/libcli/raw/rawacl.c
index 97e0212137..b2dac09f81 100644
--- a/source4/libcli/raw/rawacl.c
+++ b/source4/libcli/raw/rawacl.c
@@ -81,7 +81,7 @@ NTSTATUS smb_raw_query_secdesc_recv(struct smbcli_request *req,
return NT_STATUS_INVALID_PARAMETER;
}
- io->query_secdesc.out.sd = talloc_p(mem_ctx, struct security_descriptor);
+ io->query_secdesc.out.sd = talloc(mem_ctx, struct security_descriptor);
if (!io->query_secdesc.out.sd) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/raw/raweas.c b/source4/libcli/raw/raweas.c
index ec8bacdf64..49be9a43e6 100644
--- a/source4/libcli/raw/raweas.c
+++ b/source4/libcli/raw/raweas.c
@@ -187,7 +187,7 @@ NTSTATUS ea_pull_list(const DATA_BLOB *blob,
blob2.data = blob->data + ofs;
blob2.length = ea_size - ofs;
- *eas = talloc_realloc_p(mem_ctx, *eas, struct ea_struct, n+1);
+ *eas = talloc_realloc(mem_ctx, *eas, struct ea_struct, n+1);
if (! *eas) return NT_STATUS_NO_MEMORY;
len = ea_pull_struct(&blob2, mem_ctx, &(*eas)[n]);
@@ -232,7 +232,7 @@ NTSTATUS ea_pull_list_chained(const DATA_BLOB *blob,
blob2.data = blob->data + ofs + 4;
blob2.length = blob->length - (ofs + 4);
- *eas = talloc_realloc_p(mem_ctx, *eas, struct ea_struct, n+1);
+ *eas = talloc_realloc(mem_ctx, *eas, struct ea_struct, n+1);
if (! *eas) return NT_STATUS_NO_MEMORY;
len = ea_pull_struct(&blob2, mem_ctx, &(*eas)[n]);
@@ -312,7 +312,7 @@ NTSTATUS ea_pull_name_list(const DATA_BLOB *blob,
blob2.data = blob->data + ofs;
blob2.length = ea_size - ofs;
- *ea_names = talloc_realloc_p(mem_ctx, *ea_names, struct ea_name, n+1);
+ *ea_names = talloc_realloc(mem_ctx, *ea_names, struct ea_name, n+1);
if (! *ea_names) return NT_STATUS_NO_MEMORY;
len = ea_pull_name(&blob2, mem_ctx, &(*ea_names)[n]);
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index e0b54cacc3..c6652125c2 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -140,7 +140,7 @@ static struct smbcli_request *smb_raw_t2mkdir_send(struct smbcli_tree *tree,
req = smb_raw_trans2_send(tree, &t2);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return req;
}
@@ -383,7 +383,7 @@ static struct smbcli_request *smb_raw_t2open_send(struct smbcli_tree *tree,
req = smb_raw_trans2_send(tree, &t2);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return req;
}
diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c
index 3befb8ee4d..88c2f0d0fc 100644
--- a/source4/libcli/raw/rawfileinfo.c
+++ b/source4/libcli/raw/rawfileinfo.c
@@ -182,7 +182,7 @@ static NTSTATUS smb_raw_info_backend(struct smbcli_session *session,
while (blob->length - ofs >= 24) {
uint_t n = parms->stream_info.out.num_streams;
parms->stream_info.out.streams =
- talloc_realloc_p(mem_ctx,
+ talloc_realloc(mem_ctx,
parms->stream_info.out.streams,
struct stream_struct,
n+1);
@@ -306,7 +306,7 @@ static struct smbcli_request *smb_raw_fileinfo_blob_send(struct smbcli_tree *tre
tp.in.params = data_blob_talloc(mem_ctx, NULL, 4);
if (!tp.in.params.data) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NULL;
}
@@ -315,7 +315,7 @@ static struct smbcli_request *smb_raw_fileinfo_blob_send(struct smbcli_tree *tre
req = smb_raw_trans2_send(tree, &tp);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return req;
}
@@ -360,7 +360,7 @@ static struct smbcli_request *smb_raw_pathinfo_blob_send(struct smbcli_tree *tre
tp.in.params = data_blob_talloc(mem_ctx, NULL, 6);
if (!tp.in.params.data) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NULL;
}
@@ -371,7 +371,7 @@ static struct smbcli_request *smb_raw_pathinfo_blob_send(struct smbcli_tree *tre
req = smb_raw_trans2_send(tree, &tp);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return req;
}
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 7fb12dcf80..7dbe6b3468 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -67,7 +67,7 @@ struct smbcli_request *smbcli_request_setup_nonsmb(struct smbcli_transport *tran
{
struct smbcli_request *req;
- req = talloc_p(transport, struct smbcli_request);
+ req = talloc(transport, struct smbcli_request);
if (!req) {
return NULL;
}
diff --git a/source4/libcli/raw/rawsetfileinfo.c b/source4/libcli/raw/rawsetfileinfo.c
index 9576bdf356..7934171ab0 100644
--- a/source4/libcli/raw/rawsetfileinfo.c
+++ b/source4/libcli/raw/rawsetfileinfo.c
@@ -274,7 +274,7 @@ struct smbcli_request *smb_raw_setfileinfo_send(struct smbcli_tree *tree,
if (!mem_ctx) return NULL;
if (!smb_raw_setinfo_backend(tree, mem_ctx, parms, &blob)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NULL;
}
@@ -285,7 +285,7 @@ struct smbcli_request *smb_raw_setfileinfo_send(struct smbcli_tree *tree,
parms->generic.level,
&blob);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return req;
}
@@ -321,7 +321,7 @@ struct smbcli_request *smb_raw_setpathinfo_send(struct smbcli_tree *tree,
if (!mem_ctx) return NULL;
if (!smb_raw_setinfo_backend(tree, mem_ctx, parms, &blob)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NULL;
}
@@ -332,7 +332,7 @@ struct smbcli_request *smb_raw_setpathinfo_send(struct smbcli_tree *tree,
parms->generic.level,
&blob);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return req;
}
diff --git a/source4/libcli/security/dom_sid.c b/source4/libcli/security/dom_sid.c
index d76f9fa239..493ecab183 100644
--- a/source4/libcli/security/dom_sid.c
+++ b/source4/libcli/security/dom_sid.c
@@ -149,12 +149,12 @@ struct dom_sid *dom_sid_parse_talloc(TALLOC_CTX *mem_ctx, const char *sidstr)
if (sidstr[i] == '-') num_sub_auths++;
}
- ret = talloc_p(mem_ctx, struct dom_sid);
+ ret = talloc(mem_ctx, struct dom_sid);
if (!ret) {
return NULL;
}
- ret->sub_auths = talloc_array_p(mem_ctx, uint32_t, num_sub_auths);
+ ret->sub_auths = talloc_array(mem_ctx, uint32_t, num_sub_auths);
if (!ret->sub_auths) {
return NULL;
}
@@ -190,12 +190,12 @@ struct dom_sid *dom_sid_dup(TALLOC_CTX *mem_ctx, const struct dom_sid *dom_sid)
{
struct dom_sid *ret;
int i;
- ret = talloc_p(mem_ctx, struct dom_sid);
+ ret = talloc(mem_ctx, struct dom_sid);
if (!ret) {
return NULL;
}
- ret->sub_auths = talloc_array_p(ret, uint32_t, dom_sid->num_auths);
+ ret->sub_auths = talloc_array(ret, uint32_t, dom_sid->num_auths);
if (!ret->sub_auths) {
return NULL;
}
@@ -226,12 +226,12 @@ struct dom_sid *dom_sid_add_rid(TALLOC_CTX *mem_ctx,
{
struct dom_sid *sid;
- sid = talloc_p(mem_ctx, struct dom_sid);
+ sid = talloc(mem_ctx, struct dom_sid);
if (!sid) return NULL;
*sid = *domain_sid;
- sid->sub_auths = talloc_array_p(sid, uint32_t, sid->num_auths+1);
+ sid->sub_auths = talloc_array(sid, uint32_t, sid->num_auths+1);
if (!sid->sub_auths) {
return NULL;
}
diff --git a/source4/libcli/security/security_descriptor.c b/source4/libcli/security/security_descriptor.c
index 509ec1f343..bbfee31fbe 100644
--- a/source4/libcli/security/security_descriptor.c
+++ b/source4/libcli/security/security_descriptor.c
@@ -30,7 +30,7 @@ struct security_descriptor *security_descriptor_initialise(TALLOC_CTX *mem_ctx)
{
struct security_descriptor *sd;
- sd = talloc_p(mem_ctx, struct security_descriptor);
+ sd = talloc(mem_ctx, struct security_descriptor);
if (!sd) {
return NULL;
}
@@ -72,7 +72,7 @@ NTSTATUS security_descriptor_dacl_add(struct security_descriptor *sd,
const struct security_ace *ace)
{
if (sd->dacl == NULL) {
- sd->dacl = talloc_p(sd, struct security_acl);
+ sd->dacl = talloc(sd, struct security_acl);
if (sd->dacl == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -82,7 +82,7 @@ NTSTATUS security_descriptor_dacl_add(struct security_descriptor *sd,
sd->dacl->aces = NULL;
}
- sd->dacl->aces = talloc_realloc_p(sd->dacl, sd->dacl->aces,
+ sd->dacl->aces = talloc_realloc(sd->dacl, sd->dacl->aces,
struct security_ace, sd->dacl->num_aces+1);
if (sd->dacl->aces == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -257,7 +257,7 @@ struct security_descriptor *security_descriptor_create(TALLOC_CTX *mem_ctx,
va_start(ap, group_sid);
while ((sidstr = va_arg(ap, const char *))) {
struct dom_sid *sid;
- struct security_ace *ace = talloc_p(sd, struct security_ace);
+ struct security_ace *ace = talloc(sd, struct security_ace);
NTSTATUS status;
if (ace == NULL) {
diff --git a/source4/libcli/security/security_token.c b/source4/libcli/security/security_token.c
index b9baf796df..663c4f28bc 100644
--- a/source4/libcli/security/security_token.c
+++ b/source4/libcli/security/security_token.c
@@ -31,7 +31,7 @@ struct security_token *security_token_initialise(TALLOC_CTX *mem_ctx)
{
struct security_token *st;
- st = talloc_p(mem_ctx, struct security_token);
+ st = talloc(mem_ctx, struct security_token);
if (!st) {
return NULL;
}
@@ -63,7 +63,7 @@ NTSTATUS security_token_create(TALLOC_CTX *mem_ctx,
ptoken = security_token_initialise(mem_ctx);
NT_STATUS_HAVE_NO_MEMORY(ptoken);
- ptoken->sids = talloc_array_p(ptoken, struct dom_sid *, n_groupSIDs + 5);
+ ptoken->sids = talloc_array(ptoken, struct dom_sid *, n_groupSIDs + 5);
NT_STATUS_HAVE_NO_MEMORY(ptoken->sids);
ptoken->user_sid = talloc_reference(ptoken, user_sid);
@@ -163,5 +163,5 @@ void security_token_debug(int dbg_lev, const struct security_token *token)
}
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c
index de14eb0e57..550450fea7 100644
--- a/source4/libcli/util/asn1.c
+++ b/source4/libcli/util/asn1.c
@@ -59,7 +59,7 @@ BOOL asn1_push_tag(struct asn1_data *data, uint8_t tag)
struct nesting *nesting;
asn1_write_uint8(data, tag);
- nesting = talloc_p(NULL, struct nesting);
+ nesting = talloc(NULL, struct nesting);
if (!nesting) {
data->has_error = True;
return False;
@@ -349,7 +349,7 @@ BOOL asn1_start_tag(struct asn1_data *data, uint8_t tag)
data->has_error = True;
return False;
}
- nesting = talloc_p(NULL, struct nesting);
+ nesting = talloc(NULL, struct nesting);
if (!nesting) {
data->has_error = True;
return False;
diff --git a/source4/libcli/util/clilsa.c b/source4/libcli/util/clilsa.c
index 40991a8855..0c0c64c0b4 100644
--- a/source4/libcli/util/clilsa.c
+++ b/source4/libcli/util/clilsa.c
@@ -53,7 +53,7 @@ static NTSTATUS smblsa_connect(struct smbcli_state *cli)
return NT_STATUS_OK;
}
- lsa = talloc_p(cli, struct smblsa_state);
+ lsa = talloc(cli, struct smblsa_state);
if (lsa == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -217,7 +217,7 @@ NTSTATUS smblsa_lookup_sid(struct smbcli_state *cli,
names.names = NULL;
sids.num_sids = 1;
- sids.sids = talloc_p(mem_ctx2, struct lsa_SidPtr);
+ sids.sids = talloc(mem_ctx2, struct lsa_SidPtr);
sids.sids[0].sid = sid;
r.in.handle = &cli->lsa->handle;
diff --git a/source4/libcli/util/smbencrypt.c b/source4/libcli/util/smbencrypt.c
index bd2aae3db1..7e2890272c 100644
--- a/source4/libcli/util/smbencrypt.c
+++ b/source4/libcli/util/smbencrypt.c
@@ -344,7 +344,7 @@ static DATA_BLOB NTLMv2_generate_response(const uint8_t ntlm_v2_hash[16],
memcpy(final_response.data+sizeof(ntlmv2_response),
ntlmv2_client_data.data, ntlmv2_client_data.length);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return final_response;
}