mirror of
https://github.com/samba-team/samba.git
synced 2025-11-14 12:23:52 +03:00
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 commit is contained in:
committed by
Gerald (Jerry) Carter
parent
1d1a9c11ee
commit
ec32b22ed5
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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]);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user