diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-09-19 22:47:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:00:48 -0500 |
commit | 7cf3a10756a0b462d49235c91099312416319ae6 (patch) | |
tree | b9dc16191e72929cd63e5883ef09eda82d9145a2 | |
parent | 7238a71961ebd7e726a0f227b7a47916c196c67d (diff) | |
download | samba-7cf3a10756a0b462d49235c91099312416319ae6.tar.gz samba-7cf3a10756a0b462d49235c91099312416319ae6.tar.bz2 samba-7cf3a10756a0b462d49235c91099312416319ae6.zip |
r18695: Zero initialize ref ptrs as well.
(This used to be commit 3295122173b0794880e68ea60f51d41b9b170ff4)
-rw-r--r-- | source3/librpc/gen_ndr/srv_dfs.c | 4 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_echo.c | 10 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_eventlog.c | 10 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_lsa.c | 66 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_netlogon.c | 70 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_unixinfo.c | 10 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_winreg.c | 42 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_wkssvc.c | 8 |
8 files changed, 110 insertions, 110 deletions
diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index a4da9fbe06..4c16201e9f 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -35,7 +35,7 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, &r); ZERO_STRUCT(r.out); - r.out.exist_flag = talloc_size(mem_ctx, sizeof(*r.out.exist_flag)); + r.out.exist_flag = talloc_zero_size(mem_ctx, sizeof(*r.out.exist_flag)); if (r.out.exist_flag == NULL) { talloc_free(mem_ctx); return False; @@ -266,7 +266,7 @@ static BOOL api_dfs_GetInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(dfs_GetInfo, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_echo.c b/source3/librpc/gen_ndr/srv_echo.c index 5a313003ea..444c934bea 100644 --- a/source3/librpc/gen_ndr/srv_echo.c +++ b/source3/librpc/gen_ndr/srv_echo.c @@ -35,7 +35,7 @@ static BOOL api_echo_AddOne(pipes_struct *p) NDR_PRINT_IN_DEBUG(echo_AddOne, &r); ZERO_STRUCT(r.out); - r.out.out_data = talloc_size(mem_ctx, sizeof(*r.out.out_data)); + r.out.out_data = talloc_zero_size(mem_ctx, sizeof(*r.out.out_data)); if (r.out.out_data == NULL) { talloc_free(mem_ctx); return False; @@ -98,7 +98,7 @@ static BOOL api_echo_EchoData(pipes_struct *p) NDR_PRINT_IN_DEBUG(echo_EchoData, &r); ZERO_STRUCT(r.out); - r.out.out_data = talloc_array_size(mem_ctx, sizeof(*r.out.out_data), r.in.len); + r.out.out_data = talloc_zero_size(mem_ctx, sizeof(*r.out.out_data) * r.in.len); if (r.out.out_data == NULL) { talloc_free(mem_ctx); return False; @@ -217,7 +217,7 @@ static BOOL api_echo_SourceData(pipes_struct *p) NDR_PRINT_IN_DEBUG(echo_SourceData, &r); ZERO_STRUCT(r.out); - r.out.data = talloc_array_size(mem_ctx, sizeof(*r.out.data), r.in.len); + r.out.data = talloc_zero_size(mem_ctx, sizeof(*r.out.data) * r.in.len); if (r.out.data == NULL) { talloc_free(mem_ctx); return False; @@ -280,7 +280,7 @@ static BOOL api_echo_TestCall(pipes_struct *p) NDR_PRINT_IN_DEBUG(echo_TestCall, &r); ZERO_STRUCT(r.out); - r.out.s2 = talloc_size(mem_ctx, sizeof(*r.out.s2)); + r.out.s2 = talloc_zero_size(mem_ctx, sizeof(*r.out.s2)); if (r.out.s2 == NULL) { talloc_free(mem_ctx); return False; @@ -343,7 +343,7 @@ static BOOL api_echo_TestCall2(pipes_struct *p) NDR_PRINT_IN_DEBUG(echo_TestCall2, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_eventlog.c b/source3/librpc/gen_ndr/srv_eventlog.c index ac8126cc6b..67027d3f9d 100644 --- a/source3/librpc/gen_ndr/srv_eventlog.c +++ b/source3/librpc/gen_ndr/srv_eventlog.c @@ -261,7 +261,7 @@ static BOOL api_eventlog_GetNumRecords(pipes_struct *p) NDR_PRINT_IN_DEBUG(eventlog_GetNumRecords, &r); ZERO_STRUCT(r.out); - r.out.number = talloc_size(mem_ctx, sizeof(*r.out.number)); + r.out.number = talloc_zero_size(mem_ctx, sizeof(*r.out.number)); if (r.out.number == NULL) { talloc_free(mem_ctx); return False; @@ -436,7 +436,7 @@ static BOOL api_eventlog_OpenEventLogW(pipes_struct *p) NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogW, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -611,19 +611,19 @@ static BOOL api_eventlog_ReadEventLogW(pipes_struct *p) NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogW, &r); ZERO_STRUCT(r.out); - r.out.data = talloc_array_size(mem_ctx, sizeof(*r.out.data), r.in.number_of_bytes); + r.out.data = talloc_zero_size(mem_ctx, sizeof(*r.out.data) * r.in.number_of_bytes); if (r.out.data == NULL) { talloc_free(mem_ctx); return False; } - r.out.sent_size = talloc_size(mem_ctx, sizeof(*r.out.sent_size)); + r.out.sent_size = talloc_zero_size(mem_ctx, sizeof(*r.out.sent_size)); if (r.out.sent_size == NULL) { talloc_free(mem_ctx); return False; } - r.out.real_size = talloc_size(mem_ctx, sizeof(*r.out.real_size)); + r.out.real_size = talloc_zero_size(mem_ctx, sizeof(*r.out.real_size)); if (r.out.real_size == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index fd8ccd5880..d6f3477f87 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -150,7 +150,7 @@ static BOOL api_lsa_EnumPrivs(pipes_struct *p) ZERO_STRUCT(r.out); r.out.resume_handle = r.in.resume_handle; - r.out.privs = talloc_size(mem_ctx, sizeof(*r.out.privs)); + r.out.privs = talloc_zero_size(mem_ctx, sizeof(*r.out.privs)); if (r.out.privs == NULL) { talloc_free(mem_ctx); return False; @@ -213,7 +213,7 @@ static BOOL api_lsa_QuerySecurity(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QuerySecurity, &r); ZERO_STRUCT(r.out); - r.out.sdbuf = talloc_size(mem_ctx, sizeof(*r.out.sdbuf)); + r.out.sdbuf = talloc_zero_size(mem_ctx, sizeof(*r.out.sdbuf)); if (r.out.sdbuf == NULL) { talloc_free(mem_ctx); return False; @@ -388,7 +388,7 @@ static BOOL api_lsa_OpenPolicy(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_OpenPolicy, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -451,7 +451,7 @@ static BOOL api_lsa_QueryInfoPolicy(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -626,7 +626,7 @@ static BOOL api_lsa_CreateAccount(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_CreateAccount, &r); ZERO_STRUCT(r.out); - r.out.acct_handle = talloc_size(mem_ctx, sizeof(*r.out.acct_handle)); + r.out.acct_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.acct_handle)); if (r.out.acct_handle == NULL) { talloc_free(mem_ctx); return False; @@ -690,7 +690,7 @@ static BOOL api_lsa_EnumAccounts(pipes_struct *p) ZERO_STRUCT(r.out); r.out.resume_handle = r.in.resume_handle; - r.out.sids = talloc_size(mem_ctx, sizeof(*r.out.sids)); + r.out.sids = talloc_zero_size(mem_ctx, sizeof(*r.out.sids)); if (r.out.sids == NULL) { talloc_free(mem_ctx); return False; @@ -753,7 +753,7 @@ static BOOL api_lsa_CreateTrustedDomain(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomain, &r); ZERO_STRUCT(r.out); - r.out.trustdom_handle = talloc_size(mem_ctx, sizeof(*r.out.trustdom_handle)); + r.out.trustdom_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.trustdom_handle)); if (r.out.trustdom_handle == NULL) { talloc_free(mem_ctx); return False; @@ -817,7 +817,7 @@ static BOOL api_lsa_EnumTrustDom(pipes_struct *p) ZERO_STRUCT(r.out); r.out.resume_handle = r.in.resume_handle; - r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -880,7 +880,7 @@ static BOOL api_lsa_LookupNames(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupNames, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -945,7 +945,7 @@ static BOOL api_lsa_LookupSids(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupSids, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -1010,7 +1010,7 @@ static BOOL api_lsa_CreateSecret(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_CreateSecret, &r); ZERO_STRUCT(r.out); - r.out.sec_handle = talloc_size(mem_ctx, sizeof(*r.out.sec_handle)); + r.out.sec_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.sec_handle)); if (r.out.sec_handle == NULL) { talloc_free(mem_ctx); return False; @@ -1073,7 +1073,7 @@ static BOOL api_lsa_OpenAccount(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_OpenAccount, &r); ZERO_STRUCT(r.out); - r.out.acct_handle = talloc_size(mem_ctx, sizeof(*r.out.acct_handle)); + r.out.acct_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.acct_handle)); if (r.out.acct_handle == NULL) { talloc_free(mem_ctx); return False; @@ -1136,7 +1136,7 @@ static BOOL api_lsa_EnumPrivsAccount(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_EnumPrivsAccount, &r); ZERO_STRUCT(r.out); - r.out.privs = talloc_size(mem_ctx, sizeof(*r.out.privs)); + r.out.privs = talloc_zero_size(mem_ctx, sizeof(*r.out.privs)); if (r.out.privs == NULL) { talloc_free(mem_ctx); return False; @@ -1535,7 +1535,7 @@ static BOOL api_lsa_OpenTrustedDomain(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomain, &r); ZERO_STRUCT(r.out); - r.out.trustdom_handle = talloc_size(mem_ctx, sizeof(*r.out.trustdom_handle)); + r.out.trustdom_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.trustdom_handle)); if (r.out.trustdom_handle == NULL) { talloc_free(mem_ctx); return False; @@ -1598,7 +1598,7 @@ static BOOL api_lsa_QueryTrustedDomainInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfo, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -1717,7 +1717,7 @@ static BOOL api_lsa_OpenSecret(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_OpenSecret, &r); ZERO_STRUCT(r.out); - r.out.sec_handle = talloc_size(mem_ctx, sizeof(*r.out.sec_handle)); + r.out.sec_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.sec_handle)); if (r.out.sec_handle == NULL) { talloc_free(mem_ctx); return False; @@ -1897,7 +1897,7 @@ static BOOL api_lsa_LookupPrivValue(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupPrivValue, &r); ZERO_STRUCT(r.out); - r.out.luid = talloc_size(mem_ctx, sizeof(*r.out.luid)); + r.out.luid = talloc_zero_size(mem_ctx, sizeof(*r.out.luid)); if (r.out.luid == NULL) { talloc_free(mem_ctx); return False; @@ -1960,7 +1960,7 @@ static BOOL api_lsa_LookupPrivName(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupPrivName, &r); ZERO_STRUCT(r.out); - r.out.name = talloc_size(mem_ctx, sizeof(*r.out.name)); + r.out.name = talloc_zero_size(mem_ctx, sizeof(*r.out.name)); if (r.out.name == NULL) { talloc_free(mem_ctx); return False; @@ -2023,7 +2023,7 @@ static BOOL api_lsa_LookupPrivDisplayName(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupPrivDisplayName, &r); ZERO_STRUCT(r.out); - r.out.disp_name = talloc_size(mem_ctx, sizeof(*r.out.disp_name)); + r.out.disp_name = talloc_zero_size(mem_ctx, sizeof(*r.out.disp_name)); if (r.out.disp_name == NULL) { talloc_free(mem_ctx); return False; @@ -2143,7 +2143,7 @@ static BOOL api_lsa_EnumAccountsWithUserRight(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_EnumAccountsWithUserRight, &r); ZERO_STRUCT(r.out); - r.out.sids = talloc_size(mem_ctx, sizeof(*r.out.sids)); + r.out.sids = talloc_zero_size(mem_ctx, sizeof(*r.out.sids)); if (r.out.sids == NULL) { talloc_free(mem_ctx); return False; @@ -2206,7 +2206,7 @@ static BOOL api_lsa_EnumAccountRights(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_EnumAccountRights, &r); ZERO_STRUCT(r.out); - r.out.rights = talloc_size(mem_ctx, sizeof(*r.out.rights)); + r.out.rights = talloc_zero_size(mem_ctx, sizeof(*r.out.rights)); if (r.out.rights == NULL) { talloc_free(mem_ctx); return False; @@ -2381,7 +2381,7 @@ static BOOL api_lsa_QueryTrustedDomainInfoBySid(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoBySid, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -2668,7 +2668,7 @@ static BOOL api_lsa_OpenPolicy2(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_OpenPolicy2, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -2790,7 +2790,7 @@ static BOOL api_lsa_QueryInfoPolicy2(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy2, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -2909,7 +2909,7 @@ static BOOL api_lsa_QueryTrustedDomainInfoByName(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoByName, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -3029,7 +3029,7 @@ static BOOL api_lsa_EnumTrustedDomainsEx(pipes_struct *p) ZERO_STRUCT(r.out); r.out.resume_handle = r.in.resume_handle; - r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -3206,7 +3206,7 @@ static BOOL api_lsa_QueryDomainInformationPolicy(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QueryDomainInformationPolicy, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -3325,7 +3325,7 @@ static BOOL api_lsa_OpenTrustedDomainByName(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomainByName, &r); ZERO_STRUCT(r.out); - r.out.trustdom_handle = talloc_size(mem_ctx, sizeof(*r.out.trustdom_handle)); + r.out.trustdom_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.trustdom_handle)); if (r.out.trustdom_handle == NULL) { talloc_free(mem_ctx); return False; @@ -3444,7 +3444,7 @@ static BOOL api_lsa_LookupSids2(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupSids2, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -3509,7 +3509,7 @@ static BOOL api_lsa_LookupNames2(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupNames2, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -4078,7 +4078,7 @@ static BOOL api_lsa_LookupNames3(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupNames3, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -4535,7 +4535,7 @@ static BOOL api_lsa_LookupSids3(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupSids3, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -4600,7 +4600,7 @@ static BOOL api_lsa_LookupNames4(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupNames4, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c index d667f1051f..75605c6650 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.c +++ b/source3/librpc/gen_ndr/srv_netlogon.c @@ -35,7 +35,7 @@ static BOOL api_netr_LogonUasLogon(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_LogonUasLogon, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -98,7 +98,7 @@ static BOOL api_netr_LogonUasLogoff(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_LogonUasLogoff, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -162,13 +162,13 @@ static BOOL api_netr_LogonSamLogon(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; - r.out.validation = talloc_size(mem_ctx, sizeof(*r.out.validation)); + r.out.validation = talloc_zero_size(mem_ctx, sizeof(*r.out.validation)); if (r.out.validation == NULL) { talloc_free(mem_ctx); return False; } - r.out.authoritative = talloc_size(mem_ctx, sizeof(*r.out.authoritative)); + r.out.authoritative = talloc_zero_size(mem_ctx, sizeof(*r.out.authoritative)); if (r.out.authoritative == NULL) { talloc_free(mem_ctx); return False; @@ -405,7 +405,7 @@ static BOOL api_netr_ServerPasswordSet(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet, &r); ZERO_STRUCT(r.out); - r.out.return_authenticator = talloc_size(mem_ctx, sizeof(*r.out.return_authenticator)); + r.out.return_authenticator = talloc_zero_size(mem_ctx, sizeof(*r.out.return_authenticator)); if (r.out.return_authenticator == NULL) { talloc_free(mem_ctx); return False; @@ -470,7 +470,7 @@ static BOOL api_netr_DatabaseDeltas(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; r.out.sequence_num = r.in.sequence_num; - r.out.delta_enum_array = talloc_size(mem_ctx, sizeof(*r.out.delta_enum_array)); + r.out.delta_enum_array = talloc_zero_size(mem_ctx, sizeof(*r.out.delta_enum_array)); if (r.out.delta_enum_array == NULL) { talloc_free(mem_ctx); return False; @@ -535,7 +535,7 @@ static BOOL api_netr_DatabaseSync(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; r.out.sync_context = r.in.sync_context; - r.out.delta_enum_array = talloc_size(mem_ctx, sizeof(*r.out.delta_enum_array)); + r.out.delta_enum_array = talloc_zero_size(mem_ctx, sizeof(*r.out.delta_enum_array)); if (r.out.delta_enum_array == NULL) { talloc_free(mem_ctx); return False; @@ -599,25 +599,25 @@ static BOOL api_netr_AccountDeltas(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; - r.out.buffer = talloc_size(mem_ctx, sizeof(*r.out.buffer)); + r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer)); if (r.out.buffer == NULL) { talloc_free(mem_ctx); return False; } - r.out.count_returned = talloc_size(mem_ctx, sizeof(*r.out.count_returned)); + r.out.count_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.count_returned)); if (r.out.count_returned == NULL) { talloc_free(mem_ctx); return False; } - r.out.total_entries = talloc_size(mem_ctx, sizeof(*r.out.total_entries)); + r.out.total_entries = talloc_zero_size(mem_ctx, sizeof(*r.out.total_entries)); if (r.out.total_entries == NULL) { talloc_free(mem_ctx); return False; } - r.out.recordid = talloc_size(mem_ctx, sizeof(*r.out.recordid)); + r.out.recordid = talloc_zero_size(mem_ctx, sizeof(*r.out.recordid)); if (r.out.recordid == NULL) { talloc_free(mem_ctx); return False; @@ -681,25 +681,25 @@ static BOOL api_netr_AccountSync(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; - r.out.buffer = talloc_size(mem_ctx, sizeof(*r.out.buffer)); + r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer)); if (r.out.buffer == NULL) { talloc_free(mem_ctx); return False; } - r.out.count_returned = talloc_size(mem_ctx, sizeof(*r.out.count_returned)); + r.out.count_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.count_returned)); if (r.out.count_returned == NULL) { talloc_free(mem_ctx); return False; } - r.out.total_entries = talloc_size(mem_ctx, sizeof(*r.out.total_entries)); + r.out.total_entries = talloc_zero_size(mem_ctx, sizeof(*r.out.total_entries)); if (r.out.total_entries == NULL) { talloc_free(mem_ctx); return False; } - r.out.next_reference = talloc_size(mem_ctx, sizeof(*r.out.next_reference)); + r.out.next_reference = talloc_zero_size(mem_ctx, sizeof(*r.out.next_reference)); if (r.out.next_reference == NULL) { talloc_free(mem_ctx); return False; @@ -763,7 +763,7 @@ static BOOL api_netr_GetDcName(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_GetDcName, &r); ZERO_STRUCT(r.out); - r.out.dcname = talloc_size(mem_ctx, sizeof(*r.out.dcname)); + r.out.dcname = talloc_zero_size(mem_ctx, sizeof(*r.out.dcname)); if (r.out.dcname == NULL) { talloc_free(mem_ctx); return False; @@ -826,7 +826,7 @@ static BOOL api_netr_LogonControl(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_LogonControl, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -889,7 +889,7 @@ static BOOL api_netr_GetAnyDCName(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_GetAnyDCName, &r); ZERO_STRUCT(r.out); - r.out.dcname = talloc_size(mem_ctx, sizeof(*r.out.dcname)); + r.out.dcname = talloc_zero_size(mem_ctx, sizeof(*r.out.dcname)); if (r.out.dcname == NULL) { talloc_free(mem_ctx); return False; @@ -952,7 +952,7 @@ static BOOL api_netr_LogonControl2(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_LogonControl2, &r); ZERO_STRUCT(r.out); - r.out.query = talloc_size(mem_ctx, sizeof(*r.out.query)); + r.out.query = talloc_zero_size(mem_ctx, sizeof(*r.out.query)); if (r.out.query == NULL) { talloc_free(mem_ctx); return False; @@ -1076,7 +1076,7 @@ static BOOL api_netr_DatabaseSync2(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; r.out.sync_context = r.in.sync_context; - r.out.delta_enum_array = talloc_size(mem_ctx, sizeof(*r.out.delta_enum_array)); + r.out.delta_enum_array = talloc_zero_size(mem_ctx, sizeof(*r.out.delta_enum_array)); if (r.out.delta_enum_array == NULL) { talloc_free(mem_ctx); return False; @@ -1140,7 +1140,7 @@ static BOOL api_netr_DatabaseRedo(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; - r.out.delta_enum_array = talloc_size(mem_ctx, sizeof(*r.out.delta_enum_array)); + r.out.delta_enum_array = talloc_zero_size(mem_ctx, sizeof(*r.out.delta_enum_array)); if (r.out.delta_enum_array == NULL) { talloc_free(mem_ctx); return False; @@ -1203,7 +1203,7 @@ static BOOL api_netr_LogonControl2Ex(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_LogonControl2Ex, &r); ZERO_STRUCT(r.out); - r.out.query = talloc_size(mem_ctx, sizeof(*r.out.query)); + r.out.query = talloc_zero_size(mem_ctx, sizeof(*r.out.query)); if (r.out.query == NULL) { talloc_free(mem_ctx); return False; @@ -1322,7 +1322,7 @@ static BOOL api_netr_DsRGetDCName(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_DsRGetDCName, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -1667,7 +1667,7 @@ static BOOL api_netr_ServerAuthenticate3(pipes_struct *p) ZERO_STRUCT(r.out); r.out.credentials = r.in.credentials; r.out.negotiate_flags = r.in.negotiate_flags; - r.out.rid = talloc_size(mem_ctx, sizeof(*r.out.rid)); + r.out.rid = talloc_zero_size(mem_ctx, sizeof(*r.out.rid)); if (r.out.rid == NULL) { talloc_free(mem_ctx); return False; @@ -1730,7 +1730,7 @@ static BOOL api_netr_DsRGetDCNameEx(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -1793,7 +1793,7 @@ static BOOL api_netr_DsRGetSiteName(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_DsRGetSiteName, &r); ZERO_STRUCT(r.out); - r.out.site = talloc_size(mem_ctx, sizeof(*r.out.site)); + r.out.site = talloc_zero_size(mem_ctx, sizeof(*r.out.site)); if (r.out.site == NULL) { talloc_free(mem_ctx); return False; @@ -1857,7 +1857,7 @@ static BOOL api_netr_LogonGetDomainInfo(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -1920,7 +1920,7 @@ static BOOL api_netr_ServerPasswordSet2(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet2, &r); ZERO_STRUCT(r.out); - r.out.return_authenticator = talloc_size(mem_ctx, sizeof(*r.out.return_authenticator)); + r.out.return_authenticator = talloc_zero_size(mem_ctx, sizeof(*r.out.return_authenticator)); if (r.out.return_authenticator == NULL) { talloc_free(mem_ctx); return False; @@ -2151,7 +2151,7 @@ static BOOL api_netr_DsRGetDCNameEx2(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx2, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -2438,13 +2438,13 @@ static BOOL api_netr_LogonSamLogonEx(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_LogonSamLogonEx, &r); ZERO_STRUCT(r.out); - r.out.validation = talloc_size(mem_ctx, sizeof(*r.out.validation)); + r.out.validation = talloc_zero_size(mem_ctx, sizeof(*r.out.validation)); if (r.out.validation == NULL) { talloc_free(mem_ctx); return False; } - r.out.authoritative = talloc_size(mem_ctx, sizeof(*r.out.authoritative)); + r.out.authoritative = talloc_zero_size(mem_ctx, sizeof(*r.out.authoritative)); if (r.out.authoritative == NULL) { talloc_free(mem_ctx); return False; @@ -2508,13 +2508,13 @@ static BOOL api_netr_DsrEnumerateDomainTrusts(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_DsrEnumerateDomainTrusts, &r); ZERO_STRUCT(r.out); - r.out.count = talloc_size(mem_ctx, sizeof(*r.out.count)); + r.out.count = talloc_zero_size(mem_ctx, sizeof(*r.out.count)); if (r.out.count == NULL) { talloc_free(mem_ctx); return False; } - r.out.trusts = talloc_array_size(mem_ctx, sizeof(*r.out.trusts), count); + r.out.trusts = talloc_zero_size(mem_ctx, sizeof(*r.out.trusts) * count); if (r.out.trusts == NULL) { talloc_free(mem_ctx); return False; @@ -2802,13 +2802,13 @@ static BOOL api_netr_LogonSamLogonWithFlags(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; - r.out.validation = talloc_size(mem_ctx, sizeof(*r.out.validation)); + r.out.validation = talloc_zero_size(mem_ctx, sizeof(*r.out.validation)); if (r.out.validation == NULL) { talloc_free(mem_ctx); return False; } - r.out.authoritative = talloc_size(mem_ctx, sizeof(*r.out.authoritative)); + r.out.authoritative = talloc_zero_size(mem_ctx, sizeof(*r.out.authoritative)); if (r.out.authoritative == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_unixinfo.c b/source3/librpc/gen_ndr/srv_unixinfo.c index 2195e7964f..d3d5b5609f 100644 --- a/source3/librpc/gen_ndr/srv_unixinfo.c +++ b/source3/librpc/gen_ndr/srv_unixinfo.c @@ -35,7 +35,7 @@ static BOOL api_unixinfo_SidToUid(pipes_struct *p) NDR_PRINT_IN_DEBUG(unixinfo_SidToUid, &r); ZERO_STRUCT(r.out); - r.out.uid = talloc_size(mem_ctx, sizeof(*r.out.uid)); + r.out.uid = talloc_zero_size(mem_ctx, sizeof(*r.out.uid)); if (r.out.uid == NULL) { talloc_free(mem_ctx); return False; @@ -98,7 +98,7 @@ static BOOL api_unixinfo_UidToSid(pipes_struct *p) NDR_PRINT_IN_DEBUG(unixinfo_UidToSid, &r); ZERO_STRUCT(r.out); - r.out.sid = talloc_size(mem_ctx, sizeof(*r.out.sid)); + r.out.sid = talloc_zero_size(mem_ctx, sizeof(*r.out.sid)); if (r.out.sid == NULL) { talloc_free(mem_ctx); return False; @@ -161,7 +161,7 @@ static BOOL api_unixinfo_SidToGid(pipes_struct *p) NDR_PRINT_IN_DEBUG(unixinfo_SidToGid, &r); ZERO_STRUCT(r.out); - r.out.gid = talloc_size(mem_ctx, sizeof(*r.out.gid)); + r.out.gid = talloc_zero_size(mem_ctx, sizeof(*r.out.gid)); if (r.out.gid == NULL) { talloc_free(mem_ctx); return False; @@ -224,7 +224,7 @@ static BOOL api_unixinfo_GidToSid(pipes_struct *p) NDR_PRINT_IN_DEBUG(unixinfo_GidToSid, &r); ZERO_STRUCT(r.out); - r.out.sid = talloc_size(mem_ctx, sizeof(*r.out.sid)); + r.out.sid = talloc_zero_size(mem_ctx, sizeof(*r.out.sid)); if (r.out.sid == NULL) { talloc_free(mem_ctx); return False; @@ -288,7 +288,7 @@ static BOOL api_unixinfo_GetPWUid(pipes_struct *p) ZERO_STRUCT(r.out); r.out.count = r.in.count; - r.out.infos = talloc_array_size(mem_ctx, sizeof(*r.out.infos), *r.in.count); + r.out.infos = talloc_zero_size(mem_ctx, sizeof(*r.out.infos) * *r.in.count); if (r.out.infos == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_winreg.c b/source3/librpc/gen_ndr/srv_winreg.c index 8c4cf4a2b4..38a7ee93f3 100644 --- a/source3/librpc/gen_ndr/srv_winreg.c +++ b/source3/librpc/gen_ndr/srv_winreg.c @@ -35,7 +35,7 @@ static BOOL api_winreg_OpenHKCR(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKCR, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -98,7 +98,7 @@ static BOOL api_winreg_OpenHKCU(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKCU, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -161,7 +161,7 @@ static BOOL api_winreg_OpenHKLM(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKLM, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -224,7 +224,7 @@ static BOOL api_winreg_OpenHKPD(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKPD, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -287,7 +287,7 @@ static BOOL api_winreg_OpenHKU(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKU, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -408,7 +408,7 @@ static BOOL api_winreg_CreateKey(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_CreateKey, &r); ZERO_STRUCT(r.out); - r.out.new_handle = talloc_size(mem_ctx, sizeof(*r.out.new_handle)); + r.out.new_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.new_handle)); if (r.out.new_handle == NULL) { talloc_free(mem_ctx); return False; @@ -932,7 +932,7 @@ static BOOL api_winreg_OpenKey(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenKey, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -995,55 +995,55 @@ static BOOL api_winreg_QueryInfoKey(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_QueryInfoKey, &r); ZERO_STRUCT(r.out); - r.out.class_out = talloc_size(mem_ctx, sizeof(*r.out.class_out)); + r.out.class_out = talloc_zero_size(mem_ctx, sizeof(*r.out.class_out)); if (r.out.class_out == NULL) { talloc_free(mem_ctx); return False; } - r.out.num_subkeys = talloc_size(mem_ctx, sizeof(*r.out.num_subkeys)); + r.out.num_subkeys = talloc_zero_size(mem_ctx, sizeof(*r.out.num_subkeys)); if (r.out.num_subkeys == NULL) { talloc_free(mem_ctx); return False; } - r.out.max_subkeylen = talloc_size(mem_ctx, sizeof(*r.out.max_subkeylen)); + r.out.max_subkeylen = talloc_zero_size(mem_ctx, sizeof(*r.out.max_subkeylen)); if (r.out.max_subkeylen == NULL) { talloc_free(mem_ctx); return False; } - r.out.max_subkeysize = talloc_size(mem_ctx, sizeof(*r.out.max_subkeysize)); + r.out.max_subkeysize = talloc_zero_size(mem_ctx, sizeof(*r.out.max_subkeysize)); if (r.out.max_subkeysize == NULL) { talloc_free(mem_ctx); return False; } - r.out.num_values = talloc_size(mem_ctx, sizeof(*r.out.num_values)); + r.out.num_values = talloc_zero_size(mem_ctx, sizeof(*r.out.num_values)); if (r.out.num_values == NULL) { talloc_free(mem_ctx); return False; } - r.out.max_valnamelen = talloc_size(mem_ctx, sizeof(*r.out.max_valnamelen)); + r.out.max_valnamelen = talloc_zero_size(mem_ctx, sizeof(*r.out.max_valnamelen)); if (r.out.max_valnamelen == NULL) { talloc_free(mem_ctx); return False; } - r.out.max_valbufsize = talloc_size(mem_ctx, sizeof(*r.out.max_valbufsize)); + r.out.max_valbufsize = talloc_zero_size(mem_ctx, sizeof(*r.out.max_valbufsize)); if (r.out.max_valbufsize == NULL) { talloc_free(mem_ctx); return False; } - r.out.secdescsize = talloc_size(mem_ctx, sizeof(*r.out.secdescsize)); + r.out.secdescsize = talloc_zero_size(mem_ctx, sizeof(*r.out.secdescsize)); if (r.out.secdescsize == NULL) { talloc_free(mem_ctx); return False; } - r.out.last_changed_time = talloc_size(mem_ctx, sizeof(*r.out.last_changed_time)); + r.out.last_changed_time = talloc_zero_size(mem_ctx, sizeof(*r.out.last_changed_time)); if (r.out.last_changed_time == NULL) { talloc_free(mem_ctx); return False; @@ -1617,7 +1617,7 @@ static BOOL api_winreg_GetVersion(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_GetVersion, &r); ZERO_STRUCT(r.out); - r.out.version = talloc_size(mem_ctx, sizeof(*r.out.version)); + r.out.version = talloc_zero_size(mem_ctx, sizeof(*r.out.version)); if (r.out.version == NULL) { talloc_free(mem_ctx); return False; @@ -1680,7 +1680,7 @@ static BOOL api_winreg_OpenHKCC(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKCC, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -1743,7 +1743,7 @@ static BOOL api_winreg_OpenHKDD(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKDD, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -1978,7 +1978,7 @@ static BOOL api_winreg_OpenHKPT(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKPT, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -2041,7 +2041,7 @@ static BOOL api_winreg_OpenHKPN(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKPN, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_wkssvc.c b/source3/librpc/gen_ndr/srv_wkssvc.c index 330bfc457b..3392a42fc6 100644 --- a/source3/librpc/gen_ndr/srv_wkssvc.c +++ b/source3/librpc/gen_ndr/srv_wkssvc.c @@ -35,7 +35,7 @@ static BOOL api_wkssvc_NetWkstaGetInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaGetInfo, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -157,13 +157,13 @@ static BOOL api_wkssvc_NetWkstaEnumUsers(pipes_struct *p) ZERO_STRUCT(r.out); r.out.users = r.in.users; - r.out.entriesread = talloc_size(mem_ctx, sizeof(*r.out.entriesread)); + r.out.entriesread = talloc_zero_size(mem_ctx, sizeof(*r.out.entriesread)); if (r.out.entriesread == NULL) { talloc_free(mem_ctx); return False; } - r.out.totalentries = talloc_size(mem_ctx, sizeof(*r.out.totalentries)); + r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries)); if (r.out.totalentries == NULL) { talloc_free(mem_ctx); return False; @@ -341,7 +341,7 @@ static BOOL api_wkssvc_NetWkstaTransportEnum(pipes_struct *p) ZERO_STRUCT(r.out); r.out.level = r.in.level; r.out.ctr = r.in.ctr; - r.out.totalentries = talloc_size(mem_ctx, sizeof(*r.out.totalentries)); + r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries)); if (r.out.totalentries == NULL) { talloc_free(mem_ctx); return False; |