summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-03-01 12:35:27 -0800
committerJeremy Allison <jra@samba.org>2012-03-01 15:05:56 -0800
commit049375ec51ef404e61963e1f6ba10c116fde9767 (patch)
treecb3576ec02af22601466ea9fccb905c3062de673 /source3
parente735b5225402b930ccc8c7c8fa03b988c3371a11 (diff)
downloadsamba-049375ec51ef404e61963e1f6ba10c116fde9767.tar.gz
samba-049375ec51ef404e61963e1f6ba10c116fde9767.tar.bz2
samba-049375ec51ef404e61963e1f6ba10c116fde9767.zip
Move to talloc from malloc.
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clifile.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 216edacf27..0c8a340929 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -4185,7 +4185,9 @@ static NTSTATUS cli_set_ea(struct cli_state *cli, uint16_t setup_val,
if (ea_namelen == 0 && ea_len == 0) {
data_len = 4;
- data = (uint8_t *)SMB_MALLOC(data_len);
+ data = talloc_array(talloc_tos(),
+ uint8_t,
+ data_len);
if (!data) {
return NT_STATUS_NO_MEMORY;
}
@@ -4193,7 +4195,9 @@ static NTSTATUS cli_set_ea(struct cli_state *cli, uint16_t setup_val,
SIVAL(p,0,data_len);
} else {
data_len = 4 + 4 + ea_namelen + 1 + ea_len;
- data = (uint8_t *)SMB_MALLOC(data_len);
+ data = talloc_array(talloc_tos(),
+ uint8_t,
+ data_len);
if (!data) {
return NT_STATUS_NO_MEMORY;
}
@@ -4215,7 +4219,7 @@ static NTSTATUS cli_set_ea(struct cli_state *cli, uint16_t setup_val,
NULL, 0, NULL, /* rsetup */
NULL, 0, NULL, /* rparam */
NULL, 0, NULL); /* rdata */
- SAFE_FREE(data);
+ talloc_free(data);
return status;
}