summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/editreg.c7
-rw-r--r--source3/utils/net_rpc_samsync.c2
2 files changed, 7 insertions, 2 deletions
diff --git a/source3/utils/editreg.c b/source3/utils/editreg.c
index fa930b163a..9123de18c8 100644
--- a/source3/utils/editreg.c
+++ b/source3/utils/editreg.c
@@ -302,6 +302,7 @@ Hope this helps.... (Although it was "fun" for me to uncover this things,
*************************************************************************/
+#ifdef STANDALONE
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
@@ -315,6 +316,10 @@ Hope this helps.... (Although it was "fun" for me to uncover this things,
#define False 0
#define True 1
+#else /* STANDALAONE */
+#include "includes.h"
+#endif /* STANDALONE */
+
#define REG_KEY_LIST_SIZE 10
/*
@@ -1900,7 +1905,7 @@ SEC_DESC *process_sec_desc(REGF *regf, REG_SEC_DESC *sec_desc)
{
SEC_DESC *tmp = NULL;
- tmp = (SEC_DESC *)malloc(sizeof(SEC_DESC));
+ tmp = SMB_MALLOC_P(SEC_DESC);
if (!tmp) {
return NULL;
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index 3c98ec9e71..e8a110d083 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -863,7 +863,7 @@ fetch_alias_mem(uint32 rid, SAM_ALIAS_MEM_INFO *delta, DOM_SID dom_sid)
return NT_STATUS_NO_MEMORY;
}
- nt_members = talloc_zero(t, sizeof(char *) * delta->num_members);
+ nt_members = TALLOC_ZERO_ARRAY(t, char *, delta->num_members);
for (i=0; i<delta->num_members; i++) {
NTSTATUS nt_status;