diff options
author | Jeremy Allison <jra@samba.org> | 2004-12-20 21:14:28 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:42 -0500 |
commit | b46913fb95d59f3ec8e7e71da758cd16cda05f2c (patch) | |
tree | d76c481d3fc054023e3ea37ae4858016bce5636c /source3/utils | |
parent | 84e0aafc78f9d91cde3a6b1c4a57d8ed3b6fd58c (diff) | |
download | samba-b46913fb95d59f3ec8e7e71da758cd16cda05f2c.tar.gz samba-b46913fb95d59f3ec8e7e71da758cd16cda05f2c.tar.bz2 samba-b46913fb95d59f3ec8e7e71da758cd16cda05f2c.zip |
r4291: More *alloc fixes inspired by Albert Chin (china@thewrittenword.com).
Jeremy
(This used to be commit efc1b688cf9b1a17f1a6bf46d481280ed8bd0c46)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/editreg.c | 7 | ||||
-rw-r--r-- | source3/utils/net_rpc_samsync.c | 2 |
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; |