diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clifile.c | 8 | ||||
-rw-r--r-- | source3/libsmb/climessage.c | 4 | ||||
-rw-r--r-- | source3/libsmb/clitrans.c | 10 | ||||
-rw-r--r-- | source3/libsmb/smbencrypt.c | 14 |
4 files changed, 18 insertions, 18 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 4293828214..0a1168fd0f 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -968,10 +968,10 @@ uint8_t *smb_bytes_push_str(uint8_t *buf, bool ucs2, buflen += 1; } - if (!convert_string_allocate(talloc_tos(), CH_UNIX, - ucs2 ? CH_UTF16LE : CH_DOS, - str, str_len, &converted, - &converted_size, true)) { + if (!convert_string_talloc(talloc_tos(), CH_UNIX, + ucs2 ? CH_UTF16LE : CH_DOS, + str, str_len, &converted, + &converted_size, true)) { return NULL; } diff --git a/source3/libsmb/climessage.c b/source3/libsmb/climessage.c index 808190e79c..6538902f5d 100644 --- a/source3/libsmb/climessage.c +++ b/source3/libsmb/climessage.c @@ -85,7 +85,7 @@ int cli_message_text_build(struct cli_state *cli, const char *msg, int len, int p = smb_buf(cli->outbuf); *p++ = 1; - if (!convert_string_allocate(NULL, CH_UNIX, CH_DOS, msg, len, + if (!convert_string_talloc(talloc_tos(), CH_UNIX, CH_DOS, msg, len, (void **)(void *)&msgdos, &lendos, True) || !msgdos) { DEBUG(3,("Conversion failed, sending message in UNIX charset\n")); SSVAL(p, 0, len); p += 2; @@ -101,7 +101,7 @@ int cli_message_text_build(struct cli_state *cli, const char *msg, int len, int } memcpy(p, msgdos, lendos); p += lendos; - SAFE_FREE(msgdos); + TALLOC_FREE(msgdos); } cli_setup_bcc(cli, p); diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c index 3a6aa9e72c..8fc7a5269f 100644 --- a/source3/libsmb/clitrans.c +++ b/source3/libsmb/clitrans.c @@ -1050,11 +1050,11 @@ struct tevent_req *cli_trans_send( ZERO_STRUCT(state->rdata); if ((pipe_name != NULL) - && (!convert_string_allocate(state, CH_UNIX, - cli_ucs2(cli) ? CH_UTF16LE : CH_DOS, - pipe_name, strlen(pipe_name) + 1, - &state->pipe_name_conv, - &state->pipe_name_conv_len, true))) { + && (!convert_string_talloc(state, CH_UNIX, + cli_ucs2(cli) ? CH_UTF16LE : CH_DOS, + pipe_name, strlen(pipe_name) + 1, + &state->pipe_name_conv, + &state->pipe_name_conv_len, true))) { tevent_req_nterror(req, NT_STATUS_NO_MEMORY); return tevent_req_post(req, ev); } diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c index a76be3cc1a..27702b9f42 100644 --- a/source3/libsmb/smbencrypt.c +++ b/source3/libsmb/smbencrypt.c @@ -172,16 +172,16 @@ bool ntv2_owf_gen(const uchar owf[16], HMACMD5Context ctx; - if (!push_ucs2_allocate(&user, user_in, &user_byte_len)) { - DEBUG(0, ("push_uss2_allocate() for user failed: %s\n", + if (!push_ucs2_talloc(NULL, &user, user_in, &user_byte_len)) { + DEBUG(0, ("push_uss2_talloc() for user failed: %s\n", strerror(errno))); return False; } - if (!push_ucs2_allocate(&domain, domain_in, &domain_byte_len)) { - DEBUG(0, ("push_uss2_allocate() for domain failed: %s\n", + if (!push_ucs2_talloc(NULL, &domain, domain_in, &domain_byte_len)) { + DEBUG(0, ("push_uss2_talloc() for domain failed: %s\n", strerror(errno))); - SAFE_FREE(user); + TALLOC_FREE(user); return False; } @@ -210,8 +210,8 @@ bool ntv2_owf_gen(const uchar owf[16], dump_data(100, (uint8 *)kr_buf, 16); #endif - SAFE_FREE(user); - SAFE_FREE(domain); + TALLOC_FREE(user); + TALLOC_FREE(domain); return True; } |