1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-07 20:23:50 +03:00

r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation

functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
This commit is contained in:
Jeremy Allison
2004-12-07 18:25:53 +00:00
committed by Gerald (Jerry) Carter
parent 12440744ba
commit 620f2e608f
218 changed files with 1742 additions and 1543 deletions

View File

@@ -54,7 +54,7 @@ static BOOL store_sequence_for_reply(struct outstanding_packet_lookup **list,
}
}
t = smb_xmalloc(sizeof(*t));
t = SMB_XMALLOC_P(struct outstanding_packet_lookup);
ZERO_STRUCTP(t);
t->mid = mid;
@@ -459,7 +459,7 @@ BOOL cli_simple_set_signing(struct cli_state *cli,
return False;
}
data = smb_xmalloc(sizeof(*data));
data = SMB_XMALLOC_P(struct smb_basic_signing_context);
memset(data, '\0', sizeof(*data));
cli->sign_info.signing_context = data;
@@ -509,7 +509,7 @@ void cli_signing_trans_start(struct cli_state *cli, uint16 mid)
if (!cli->sign_info.doing_signing || !data)
return;
data->trans_info = smb_xmalloc(sizeof(struct trans_info_context));
data->trans_info = SMB_XMALLOC_P(struct trans_info_context);
ZERO_STRUCTP(data->trans_info);
/* This ensures the sequence is pulled off the outstanding packet list */
@@ -982,7 +982,7 @@ void srv_signing_trans_start(uint16 mid)
if (!data)
return;
data->trans_info = smb_xmalloc(sizeof(struct trans_info_context));
data->trans_info = SMB_XMALLOC_P(struct trans_info_context);
ZERO_STRUCTP(data->trans_info);
data->trans_info->reply_seq_num = data->send_seq_num-1;
@@ -1051,7 +1051,7 @@ void srv_set_signing(const DATA_BLOB user_session_key, const DATA_BLOB response)
srv_sign_info.doing_signing = True;
data = smb_xmalloc(sizeof(*data));
data = SMB_XMALLOC_P(struct smb_basic_signing_context);
memset(data, '\0', sizeof(*data));
srv_sign_info.signing_context = data;