summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/auth/auth_compat.c2
-rw-r--r--source3/auth/auth_ntlmssp.c2
-rw-r--r--source3/auth/auth_server.c2
-rw-r--r--source3/auth/auth_util.c30
-rw-r--r--source3/groupdb/mapping.c2
-rw-r--r--source3/lib/events.c4
-rw-r--r--source3/lib/genrand.c2
-rw-r--r--source3/lib/smbldap_util.c4
-rw-r--r--source3/lib/talloctort.c80
-rw-r--r--source3/lib/username.c2
-rw-r--r--source3/lib/util.c4
-rw-r--r--source3/lib/util_pw.c4
-rw-r--r--source3/lib/util_str.c10
-rw-r--r--source3/libmsrpc/cac_lsarpc.c6
-rw-r--r--source3/libmsrpc/cac_samr.c42
-rw-r--r--source3/libmsrpc/cac_svcctl.c2
-rw-r--r--source3/libmsrpc/cac_winreg.c12
-rw-r--r--source3/libmsrpc/libmsrpc_internal.c14
-rw-r--r--source3/libsmb/libsmbclient.c2
-rw-r--r--source3/libsmb/ntlmssp_sign.c6
-rw-r--r--source3/locking/locking.c14
-rw-r--r--source3/nmbd/nmbd.c2
-rw-r--r--source3/nsswitch/winbindd.c6
-rw-r--r--source3/nsswitch/winbindd_cred_cache.c9
-rw-r--r--source3/nsswitch/winbindd_dual.c6
-rw-r--r--source3/nsswitch/winbindd_ldap.c4
-rw-r--r--source3/nsswitch/winbindd_pam.c2
-rw-r--r--source3/param/loadparm.c4
-rw-r--r--source3/passdb/lookup_sid.c10
-rw-r--r--source3/passdb/passdb.c2
-rw-r--r--source3/passdb/pdb_interface.c4
-rw-r--r--source3/passdb/pdb_ldap.c48
-rw-r--r--source3/passdb/pdb_nds.c2
-rw-r--r--source3/passdb/pdb_smbpasswd.c4
-rw-r--r--source3/passdb/secrets.c22
-rw-r--r--source3/passdb/util_unixsids.c2
-rw-r--r--source3/rpc_parse/parse_misc.c2
-rw-r--r--source3/rpc_server/srv_netlog_nt.c6
-rw-r--r--source3/rpc_server/srv_pipe.c6
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c2
-rw-r--r--source3/rpcclient/cmd_spoolss.c2
-rw-r--r--source3/sam/idmap_ldap.c8
-rw-r--r--source3/smbd/close.c4
-rw-r--r--source3/smbd/conn.c2
-rw-r--r--source3/smbd/lanman.c4
-rw-r--r--source3/smbd/open.c24
-rw-r--r--source3/smbd/oplock.c16
-rw-r--r--source3/smbd/password.c10
-rw-r--r--source3/smbd/process.c16
-rw-r--r--source3/smbd/reply.c10
-rw-r--r--source3/smbd/sec_ctx.c6
-rw-r--r--source3/smbd/server.c2
-rw-r--r--source3/smbd/service.c6
-rw-r--r--source3/smbd/share_access.c4
-rw-r--r--source3/smbd/uid.c4
-rw-r--r--source3/utils/net_rpc_shell.c4
-rw-r--r--source3/utils/ntlm_auth.c8
-rw-r--r--source3/utils/pdbedit.c4
-rw-r--r--source3/utils/smbcontrol.c2
-rw-r--r--source3/utils/smbpasswd.c4
-rw-r--r--source3/web/cgi.c6
61 files changed, 268 insertions, 267 deletions
diff --git a/source3/auth/auth_compat.c b/source3/auth/auth_compat.c
index 28b9de8d43..bd5d7f0229 100644
--- a/source3/auth/auth_compat.c
+++ b/source3/auth/auth_compat.c
@@ -84,7 +84,7 @@ static NTSTATUS pass_check_smb(const char *smb_name,
} else {
nt_status = check_plaintext_password(smb_name, plaintext_password, &server_info);
}
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
return nt_status;
}
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index 2bf86860cc..1d3d17d60d 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -187,7 +187,7 @@ void auth_ntlmssp_end(AUTH_NTLMSSP_STATE **auth_ntlmssp_state)
((*auth_ntlmssp_state)->auth_context->free)(&(*auth_ntlmssp_state)->auth_context);
}
if ((*auth_ntlmssp_state)->server_info) {
- talloc_free((*auth_ntlmssp_state)->server_info);
+ TALLOC_FREE((*auth_ntlmssp_state)->server_info);
}
talloc_destroy(mem_ctx);
*auth_ntlmssp_state = NULL;
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c
index 8eed8bba6a..7bec1b4128 100644
--- a/source3/auth/auth_server.c
+++ b/source3/auth/auth_server.c
@@ -384,7 +384,7 @@ use this machine as the password server.\n"));
real_username, True )) != NULL )
{
nt_status = make_server_info_pw(server_info, pass->pw_name, pass);
- talloc_free(pass);
+ TALLOC_FREE(pass);
}
else
{
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index ad02b24a42..3e7c520fc5 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -522,7 +522,7 @@ static int server_info_dtor(void *p)
}
/***************************************************************************
- Make a server_info struct. Free with talloc_free().
+ Make a server_info struct. Free with TALLOC_FREE().
***************************************************************************/
static auth_serversupplied_info *make_server_info(TALLOC_CTX *mem_ctx)
@@ -565,7 +565,7 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info **server_info,
}
if ( !(result = make_server_info(NULL)) ) {
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
return NT_STATUS_NO_MEMORY;
}
@@ -574,7 +574,7 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info **server_info,
result->gid = pwd->pw_gid;
result->uid = pwd->pw_uid;
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
status = pdb_enum_group_memberships(result, sampass,
&result->sids, &gids,
@@ -584,14 +584,14 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info **server_info,
DEBUG(10, ("pdb_enum_group_memberships failed: %s\n",
nt_errstr(status)));
result->sam_account = NULL; /* Don't free on error exit. */
- talloc_free(result);
+ TALLOC_FREE(result);
return status;
}
/* For now we throw away the gids and convert via sid_to_gid
* later. This needs fixing, but I'd like to get the code straight and
* simple first. */
- talloc_free(gids);
+ TALLOC_FREE(gids);
DEBUG(5,("make_server_info_sam: made server info for user %s -> %s\n",
pdb_get_username(sampass), result->unix_name));
@@ -793,7 +793,7 @@ static struct nt_user_token *create_local_nt_token(TALLOC_CTX *mem_ctx,
talloc_steal(mem_ctx, result);
done:
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return result;
}
@@ -846,7 +846,7 @@ NTSTATUS create_local_token(auth_serversupplied_info *server_info)
status = log_nt_token(mem_ctx, server_info->ptok);
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return status;
}
@@ -1014,7 +1014,7 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
result = NT_STATUS_OK;
done:
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return result;
}
@@ -1052,7 +1052,7 @@ BOOL user_in_group_sid(const char *username, const DOM_SID *group_sid)
result = nt_token_check_sid(group_sid, token);
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
@@ -1072,7 +1072,7 @@ BOOL user_in_group(const char *username, const char *groupname)
ret = lookup_name(mem_ctx, groupname, LOOKUP_NAME_ALL,
NULL, NULL, &group_sid, NULL);
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
if (!ret) {
DEBUG(10, ("lookup_name(%s) failed: %s\n", groupname,
@@ -1182,14 +1182,14 @@ NTSTATUS make_server_info_pw(auth_serversupplied_info **server_info,
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10, ("pdb_enum_group_memberships failed: %s\n",
nt_errstr(status)));
- talloc_free(result);
+ TALLOC_FREE(result);
return status;
}
/* For now we throw away the gids and convert via sid_to_gid
* later. This needs fixing, but I'd like to get the code straight and
* simple first. */
- talloc_free(gids);
+ TALLOC_FREE(gids);
*server_info = result;
@@ -1349,7 +1349,7 @@ static NTSTATUS fill_sam_account(TALLOC_CTX *mem_ctx,
*found_username));
nt_status = pdb_init_sam_pw(sam_account, passwd);
- talloc_free(passwd);
+ TALLOC_FREE(passwd);
return nt_status;
}
@@ -1622,7 +1622,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
info3->gids[i].g_rid)) {
DEBUG(3,("could not append additional group rid "
"0x%x\n", info3->gids[i].g_rid));
- talloc_free(result);
+ TALLOC_FREE(result);
return NT_STATUS_INVALID_PARAMETER;
}
add_sid_to_array(result, &sid, &result->sids,
@@ -1742,7 +1742,7 @@ NT_USER_TOKEN *dup_nt_token(TALLOC_CTX *mem_ctx, NT_USER_TOKEN *ptoken)
if ((ptoken->user_sids != NULL) && (token->user_sids == NULL)) {
DEBUG(0, ("talloc_memdup failed\n"));
- talloc_free(token);
+ TALLOC_FREE(token);
return NULL;
}
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index 07116f41fb..4aa1c627b7 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -1078,7 +1078,7 @@ NTSTATUS pdb_default_create_alias(struct pdb_methods *methods,
exists = lookup_name(mem_ctx, name, LOOKUP_NAME_ISOLATED,
NULL, NULL, &sid, &type);
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
if (exists) {
return NT_STATUS_ALIAS_EXISTS;
diff --git a/source3/lib/events.c b/source3/lib/events.c
index 3670d960aa..133752c78e 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -33,8 +33,8 @@ static int timed_event_destructor(void *p)
}
/****************************************************************************
- Schedule a function for future calling, cancel with talloc_free().
- It's the responsibility of the handler to call talloc_free() on the event
+ Schedule a function for future calling, cancel with TALLOC_FREE().
+ It's the responsibility of the handler to call TALLOC_FREE() on the event
handed to it.
****************************************************************************/
diff --git a/source3/lib/genrand.c b/source3/lib/genrand.c
index 5b643bf297..1897b86818 100644
--- a/source3/lib/genrand.c
+++ b/source3/lib/genrand.c
@@ -121,7 +121,7 @@ static int do_reseed(BOOL use_fd, int fd)
mdfour(md4_tmp, (unsigned char *)pw->pw_passwd, strlen(pw->pw_passwd));
for (i=0;i<16;i++)
seed_inbuf[8+i] ^= md4_tmp[i];
- talloc_free(pw);
+ TALLOC_FREE(pw);
}
/*
diff --git a/source3/lib/smbldap_util.c b/source3/lib/smbldap_util.c
index 7b4cf4d079..64e2a5eae4 100644
--- a/source3/lib/smbldap_util.c
+++ b/source3/lib/smbldap_util.c
@@ -109,7 +109,7 @@ static NTSTATUS add_new_domain_info(struct smbldap_state *ldap_state,
attr_list = get_attr_list( NULL, dominfo_attr_list );
rc = smbldap_search_suffix(ldap_state, filter, attr_list, &result);
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS) {
return NT_STATUS_UNSUCCESSFUL;
@@ -217,7 +217,7 @@ NTSTATUS smbldap_search_domain_info(struct smbldap_state *ldap_state,
attr_list = get_attr_list( NULL, dominfo_attr_list );
rc = smbldap_search_suffix(ldap_state, filter, attr_list , result);
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS) {
DEBUG(2,("Problem during LDAPsearch: %s\n", ldap_err2string (rc)));
diff --git a/source3/lib/talloctort.c b/source3/lib/talloctort.c
index 6504203a7a..de5552b5d0 100644
--- a/source3/lib/talloctort.c
+++ b/source3/lib/talloctort.c
@@ -105,7 +105,7 @@ static BOOL test_ref1(void)
CHECK_BLOCKS(r1, 2);
printf("Freeing p2\n");
- talloc_free(p2);
+ TALLOC_FREE(p2);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 5);
@@ -113,13 +113,13 @@ static BOOL test_ref1(void)
CHECK_BLOCKS(r1, 1);
printf("Freeing p1\n");
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_report_full(root, stdout);
CHECK_BLOCKS(r1, 1);
printf("Freeing r1\n");
- talloc_free(r1);
+ TALLOC_FREE(r1);
talloc_report_full(NULL, stdout);
printf("Testing NULL\n");
@@ -131,7 +131,7 @@ static BOOL test_ref1(void)
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
@@ -161,7 +161,7 @@ static BOOL test_ref2(void)
CHECK_BLOCKS(r1, 2);
printf("Freeing ref\n");
- talloc_free(ref);
+ TALLOC_FREE(ref);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 5);
@@ -169,25 +169,25 @@ static BOOL test_ref2(void)
CHECK_BLOCKS(r1, 1);
printf("Freeing p2\n");
- talloc_free(p2);
+ TALLOC_FREE(p2);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 4);
CHECK_BLOCKS(r1, 1);
printf("Freeing p1\n");
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_report_full(root, stdout);
CHECK_BLOCKS(r1, 1);
printf("Freeing r1\n");
- talloc_free(r1);
+ TALLOC_FREE(r1);
talloc_report_full(root, stdout);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
@@ -213,19 +213,19 @@ static BOOL test_ref3(void)
CHECK_BLOCKS(r1, 1);
printf("Freeing p1\n");
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p2, 2);
CHECK_BLOCKS(r1, 1);
printf("Freeing p2\n");
- talloc_free(p2);
+ TALLOC_FREE(p2);
talloc_report_full(root, stdout);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
@@ -255,25 +255,25 @@ static BOOL test_ref4(void)
CHECK_BLOCKS(r1, 2);
printf("Freeing r1\n");
- talloc_free(r1);
+ TALLOC_FREE(r1);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 5);
CHECK_BLOCKS(p2, 1);
printf("Freeing p2\n");
- talloc_free(p2);
+ TALLOC_FREE(p2);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 4);
printf("Freeing p1\n");
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_report_full(root, stdout);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
@@ -312,12 +312,12 @@ static BOOL test_unlink1(void)
CHECK_BLOCKS(r1, 1);
printf("Freeing p1\n");
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_report_full(root, stdout);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
@@ -352,7 +352,7 @@ static BOOL test_misc(void)
talloc_increase_ref_count(p1);
CHECK_BLOCKS(p1, 1);
CHECK_BLOCKS(root, 2);
- talloc_free(p1);
+ TALLOC_FREE(p1);
CHECK_BLOCKS(p1, 1);
CHECK_BLOCKS(root, 2);
talloc_unlink(NULL, p1);
@@ -367,7 +367,7 @@ static BOOL test_misc(void)
printf("failed: talloc_unlink() of parent should succeed\n");
return False;
}
- talloc_free(p1);
+ TALLOC_FREE(p1);
CHECK_BLOCKS(p1, 1);
CHECK_BLOCKS(root, 2);
@@ -388,13 +388,13 @@ static BOOL test_misc(void)
CHECK_BLOCKS(root, 3);
- if (talloc_free(NULL) != -1) {
- printf("talloc_free(NULL) should give -1\n");
+ if (TALLOC_FREE(NULL) != -1) {
+ printf("TALLOC_FREE(NULL) should give -1\n");
return False;
}
talloc_set_destructor(p1, fail_destructor);
- if (talloc_free(p1) != -1) {
+ if (TALLOC_FREE(p1) != -1) {
printf("Failed destructor should cause talloc_free to fail\n");
return False;
}
@@ -408,7 +408,7 @@ static BOOL test_misc(void)
printf("Failed to give zero memory\n");
return False;
}
- talloc_free(p2);
+ TALLOC_FREE(p2);
if (talloc_strdup(root, NULL) != NULL) {
printf("failed: strdup on NULL should give NULL\n");
@@ -435,7 +435,7 @@ static BOOL test_misc(void)
}
CHECK_BLOCKS(p2, 1);
CHECK_BLOCKS(p1, 3);
- talloc_free(p2);
+ TALLOC_FREE(p2);
d = talloc_array(p1, double, 0x20000000);
if (d) {
@@ -449,7 +449,7 @@ static BOOL test_misc(void)
return False;
}
- talloc_free(p1);
+ TALLOC_FREE(p1);
CHECK_BLOCKS(root, 1);
p1 = talloc_named(root, 100, "%d bytes", 100);
@@ -500,7 +500,7 @@ static BOOL test_misc(void)
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
CHECK_SIZE(NULL, 0);
@@ -564,7 +564,7 @@ static BOOL test_realloc(void)
CHECK_BLOCKS(root, 1);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
@@ -609,7 +609,7 @@ static BOOL test_realloc_child(void)
el1->list2 = talloc_realloc(el1, el1->list2, struct el2 *, 200);
el1->list3 = talloc_realloc(el1, el1->list3, struct el2 *, 300);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
@@ -651,7 +651,7 @@ static BOOL test_type(void)
return False;
}
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
@@ -691,21 +691,21 @@ static BOOL test_steal(void)
CHECK_BLOCKS(root, 1);
CHECK_SIZE(root, 0);
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_steal(root, p2);
CHECK_BLOCKS(root, 2);
CHECK_SIZE(root, 20);
- talloc_free(p2);
+ TALLOC_FREE(p2);
CHECK_BLOCKS(root, 1);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
p1 = talloc_size(NULL, 3);
CHECK_SIZE(NULL, 3);
- talloc_free(p1);
+ TALLOC_FREE(p1);
return True;
}
@@ -731,7 +731,7 @@ static BOOL test_realloc_fn(void)
CHECK_BLOCKS(root, 1);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
@@ -751,13 +751,13 @@ static BOOL test_unref_reparent(void)
c1 = talloc_named_const(p1, 1, "child");
talloc_reference(p2, c1);
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_unlink(p2, c1);
CHECK_SIZE(root, 1);
- talloc_free(p2);
- talloc_free(root);
+ TALLOC_FREE(p2);
+ TALLOC_FREE(root);
return True;
}
@@ -780,13 +780,13 @@ static BOOL test_speed(void)
p1 = talloc_size(ctx, count);
p2 = talloc_strdup(p1, "foo bar");
p3 = talloc_size(p1, 300);
- talloc_free(p1);
+ TALLOC_FREE(p1);
count += 3;
} while (timeval_elapsed(&tv) < 5.0);
printf("talloc: %.0f ops/sec\n", count/timeval_elapsed(&tv));
- talloc_free(ctx);
+ TALLOC_FREE(ctx);
tv = timeval_current();
count = 0;
diff --git a/source3/lib/username.c b/source3/lib/username.c
index 52994557f7..3dcf9e18cc 100644
--- a/source3/lib/username.c
+++ b/source3/lib/username.c
@@ -161,7 +161,7 @@ struct passwd *Get_Pwnam(const char *user)
*/
if (Get_Pwnam_ret) {
- talloc_free(Get_Pwnam_ret);
+ TALLOC_FREE(Get_Pwnam_ret);
}
Get_Pwnam_ret = ret;
diff --git a/source3/lib/util.c b/source3/lib/util.c
index dc57839df3..d4443a6480 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1430,7 +1430,7 @@ const char *uidtoname(uid_t uid)
pass = getpwuid_alloc(NULL, uid);
if (pass) {
fstrcpy(name, pass->pw_name);
- talloc_free(pass);
+ TALLOC_FREE(pass);
} else {
slprintf(name, sizeof(name) - 1, "%ld",(long int)uid);
}
@@ -1467,7 +1467,7 @@ uid_t nametouid(const char *name)
pass = getpwnam_alloc(NULL, name);
if (pass) {
u = pass->pw_uid;
- talloc_free(pass);
+ TALLOC_FREE(pass);
return u;
}
diff --git a/source3/lib/util_pw.c b/source3/lib/util_pw.c
index e026affb44..e632846312 100644
--- a/source3/lib/util_pw.c
+++ b/source3/lib/util_pw.c
@@ -55,7 +55,7 @@ static void init_pwnam_cache(void)
void flush_pwnam_cache(void)
{
- talloc_free(pwnam_cache);
+ TALLOC_FREE(pwnam_cache);
pwnam_cache = NULL;
init_pwnam_cache();
}
@@ -96,7 +96,7 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
i = rand() % PWNAMCACHE_SIZE;
if (pwnam_cache[i] != NULL) {
- talloc_free(pwnam_cache[i]);
+ TALLOC_FREE(pwnam_cache[i]);
}
pwnam_cache[i] = talloc_copy_passwd(pwnam_cache, temp);
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 957ebd57bd..e4aa5dbd51 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -1704,7 +1704,7 @@ static char **str_list_make_internal(TALLOC_CTX *mem_ctx, const char *string, co
DEBUG(0,("str_list_make: Unable to allocate memory"));
str_list_free(&list);
if (mem_ctx) {
- talloc_free(s);
+ TALLOC_FREE(s);
} else {
SAFE_FREE(s);
}
@@ -1724,7 +1724,7 @@ static char **str_list_make_internal(TALLOC_CTX *mem_ctx, const char *string, co
DEBUG(0,("str_list_make: Unable to allocate memory"));
str_list_free(&list);
if (mem_ctx) {
- talloc_free(s);
+ TALLOC_FREE(s);
} else {
SAFE_FREE(s);
}
@@ -1735,7 +1735,7 @@ static char **str_list_make_internal(TALLOC_CTX *mem_ctx, const char *string, co
}
if (mem_ctx) {
- talloc_free(s);
+ TALLOC_FREE(s);
} else {
SAFE_FREE(s);
}
@@ -1823,13 +1823,13 @@ static void str_list_free_internal(TALLOC_CTX *mem_ctx, char ***list)
tlist = *list;
for(; *tlist; tlist++) {
if (mem_ctx) {
- talloc_free(*tlist);
+ TALLOC_FREE(*tlist);
} else {
SAFE_FREE(*tlist);
}
}
if (mem_ctx) {
- talloc_free(*tlist);
+ TALLOC_FREE(*tlist);
} else {
SAFE_FREE(*list);
}
diff --git a/source3/libmsrpc/cac_lsarpc.c b/source3/libmsrpc/cac_lsarpc.c
index b157f33c69..bfd58ed1ec 100644
--- a/source3/libmsrpc/cac_lsarpc.c
+++ b/source3/libmsrpc/cac_lsarpc.c
@@ -424,7 +424,7 @@ int cac_LsaFetchSid(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaFetchSi
op->out.local_sid->domain = dom_name;
sid_copy(&op->out.local_sid->sid, local_sid);
- talloc_free(local_sid);
+ TALLOC_FREE(local_sid);
}
domain:
@@ -453,7 +453,7 @@ domain:
op->out.domain_sid->domain = dom_name;
sid_copy(&op->out.domain_sid->sid, domain_sid);
- talloc_free(domain_sid);
+ TALLOC_FREE(domain_sid);
}
done:
@@ -816,7 +816,7 @@ int cac_LsaOpenAccount(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaOpen
hnd->status = rpccli_lsa_open_account(pipe_hnd, mem_ctx, op->in.pol, op->in.sid, op->in.access, user_pol);
if(!NT_STATUS_IS_OK(hnd->status)) {
- talloc_free(user_pol);
+ TALLOC_FREE(user_pol);
return CAC_FAILURE;
}
diff --git a/source3/libmsrpc/cac_samr.c b/source3/libmsrpc/cac_samr.c
index bf34ec55b8..7f39e76813 100644
--- a/source3/libmsrpc/cac_samr.c
+++ b/source3/libmsrpc/cac_samr.c
@@ -300,7 +300,7 @@ int cac_SamOpenUser(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamOpenUse
return CAC_FAILURE;
}
- talloc_free(rid_types);
+ TALLOC_FREE(rid_types);
}
else {
@@ -518,8 +518,8 @@ int cac_SamGetNamesFromRids(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct Sa
map_out[i].rid = op->in.rids[i];
}
- talloc_free(names_out);
- talloc_free(name_types_out);
+ TALLOC_FREE(names_out);
+ TALLOC_FREE(name_types_out);
op->out.num_names = num_names_out;
op->out.map = map_out;
@@ -602,8 +602,8 @@ int cac_SamGetRidsFromNames(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct Sa
op->out.num_rids = num_rids_out;
op->out.map = map_out;
- talloc_free(rids_out);
- talloc_free(rid_types_out);
+ TALLOC_FREE(rids_out);
+ TALLOC_FREE(rid_types_out);
if(NT_STATUS_EQUAL(hnd->status, STATUS_SOME_UNMAPPED))
return CAC_PARTIAL_SUCCESS;
@@ -665,7 +665,7 @@ int cac_SamGetGroupsForUser(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct Sa
attr_out[i] = groups[i].attr;
}
- talloc_free(groups);
+ TALLOC_FREE(groups);
op->out.num_groups = num_groups_out;
op->out.rids = rids_out;
@@ -941,7 +941,7 @@ int cac_SamClearGroupMembers(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_H
result = CAC_FAILURE;
}
- talloc_free(attr);
+ TALLOC_FREE(attr);
return result;
}
@@ -1040,24 +1040,24 @@ int cac_SamEnumGroups(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamEnumG
names_out = talloc_array(mem_ctx, char *, num_groups_out);
if(!names_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(acct_buf);
+ TALLOC_FREE(acct_buf);
return CAC_FAILURE;
}
desc_out = talloc_array(mem_ctx, char *, num_groups_out);
if(!desc_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(acct_buf);
- talloc_free(names_out);
+ TALLOC_FREE(acct_buf);
+ TALLOC_FREE(names_out);
return CAC_FAILURE;
}
rids_out = talloc_array(mem_ctx, uint32, num_groups_out);
if(!rids_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(acct_buf);
- talloc_free(names_out);
- talloc_free(desc_out);
+ TALLOC_FREE(acct_buf);
+ TALLOC_FREE(names_out);
+ TALLOC_FREE(desc_out);
return CAC_FAILURE;
}
@@ -1135,24 +1135,24 @@ int cac_SamEnumAliases(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamEnum
names_out = talloc_array(mem_ctx, char *, num_als_out);
if(!names_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(acct_buf);
+ TALLOC_FREE(acct_buf);
return CAC_FAILURE;
}
desc_out = talloc_array(mem_ctx, char *, num_als_out);
if(!desc_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(acct_buf);
- talloc_free(names_out);
+ TALLOC_FREE(acct_buf);
+ TALLOC_FREE(names_out);
return CAC_FAILURE;
}
rids_out = talloc_array(mem_ctx, uint32, num_als_out);
if(!rids_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(acct_buf);
- talloc_free(names_out);
- talloc_free(desc_out);
+ TALLOC_FREE(acct_buf);
+ TALLOC_FREE(names_out);
+ TALLOC_FREE(desc_out);
return CAC_FAILURE;
}
@@ -1438,7 +1438,7 @@ int cac_SamClearAliasMembers(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_H
result = CAC_FAILURE;
}
- talloc_free(sid);
+ TALLOC_FREE(sid);
return result;
}
@@ -2405,7 +2405,7 @@ int cac_SamFlush(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamFlush *op)
/*this function does not use an output parameter to make it as convenient as possible to use*/
*op->in.dom_hnd = *od.out.dom_hnd;
- talloc_free(od.out.dom_hnd);
+ TALLOC_FREE(od.out.dom_hnd);
return CAC_SUCCESS;
}
diff --git a/source3/libmsrpc/cac_svcctl.c b/source3/libmsrpc/cac_svcctl.c
index 2651be64ab..83dc036493 100644
--- a/source3/libmsrpc/cac_svcctl.c
+++ b/source3/libmsrpc/cac_svcctl.c
@@ -154,7 +154,7 @@ int cac_SvcEnumServices(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SvcEnu
return CAC_FAILURE;
}
- talloc_free(svc_buf);
+ TALLOC_FREE(svc_buf);
op->out.num_services = num_svc_out;
diff --git a/source3/libmsrpc/cac_winreg.c b/source3/libmsrpc/cac_winreg.c
index 1d60cc8fb2..4c24671a38 100644
--- a/source3/libmsrpc/cac_winreg.c
+++ b/source3/libmsrpc/cac_winreg.c
@@ -244,15 +244,15 @@ int cac_RegEnumKeys(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegEnumKey
class_names_out = TALLOC_ARRAY(mem_ctx, char *, op->in.max_keys);
if(!class_names_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(key_names_out);
+ TALLOC_FREE(key_names_out);
return CAC_FAILURE;
}
mod_times_out = TALLOC_ARRAY(mem_ctx, time_t, op->in.max_keys);
if(!mod_times_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(key_names_out);
- talloc_free(class_names_out);
+ TALLOC_FREE(key_names_out);
+ TALLOC_FREE(class_names_out);
return CAC_FAILURE;
}
@@ -675,15 +675,15 @@ int cac_RegEnumValues(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegEnumV
values_out = talloc_array(mem_ctx, REG_VALUE_DATA *, op->in.max_values);
if(!values_out) {
- talloc_free(types_out);
+ TALLOC_FREE(types_out);
hnd->status = NT_STATUS_NO_MEMORY;
return CAC_FAILURE;
}
val_names_out = talloc_array(mem_ctx, char *, op->in.max_values);
if(!val_names_out) {
- talloc_free(types_out);
- talloc_free(values_out);
+ TALLOC_FREE(types_out);
+ TALLOC_FREE(values_out);
hnd->status = NT_STATUS_NO_MEMORY;
return CAC_FAILURE;
}
diff --git a/source3/libmsrpc/libmsrpc_internal.c b/source3/libmsrpc/libmsrpc_internal.c
index 6a524cdb03..b52bd0d788 100644
--- a/source3/libmsrpc/libmsrpc_internal.c
+++ b/source3/libmsrpc/libmsrpc_internal.c
@@ -163,12 +163,12 @@ RPC_DATA_BLOB *cac_MakeRpcDataBlob(TALLOC_CTX *mem_ctx, uint32 data_type, REG_VA
break;
default:
- talloc_free(blob);
+ TALLOC_FREE(blob);
blob = NULL;
}
if(!(blob->buffer)) {
- talloc_free(blob);
+ TALLOC_FREE(blob);
return NULL;
}
@@ -226,7 +226,7 @@ REG_VALUE_DATA *cac_MakeRegValueData(TALLOC_CTX *mem_ctx, uint32 data_type, REGV
case REG_SZ:
data->reg_sz = cac_unistr_to_str(mem_ctx, buf.buffer, buf.buf_len);
if(!data->reg_sz) {
- talloc_free(data);
+ TALLOC_FREE(data);
errno = ENOMEM;
data = NULL;
}
@@ -237,7 +237,7 @@ REG_VALUE_DATA *cac_MakeRegValueData(TALLOC_CTX *mem_ctx, uint32 data_type, REGV
data->reg_expand_sz = cac_unistr_to_str(mem_ctx, buf.buffer, buf.buf_len);
if(!data->reg_expand_sz) {
- talloc_free(data);
+ TALLOC_FREE(data);
errno = ENOMEM;
data = NULL;
}
@@ -251,7 +251,7 @@ REG_VALUE_DATA *cac_MakeRegValueData(TALLOC_CTX *mem_ctx, uint32 data_type, REGV
data->reg_binary.data = talloc_memdup(mem_ctx, buf.buffer, size);
if(!data->reg_binary.data) {
- talloc_free(data);
+ TALLOC_FREE(data);
errno = ENOMEM;
data = NULL;
}
@@ -281,7 +281,7 @@ REG_VALUE_DATA *cac_MakeRegValueData(TALLOC_CTX *mem_ctx, uint32 data_type, REGV
strings = talloc_array(mem_ctx, char *, num_strings);
if(!strings) {
errno = ENOMEM;
- talloc_free(data);
+ TALLOC_FREE(data);
break;
}
@@ -313,7 +313,7 @@ REG_VALUE_DATA *cac_MakeRegValueData(TALLOC_CTX *mem_ctx, uint32 data_type, REGV
break;
default:
- talloc_free(data);
+ TALLOC_FREE(data);
data = NULL;
}
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index 649cd8b372..7cbe4a639b 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -2469,7 +2469,7 @@ done:
cli_rpc_pipe_close(pipe_hnd);
/* Free all memory which was allocated for this request */
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
/* Tell 'em if it worked */
return W_ERROR_IS_OK(result) ? 0 : -1;
diff --git a/source3/libsmb/ntlmssp_sign.c b/source3/libsmb/ntlmssp_sign.c
index 42ed0f9418..10921d56e7 100644
--- a/source3/libsmb/ntlmssp_sign.c
+++ b/source3/libsmb/ntlmssp_sign.c
@@ -339,7 +339,7 @@ NTSTATUS ntlmssp_sign_init(NTLMSSP_STATE *ntlmssp_state)
debug_ntlmssp_flags(ntlmssp_state->neg_flags);
if (ntlmssp_state->session_key.length < 8) {
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
DEBUG(3, ("NO session key, cannot intialise signing\n"));
return NT_STATUS_NO_USER_SESSION_KEY;
}
@@ -365,7 +365,7 @@ NTSTATUS ntlmssp_sign_init(NTLMSSP_STATE *ntlmssp_state)
recv_seal_const = CLI_SEAL;
break;
default:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return NT_STATUS_INTERNAL_ERROR;
}
@@ -464,6 +464,6 @@ NTSTATUS ntlmssp_sign_init(NTLMSSP_STATE *ntlmssp_state)
ntlmssp_state->ntlmv1_seq_num = 0;
}
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return NT_STATUS_OK;
}
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index d157c30c82..076f8a4969 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -681,7 +681,7 @@ struct share_mode_lock *get_share_mode_lock(TALLOC_CTX *mem_ctx,
if (tdb_chainlock(tdb, key) != 0) {
DEBUG(3, ("Could not lock share entry\n"));
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NULL;
}
@@ -697,20 +697,20 @@ struct share_mode_lock *get_share_mode_lock(TALLOC_CTX *mem_ctx,
if (lck->fresh) {
if (fname == NULL || servicepath == NULL) {
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NULL;
}
lck->filename = talloc_strdup(lck, fname);
lck->servicepath = talloc_strdup(lck, servicepath);
if (lck->filename == NULL || lck->servicepath == NULL) {
DEBUG(0, ("talloc failed\n"));
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NULL;
}
} else {
if (!parse_share_modes(data, lck)) {
DEBUG(0, ("Could not parse share modes\n"));
- talloc_free(lck);
+ TALLOC_FREE(lck);
SAFE_FREE(data.dptr);
return NULL;
}
@@ -814,7 +814,7 @@ BOOL get_delete_on_close_flag(SMB_DEV_T dev, SMB_INO_T inode)
return False;
}
result = lck->delete_on_close;
- talloc_free(lck);
+ TALLOC_FREE(lck);
return result;
}
@@ -1142,7 +1142,7 @@ void set_delete_on_close_token(struct share_mode_lock *lck, UNIX_USER_TOKEN *tok
{
/* Ensure there's no token. */
if (lck->delete_token) {
- talloc_free(lck->delete_token); /* Also deletes groups... */
+ TALLOC_FREE(lck->delete_token); /* Also deletes groups... */
lck->delete_token = NULL;
}
@@ -1195,7 +1195,7 @@ BOOL set_delete_on_close(files_struct *fsp, BOOL delete_on_close, UNIX_USER_TOKE
lck->modified = True;
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
return True;
}
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index f69cc32ff6..38183159a2 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -607,7 +607,7 @@ static void process(void)
return;
/* free up temp memory */
- lp_talloc_free();
+ lp_TALLOC_FREE();
}
}
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index 4a269bac17..8314c65c64 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -692,7 +692,7 @@ static void remove_client(struct winbindd_cli_state *state)
/* Remove from list and free */
winbindd_remove_client(state);
- talloc_free(state);
+ TALLOC_FREE(state);
}
}
@@ -751,8 +751,8 @@ static void process_loop(void)
/* Free up temporary memory */
- lp_talloc_free();
- main_loop_talloc_free();
+ lp_TALLOC_FREE();
+ main_loop_TALLOC_FREE();
/* Initialise fd lists for select() */
diff --git a/source3/nsswitch/winbindd_cred_cache.c b/source3/nsswitch/winbindd_cred_cache.c
index a8aab04031..991718fb26 100644
--- a/source3/nsswitch/winbindd_cred_cache.c
+++ b/source3/nsswitch/winbindd_cred_cache.c
@@ -73,8 +73,9 @@ NTSTATUS remove_ccache_by_ccname(const char *ccname)
for (entry = ccache_list; entry; entry = entry->next) {
if (strequal(entry->ccname, ccname)) {
DLIST_REMOVE(ccache_list, entry);
- talloc_free(entry->event); /* unregisters events */
- return talloc_free(entry) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+ TALLOC_FREE(entry->event); /* unregisters events */
+ TALLOC_FREE(entry);
+ return NT_STATUS_OK;
}
}
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
@@ -94,7 +95,7 @@ static void krb5_ticket_refresh_handler(struct timed_event *te,
DEBUG(10,("krb5_ticket_refresh_handler called\n"));
DEBUGADD(10,("event called for: %s, %s\n", entry->ccname, entry->username));
- talloc_free(entry->event);
+ TALLOC_FREE(entry->event);
#ifdef HAVE_KRB5
@@ -117,7 +118,7 @@ static void krb5_ticket_refresh_handler(struct timed_event *te,
if (ret) {
DEBUG(3,("could not re-kinit: %s\n", error_message(ret)));
- talloc_free(entry->event);
+ TALLOC_FREE(entry->event);
return;
}
diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c
index 56a7afec9f..7864254c46 100644
--- a/source3/nsswitch/winbindd_dual.c
+++ b/source3/nsswitch/winbindd_dual.c
@@ -509,7 +509,7 @@ static void account_lockout_policy_handler(struct timed_event *te,
DEBUG(10,("account_lockout_policy_handler called\n"));
if (child->timed_event) {
- talloc_free(child->timed_event);
+ TALLOC_FREE(child->timed_event);
}
methods = child->domain->methods;
@@ -675,8 +675,8 @@ static BOOL fork_domain_child(struct winbindd_child *child)
struct timeval now;
/* free up any talloc memory */
- lp_talloc_free();
- main_loop_talloc_free();
+ lp_TALLOC_FREE();
+ main_loop_TALLOC_FREE();
run_events();
diff --git a/source3/nsswitch/winbindd_ldap.c b/source3/nsswitch/winbindd_ldap.c
index 736d852a74..cd0214ff45 100644
--- a/source3/nsswitch/winbindd_ldap.c
+++ b/source3/nsswitch/winbindd_ldap.c
@@ -445,8 +445,8 @@ static void process_ldap_loop(void)
/* Free up temporary memory */
- lp_talloc_free();
- main_loop_talloc_free();
+ lp_TALLOC_FREE();
+ main_loop_TALLOC_FREE();
if (do_sigterm) {
#if 0
diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c
index 47b8d7bbd5..3f0b7f07aa 100644
--- a/source3/nsswitch/winbindd_pam.c
+++ b/source3/nsswitch/winbindd_pam.c
@@ -1265,7 +1265,7 @@ done:
strlen(state->response.extra_data)+1;
no_token:
- talloc_free(afsname);
+ TALLOC_FREE(afsname);
}
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index c1cac6b966..b44fcfbd91 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -1665,11 +1665,11 @@ static TALLOC_CTX *lp_talloc;
Free up temporary memory - called from the main loop.
********************************************************************/
-void lp_talloc_free(void)
+void lp_TALLOC_FREE(void)
{
if (!lp_talloc)
return;
- talloc_free(lp_talloc);
+ TALLOC_FREE(lp_talloc);
lp_talloc = NULL;
}
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index 6266aa9cab..f6eb1e7baa 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -265,13 +265,13 @@ BOOL lookup_name(TALLOC_CTX *mem_ctx,
}
failed:
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return False;
ok:
if ((domain == NULL) || (name == NULL)) {
DEBUG(0, ("talloc failed\n"));
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return False;
}
@@ -293,7 +293,7 @@ BOOL lookup_name(TALLOC_CTX *mem_ctx,
*ret_type = type;
}
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return True;
}
@@ -746,7 +746,7 @@ NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
result = NT_STATUS_OK;
done:
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return result;
}
@@ -802,7 +802,7 @@ BOOL lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
DEBUG(10, ("failed to lookup sid %s\n",
sid_string_static(sid)));
}
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return ret;
}
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index a50afb6bb8..97cccbf2a5 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -484,7 +484,7 @@ NTSTATUS pdb_init_sam_new(SAM_ACCOUNT **new_sam_acct, const char *username)
pdb_free_sam(new_sam_acct);
}
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index f42ff3a725..e2035296cc 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -1380,7 +1380,7 @@ static BOOL pdb_default_sid_to_id(struct pdb_methods *methods,
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return ret;
}
@@ -1531,7 +1531,7 @@ NTSTATUS pdb_default_enum_group_memberships(struct pdb_methods *methods,
*pp_sids = TALLOC_ARRAY(mem_ctx, DOM_SID, *p_num_groups);
if (*pp_sids == NULL) {
- talloc_free(*pp_gids);
+ TALLOC_FREE(*pp_gids);
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 24a7304f87..9abd668d6f 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -1353,7 +1353,7 @@ static NTSTATUS ldapsam_setsampwent(struct pdb_methods *my_methods, BOOL update,
attr_list = get_userattr_list(NULL, ldap_state->schema_ver);
rc = smbldap_search(ldap_state->smbldap_state, suffix, LDAP_SCOPE_SUBTREE, filter,
attr_list, 0, &ldap_state->result);
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS) {
DEBUG(0, ("ldapsam_setsampwent: LDAP search failed: %s\n", ldap_err2string(rc)));
@@ -1454,7 +1454,7 @@ static NTSTATUS ldapsam_getsampwnam(struct pdb_methods *my_methods, SAM_ACCOUNT
append_attr(user->mem_ctx, &attr_list, "uidNumber");
rc = ldapsam_search_suffix_by_name(ldap_state, sname, &result,
attr_list);
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if ( rc != LDAP_SUCCESS )
return NT_STATUS_NO_SUCH_USER;
@@ -1511,7 +1511,7 @@ static int ldapsam_get_ldap_user_by_sid(struct ldapsam_privates *ldap_state,
append_attr(tmp_ctx, &attr_list, "uidNumber");
rc = ldapsam_search_suffix_by_sid(ldap_state, sid,
result, attr_list);
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
if ( rc != LDAP_SUCCESS )
return rc;
@@ -1526,7 +1526,7 @@ static int ldapsam_get_ldap_user_by_sid(struct ldapsam_privates *ldap_state,
attr_list = get_userattr_list(NULL,
ldap_state->schema_ver);
rc = ldapsam_search_suffix_by_rid(ldap_state, rid, result, attr_list );
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if ( rc != LDAP_SUCCESS )
return rc;
@@ -1783,7 +1783,7 @@ static NTSTATUS ldapsam_delete_sam_account(struct pdb_methods *my_methods,
NT_STATUS_OK : NT_STATUS_ACCESS_DENIED;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
@@ -1817,7 +1817,7 @@ static NTSTATUS ldapsam_update_sam_account(struct pdb_methods *my_methods, SAM_A
if (!result) {
attr_list = get_userattr_list(NULL, ldap_state->schema_ver);
rc = ldapsam_search_suffix_by_name(ldap_state, pdb_get_username(newpwd), &result, attr_list );
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS) {
return NT_STATUS_UNSUCCESSFUL;
}
@@ -1959,7 +1959,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO
rc = ldapsam_search_suffix_by_name (ldap_state, username, &result, attr_list);
if (rc != LDAP_SUCCESS) {
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
return NT_STATUS_UNSUCCESSFUL;
}
@@ -1967,7 +1967,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO
DEBUG(0,("ldapsam_add_sam_account: User '%s' already in the base, with samba attributes\n",
username));
ldap_msgfree(result);
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
return NT_STATUS_UNSUCCESSFUL;
}
ldap_msgfree(result);
@@ -1980,7 +1980,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO
if (ldap_count_entries(ldap_state->smbldap_state->ldap_struct, result) != 0) {
DEBUG(0,("ldapsam_add_sam_account: SID '%s' already in the base, with samba attributes\n",
sid_to_string(sid_string, sid)));
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
ldap_msgfree(result);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -1999,7 +1999,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO
rc = smbldap_search_suffix(ldap_state->smbldap_state,
filter, attr_list, &result);
if ( rc != LDAP_SUCCESS ) {
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
return NT_STATUS_UNSUCCESSFUL;
}
@@ -2007,7 +2007,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO
if (num_result > 1) {
DEBUG (0, ("ldapsam_add_sam_account: More than one user with that uid exists: bailing out!\n"));
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
ldap_msgfree(result);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -2021,7 +2021,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO
entry = ldap_first_entry (ldap_state->smbldap_state->ldap_struct, result);
tmp = smbldap_get_dn (ldap_state->smbldap_state->ldap_struct, entry);
if (!tmp) {
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
ldap_msgfree(result);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -2047,7 +2047,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO
filter, attr_list, &result);
if ( rc != LDAP_SUCCESS ) {
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
return NT_STATUS_UNSUCCESSFUL;
}
@@ -2055,7 +2055,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO
if (num_result > 1) {
DEBUG (0, ("ldapsam_add_sam_account: More than one user with that uid exists: bailing out!\n"));
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
ldap_msgfree(result);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -2069,7 +2069,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO
entry = ldap_first_entry (ldap_state->smbldap_state->ldap_struct, result);
tmp = smbldap_get_dn (ldap_state->smbldap_state->ldap_struct, entry);
if (!tmp) {
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
ldap_msgfree(result);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -2078,7 +2078,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO
}
}
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (num_result == 0) {
/* Check if we need to add an entry */
@@ -2147,7 +2147,7 @@ static int ldapsam_search_one_group (struct ldapsam_privates *ldap_state,
rc = smbldap_search(ldap_state->smbldap_state,
lp_ldap_group_suffix (), scope,
filter, attr_list, 0, result);
- talloc_free(attr_list);
+ TALLOC_FREE(attr_list);
return rc;
}
@@ -2862,7 +2862,7 @@ static NTSTATUS ldapsam_add_group_mapping_entry(struct pdb_methods *methods,
NT_STATUS_OK : NT_STATUS_ACCESS_DENIED;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
@@ -2950,7 +2950,7 @@ static NTSTATUS ldapsam_update_group_mapping_entry(struct pdb_methods *methods,
result = NT_STATUS_OK;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
@@ -3029,7 +3029,7 @@ static NTSTATUS ldapsam_delete_group_mapping_entry(struct pdb_methods *methods,
result = (rc == LDAP_SUCCESS) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
@@ -3050,7 +3050,7 @@ static NTSTATUS ldapsam_setsamgrent(struct pdb_methods *my_methods,
rc = smbldap_search(ldap_state->smbldap_state, lp_ldap_group_suffix(),
LDAP_SCOPE_SUBTREE, filter,
attr_list, 0, &ldap_state->result);
- talloc_free(attr_list);
+ TALLOC_FREE(attr_list);
if (rc != LDAP_SUCCESS) {
DEBUG(0, ("ldapsam_setsamgrent: LDAP search failed: %s\n",
@@ -3871,7 +3871,7 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
result = (num_mapped == num_rids) ?
NT_STATUS_OK : STATUS_SOME_UNMAPPED;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
@@ -4495,7 +4495,7 @@ static NTSTATUS ldapsam_get_new_rid(struct ldapsam_privates *priv,
*rid = nextRid;
}
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return status;
}
@@ -4605,7 +4605,7 @@ static BOOL ldapsam_sid_to_id(struct pdb_methods *methods,
ret = True;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return ret;
}
diff --git a/source3/passdb/pdb_nds.c b/source3/passdb/pdb_nds.c
index d5636d6812..4bbdeb4dbb 100644
--- a/source3/passdb/pdb_nds.c
+++ b/source3/passdb/pdb_nds.c
@@ -774,7 +774,7 @@ static NTSTATUS pdb_nds_update_login_attempts(struct pdb_methods *methods,
attr_list = get_userattr_list(NULL,
ldap_state->schema_ver);
rc = ldapsam_search_suffix_by_name(ldap_state, username, &result, attr_list );
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS) {
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index 7839860bf4..1837b4fcee 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -1161,7 +1161,7 @@ static BOOL build_smb_pass (struct smb_passwd *smb_pw, const SAM_ACCOUNT *sampas
return False;
}
smb_pw->smb_userid=passwd->pw_uid;
- talloc_free(passwd);
+ TALLOC_FREE(passwd);
} else if (algorithmic_pdb_rid_is_user(rid)) {
smb_pw->smb_userid=algorithmic_pdb_user_rid_to_uid(rid);
} else {
@@ -1206,7 +1206,7 @@ static BOOL build_sam_account(struct smbpasswd_privates *smbpasswd_state,
if (!NT_STATUS_IS_OK(pdb_fill_sam_pw(sam_pass, pwfile)))
return False;
- talloc_free(pwfile);
+ TALLOC_FREE(pwfile);
/* set remaining fields */
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index ece17cc718..bb4aad9fac 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -892,7 +892,7 @@ static TDB_CONTEXT *open_schannel_session_store(TALLOC_CTX *mem_ctx)
if (!tdb_sc) {
DEBUG(0,("open_schannel_session_store: Failed to open %s\n", fname));
- talloc_free(fname);
+ TALLOC_FREE(fname);
return NULL;
}
@@ -920,7 +920,7 @@ static TDB_CONTEXT *open_schannel_session_store(TALLOC_CTX *mem_ctx)
}
SAFE_FREE(vers.dptr);
- talloc_free(fname);
+ TALLOC_FREE(fname);
return tdb_sc;
}
@@ -959,7 +959,7 @@ BOOL secrets_store_schannel_session_info(TALLOC_CTX *mem_ctx,
value.dptr = TALLOC(mem_ctx, value.dsize);
if (!value.dptr) {
- talloc_free(keystr);
+ TALLOC_FREE(keystr);
return False;
}
@@ -976,8 +976,8 @@ BOOL secrets_store_schannel_session_info(TALLOC_CTX *mem_ctx,
tdb_sc = open_schannel_session_store(mem_ctx);
if (!tdb_sc) {
- talloc_free(keystr);
- talloc_free(value.dptr);
+ TALLOC_FREE(keystr);
+ TALLOC_FREE(value.dptr);
return False;
}
@@ -987,8 +987,8 @@ BOOL secrets_store_schannel_session_info(TALLOC_CTX *mem_ctx,
keystr ));
tdb_close(tdb_sc);
- talloc_free(keystr);
- talloc_free(value.dptr);
+ TALLOC_FREE(keystr);
+ TALLOC_FREE(value.dptr);
return ret;
}
@@ -1024,7 +1024,7 @@ BOOL secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx,
tdb_sc = open_schannel_session_store(mem_ctx);
if (!tdb_sc) {
- talloc_free(keystr);
+ TALLOC_FREE(keystr);
return False;
}
@@ -1055,8 +1055,8 @@ BOOL secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx,
if (ret == -1 || l1 != 8 || l2 != 8 || l3 != 8 || l4 != 16 || l5 != 16) {
/* Bad record - delete it. */
tdb_delete_bystring(tdb_sc, keystr);
- talloc_free(keystr);
- talloc_free(pdc);
+ TALLOC_FREE(keystr);
+ TALLOC_FREE(pdc);
SAFE_FREE(pseed_chal);
SAFE_FREE(pclnt_chal);
SAFE_FREE(psrv_chal);
@@ -1085,7 +1085,7 @@ BOOL secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx,
SAFE_FREE(psess_key);
SAFE_FREE(pmach_pw);
- talloc_free(keystr);
+ TALLOC_FREE(keystr);
SAFE_FREE(value.dptr);
*ppdc = pdc;
diff --git a/source3/passdb/util_unixsids.c b/source3/passdb/util_unixsids.c
index ee8cf2d8f0..2a4818e3ae 100644
--- a/source3/passdb/util_unixsids.c
+++ b/source3/passdb/util_unixsids.c
@@ -53,7 +53,7 @@ BOOL lookup_unix_user_name(const char *name, DOM_SID *sid)
sid_copy(sid, &global_sid_Unix_Users);
sid_append_rid(sid, pwd->pw_uid); /* For 64-bit uid's we have enough
* space ... */
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
return True;
}
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index bc1eda8d04..5973deefd0 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -49,7 +49,7 @@ static TALLOC_CTX *main_loop_talloc = NULL;
free up temporary memory - called from the main loop
********************************************************************/
-void main_loop_talloc_free(void)
+void main_loop_TALLOC_FREE(void)
{
if (!main_loop_talloc)
return;
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index e762a8b9e2..737729a4ce 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -888,7 +888,7 @@ static NTSTATUS _net_sam_logon_internal(pipes_struct *p,
&& !is_trusted_domain(nt_domain) )
r_u->auth_resp = 0; /* We are not authoritative */
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
return status;
}
@@ -896,7 +896,7 @@ static NTSTATUS _net_sam_logon_internal(pipes_struct *p,
/* We don't like guest domain logons... */
DEBUG(5,("_net_sam_logon: Attempted domain logon as GUEST "
"denied.\n"));
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
return NT_STATUS_LOGON_FAILURE;
}
@@ -1025,7 +1025,7 @@ static NTSTATUS _net_sam_logon_internal(pipes_struct *p,
ZERO_STRUCT(user_session_key);
ZERO_STRUCT(lm_session_key);
}
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
return status;
}
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 3ed33ca691..67fb89ef79 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -616,7 +616,7 @@ static BOOL pipe_ntlmssp_verify_final(pipes_struct *p, DATA_BLOB *p_resp_blob)
memset(p->wks, '\0', sizeof(p->wks));
/* Set up for non-authenticated user. */
- talloc_free(p->pipe_user.nt_user_token);
+ TALLOC_FREE(p->pipe_user.nt_user_token);
p->pipe_user.ut.ngroups = 0;
SAFE_FREE( p->pipe_user.ut.groups);
@@ -1309,7 +1309,7 @@ static BOOL pipe_schannel_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
p->auth.a_u.schannel_auth = TALLOC_P(p->pipe_state_mem_ctx, struct schannel_auth_struct);
if (!p->auth.a_u.schannel_auth) {
- talloc_free(pdcinfo);
+ TALLOC_FREE(pdcinfo);
return False;
}
@@ -1317,7 +1317,7 @@ static BOOL pipe_schannel_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
memcpy(p->auth.a_u.schannel_auth->sess_key, pdcinfo->sess_key,
sizeof(pdcinfo->sess_key));
- talloc_free(pdcinfo);
+ TALLOC_FREE(pdcinfo);
p->auth.a_u.schannel_auth->seq_num = 0;
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index 86a04e7ccb..f7467f2cf0 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -1223,7 +1223,7 @@ static BOOL close_internal_rpc_pipe_hnd(void *np_conn)
/* Free the handles database. */
close_policy_by_pipe(p);
- talloc_free(p->pipe_user.nt_user_token);
+ TALLOC_FREE(p->pipe_user.nt_user_token);
data_blob_free(&p->session_key);
SAFE_FREE(p->pipe_user.ut.groups);
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index afca3e747f..137335962e 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -704,7 +704,7 @@ static void display_reg_value(REGISTRY_VALUE value)
}
putchar(hex[i]);
}
- talloc_free(hex);
+ TALLOC_FREE(hex);
putchar('\n');
break;
}
diff --git a/source3/sam/idmap_ldap.c b/source3/sam/idmap_ldap.c
index 17482a5146..6169c89b3b 100644
--- a/source3/sam/idmap_ldap.c
+++ b/source3/sam/idmap_ldap.c
@@ -145,7 +145,7 @@ static NTSTATUS ldap_allocate_id(unid_t *id, int id_type)
rc = smbldap_search(ldap_state.smbldap_state, lp_ldap_idmap_suffix(),
LDAP_SCOPE_SUBTREE, filter,
attr_list, 0, &result);
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS) {
DEBUG(0,("ldap_allocate_id: %s object not found\n", LDAP_OBJ_IDPOOL));
@@ -280,7 +280,7 @@ static NTSTATUS ldap_get_sid_from_id(DOM_SID *sid, unid_t id, int id_type)
ret = NT_STATUS_OK;
out:
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (result)
ldap_msgfree(result);
@@ -397,7 +397,7 @@ static NTSTATUS ldap_get_id_from_sid(unid_t *id, int *id_type, const DOM_SID *si
}
out:
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (result)
ldap_msgfree(result);
SAFE_FREE(dn);
@@ -423,7 +423,7 @@ static NTSTATUS verify_idpool( void )
attr_list = get_attr_list( NULL, idpool_attr_list );
rc = smbldap_search(ldap_state.smbldap_state, lp_ldap_idmap_suffix(),
LDAP_SCOPE_SUBTREE, filter, attr_list, 0, &result);
- talloc_free ( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS)
return NT_STATUS_UNSUCCESSFUL;
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 059b88ecc8..09276cd200 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -288,7 +288,7 @@ static int close_normal_file(files_struct *fsp, enum file_close_type close_type)
process_pending_change_notify_queue((time_t)0);
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
if(fsp->oplock_type)
release_file_oplock(fsp);
@@ -363,7 +363,7 @@ static int close_directory(files_struct *fsp, enum file_close_type close_type)
delete_dir = (lck->delete_on_close | lck->initial_delete_on_close);
- talloc_free(lck);
+ TALLOC_FREE(lck);
if ((close_type == NORMAL_CLOSE || close_type == SHUTDOWN_CLOSE) &&
delete_dir &&
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c
index bf4db99ea6..b41467f02c 100644
--- a/source3/smbd/conn.c
+++ b/source3/smbd/conn.c
@@ -249,7 +249,7 @@ void conn_free_internal(connection_struct *conn)
}
if (conn->nt_user_token) {
- talloc_free(conn->nt_user_token);
+ TALLOC_FREE(conn->nt_user_token);
}
free_namearray(conn->veto_list);
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index a2ec6f34b8..3f10ba41b2 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -2026,7 +2026,7 @@ static BOOL api_NetUserGetGroups(connection_struct *conn,uint16 vuid, char *para
done:
unbecome_root(); /* END ROOT BLOCK */
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return ret;
}
@@ -2219,7 +2219,7 @@ static BOOL api_SetUserPassword(connection_struct *conn,uint16 vuid, char *param
}
unbecome_root();
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
}
data_blob_clear_free(&password);
}
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 3e555a8f31..258e0e6021 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1352,7 +1352,7 @@ files_struct *open_file_ntcreate(connection_struct *conn,
&state);
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NULL;
}
@@ -1363,7 +1363,7 @@ files_struct *open_file_ntcreate(connection_struct *conn,
if (NT_STATUS_EQUAL(status, NT_STATUS_DELETE_PENDING)) {
/* DELETE_PENDING is not deferred for a second */
set_saved_ntstatus(status);
- talloc_free(lck);
+ TALLOC_FREE(lck);
file_free(fsp);
return NULL;
}
@@ -1384,7 +1384,7 @@ files_struct *open_file_ntcreate(connection_struct *conn,
create_options);
if (fsp_dup) {
- talloc_free(lck);
+ TALLOC_FREE(lck);
file_free(fsp);
if (pinfo) {
*pinfo = FILE_WAS_OPENED;
@@ -1447,7 +1447,7 @@ files_struct *open_file_ntcreate(connection_struct *conn,
}
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
if (fsp_open) {
fd_close(conn, fsp);
/*
@@ -1490,7 +1490,7 @@ files_struct *open_file_ntcreate(connection_struct *conn,
if (!fsp_open) {
if (lck != NULL) {
- talloc_free(lck);
+ TALLOC_FREE(lck);
}
file_free(fsp);
return NULL;
@@ -1551,7 +1551,7 @@ files_struct *open_file_ntcreate(connection_struct *conn,
defer_open(lck, request_time, timeval_zero(),
&state);
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NULL;
}
@@ -1588,7 +1588,7 @@ files_struct *open_file_ntcreate(connection_struct *conn,
*/
if ((SMB_VFS_FTRUNCATE(fsp,fsp->fh->fd,0) == -1) ||
(SMB_VFS_FSTAT(fsp,fsp->fh->fd,psbuf)==-1)) {
- talloc_free(lck);
+ TALLOC_FREE(lck);
fd_close(conn,fsp);
file_free(fsp);
return NULL;
@@ -1643,7 +1643,7 @@ files_struct *open_file_ntcreate(connection_struct *conn,
if (!NT_STATUS_IS_OK(result)) {
/* Remember to delete the mode we just added. */
del_share_mode(lck, fsp);
- talloc_free(lck);
+ TALLOC_FREE(lck);
fd_close(conn,fsp);
file_free(fsp);
set_saved_ntstatus(result);
@@ -1712,7 +1712,7 @@ files_struct *open_file_ntcreate(connection_struct *conn,
/* If this is a successful open, we must remove any deferred open
* records. */
del_deferred_open_entry(lck, mid);
- talloc_free(lck);
+ TALLOC_FREE(lck);
conn->num_files_open++;
@@ -1933,7 +1933,7 @@ files_struct *open_directory(connection_struct *conn,
if (!NT_STATUS_IS_OK(status)) {
set_saved_ntstatus(status);
- talloc_free(lck);
+ TALLOC_FREE(lck);
file_free(fsp);
return NULL;
}
@@ -1946,7 +1946,7 @@ files_struct *open_directory(connection_struct *conn,
status = can_set_delete_on_close(fsp, True, 0);
if (!NT_STATUS_IS_OK(status)) {
set_saved_ntstatus(status);
- talloc_free(lck);
+ TALLOC_FREE(lck);
file_free(fsp);
return NULL;
}
@@ -1956,7 +1956,7 @@ files_struct *open_directory(connection_struct *conn,
lck->modified = True;
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
/* Change the owner if required. */
if ((info == FILE_WAS_CREATED) && lp_inherit_owner(SNUM(conn))) {
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index 3efd630649..7d0a94efda 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -197,7 +197,7 @@ BOOL remove_oplock(files_struct *fsp)
(double)inode));
}
release_file_oplock(fsp);
- talloc_free(lck);
+ TALLOC_FREE(lck);
return ret;
}
@@ -226,7 +226,7 @@ BOOL downgrade_oplock(files_struct *fsp)
}
downgrade_file_oplock(fsp);
- talloc_free(lck);
+ TALLOC_FREE(lck);
return ret;
}
@@ -470,7 +470,7 @@ static void process_oplock_async_level2_break_message(int msg_type, struct proce
/* Restore the sign state to what it was. */
srv_oplock_set_signing(sign_state);
- talloc_free(break_msg);
+ TALLOC_FREE(break_msg);
/* Async level2 request, don't send a reply, just remove the oplock. */
remove_oplock(fsp);
@@ -578,7 +578,7 @@ static void process_oplock_break_message(int msg_type, struct process_id src,
/* Restore the sign state to what it was. */
srv_oplock_set_signing(sign_state);
- talloc_free(break_msg);
+ TALLOC_FREE(break_msg);
fsp->sent_oplock_break = break_to_level2 ? LEVEL_II_BREAK_SENT:BREAK_TO_NONE_SENT;
@@ -654,7 +654,7 @@ static void process_kernel_oplock_break(int msg_type, struct process_id src,
/* Restore the sign state to what it was. */
srv_oplock_set_signing(sign_state);
- talloc_free(break_msg);
+ TALLOC_FREE(break_msg);
fsp->sent_oplock_break = BREAK_TO_NONE_SENT;
@@ -681,7 +681,7 @@ void reply_to_oplock_break_requests(files_struct *fsp)
fsp->num_pending_break_messages = 0;
if (fsp->oplock_timeout != NULL) {
/* Remove the timed event handler. */
- talloc_free(fsp->oplock_timeout);
+ TALLOC_FREE(fsp->oplock_timeout);
fsp->oplock_timeout = NULL;
}
return;
@@ -801,7 +801,7 @@ void release_level_2_oplocks_on_change(files_struct *fsp)
DEBUG(0,("release_level_2_oplocks_on_change: PANIC. "
"share mode entry %d is an exlusive "
"oplock !\n", i ));
- talloc_free(lck);
+ TALLOC_FREE(lck);
abort();
}
@@ -816,7 +816,7 @@ void release_level_2_oplocks_on_change(files_struct *fsp)
/* We let the message receivers handle removing the oplock state
in the share mode lock db. */
- talloc_free(lck);
+ TALLOC_FREE(lck);
}
/****************************************************************************
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 0eeb537ded..782a8c2b89 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -100,7 +100,7 @@ void invalidate_vuid(uint16 vuid)
session_yield(vuser);
SAFE_FREE(vuser->session_keystr);
- talloc_free(vuser->server_info);
+ TALLOC_FREE(vuser->server_info);
data_blob_free(&vuser->session_key);
@@ -111,7 +111,7 @@ void invalidate_vuid(uint16 vuid)
conn_clear_vuid_cache(vuid);
SAFE_FREE(vuser->groups);
- talloc_free(vuser->nt_user_token);
+ TALLOC_FREE(vuser->nt_user_token);
SAFE_FREE(vuser);
num_validated_vuids--;
}
@@ -215,7 +215,7 @@ int register_vuid(auth_serversupplied_info *server_info,
"vuser->groups\n"));
data_blob_free(&session_key);
free(vuser);
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
return UID_FIELD_INVALID;
}
}
@@ -252,7 +252,7 @@ int register_vuid(auth_serversupplied_info *server_info,
if (passwd) {
vuser->unix_homedir =
smb_xstrdup(passwd->pw_dir);
- talloc_free(passwd);
+ TALLOC_FREE(passwd);
}
}
@@ -280,7 +280,7 @@ int register_vuid(auth_serversupplied_info *server_info,
} else {
DEBUG(1, ("server_info does not contain a user_token - "
"cannot continue\n"));
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
data_blob_free(&session_key);
SAFE_FREE(vuser->homedir);
SAFE_FREE(vuser->unix_homedir);
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 9d35252e28..a50323887a 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -91,7 +91,7 @@ static BOOL push_queued_message(char *buf, int msg_len,
msg->buf = data_blob_talloc(msg, buf, msg_len);
if(msg->buf.data == NULL) {
DEBUG(0,("push_message: malloc fail (2)\n"));
- talloc_free(msg);
+ TALLOC_FREE(msg);
return False;
}
@@ -103,7 +103,7 @@ static BOOL push_queued_message(char *buf, int msg_len,
private_len);
if (msg->private_data.data == NULL) {
DEBUG(0,("push_message: malloc fail (3)\n"));
- talloc_free(msg);
+ TALLOC_FREE(msg);
return False;
}
}
@@ -131,7 +131,7 @@ void remove_deferred_open_smb_message(uint16 mid)
(unsigned int)mid,
(unsigned int)pml->buf.length ));
DLIST_REMOVE(deferred_open_queue, pml);
- talloc_free(pml);
+ TALLOC_FREE(pml);
return;
}
}
@@ -237,11 +237,11 @@ static void idle_event_handler(struct timed_event *te,
struct idle_event *event =
talloc_get_type_abort(private_data, struct idle_event);
- talloc_free(event->te);
+ TALLOC_FREE(event->te);
if (!event->handler(now, event->private_data)) {
/* Don't repeat, delete ourselves */
- talloc_free(event);
+ TALLOC_FREE(event);
return;
}
@@ -277,7 +277,7 @@ struct idle_event *add_idle_event(TALLOC_CTX *mem_ctx,
idle_event_handler, result);
if (result->te == NULL) {
DEBUG(0, ("add_timed_event failed\n"));
- talloc_free(result);
+ TALLOC_FREE(result);
return NULL;
}
@@ -1623,8 +1623,8 @@ void smbd_process(void)
errno = 0;
/* free up temporary memory */
- lp_talloc_free();
- main_loop_talloc_free();
+ lp_TALLOC_FREE();
+ main_loop_TALLOC_FREE();
/* Did someone ask for immediate checks on things like blocking locks ? */
if (select_timeout == 0) {
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 89b98be1e7..1ca9d39a4c 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -4263,11 +4263,11 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, files_struct *fsp, char *
DEBUG(3,("rename_internals_fsp: succeeded doing rename on %s -> %s\n",
fsp->fsp_name,newname));
rename_open_files(conn, lck, fsp->dev, fsp->inode, newname);
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NT_STATUS_OK;
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
if (errno == ENOTDIR || errno == EISDIR) {
error = NT_STATUS_OBJECT_NAME_COLLISION;
@@ -4492,11 +4492,11 @@ directory = %s, newname = %s, last_component_dest = %s, is_8_3 = %d\n",
DEBUG(3,("rename_internals: succeeded doing rename on %s -> %s\n",
directory,newname));
rename_open_files(conn, lck, sbuf1.st_dev, sbuf1.st_ino, newname);
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NT_STATUS_OK;
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
if (errno == ENOTDIR || errno == EISDIR)
error = NT_STATUS_OBJECT_NAME_COLLISION;
else
@@ -4599,7 +4599,7 @@ directory = %s, newname = %s, last_component_dest = %s, is_8_3 = %d\n",
count++;
error = NT_STATUS_OK;
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
DEBUG(3,("rename_internals: doing rename on %s -> %s\n",fname,destname));
}
CloseDir(dir_hnd);
diff --git a/source3/smbd/sec_ctx.c b/source3/smbd/sec_ctx.c
index ebc47c51d9..a30123bfa7 100644
--- a/source3/smbd/sec_ctx.c
+++ b/source3/smbd/sec_ctx.c
@@ -215,7 +215,7 @@ BOOL push_sec_ctx(void)
if (ctx_p->ut.ngroups != 0) {
if (!(ctx_p->ut.groups = SMB_MALLOC_ARRAY(gid_t, ctx_p->ut.ngroups))) {
DEBUG(0, ("Out of memory in push_sec_ctx()\n"));
- talloc_free(ctx_p->token);
+ TALLOC_FREE(ctx_p->token);
return False;
}
@@ -255,7 +255,7 @@ void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, NT_USER_TOKEN
if (token && (token == ctx_p->token))
smb_panic("DUPLICATE_TOKEN");
- talloc_free(ctx_p->token);
+ TALLOC_FREE(ctx_p->token);
ctx_p->ut.groups = memdup(groups, sizeof(gid_t) * ngroups);
ctx_p->token = dup_nt_token(NULL, token);
@@ -311,7 +311,7 @@ BOOL pop_sec_ctx(void)
SAFE_FREE(ctx_p->ut.groups);
ctx_p->ut.ngroups = 0;
- talloc_free(ctx_p->token);
+ TALLOC_FREE(ctx_p->token);
/* Pop back previous user */
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 6c2034988a..2e96b4ceb9 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -353,7 +353,7 @@ static BOOL open_sockets_smbd(BOOL is_daemon, BOOL interactive, const char *smb_
int num;
/* Free up temporary memory from the main smbd. */
- lp_talloc_free();
+ lp_TALLOC_FREE();
/* Ensure we respond to PING and DEBUG messages from the main smbd. */
message_dispatch();
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 0fce677ea9..5c4974329c 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -399,7 +399,7 @@ static NTSTATUS find_forced_user(int snum, BOOL vuser_is_guest,
result = NT_STATUS_OK;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
@@ -487,7 +487,7 @@ static NTSTATUS find_forced_group(BOOL force_user,
result = NT_STATUS_OK;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
@@ -540,7 +540,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
conn->uid = pass->pw_uid;
conn->gid = pass->pw_gid;
string_set(&conn->user,pass->pw_name);
- talloc_free(pass);
+ TALLOC_FREE(pass);
DEBUG(3,("Guest only user %s\n",user));
} else if (vuser) {
if (vuser->guest) {
diff --git a/source3/smbd/share_access.c b/source3/smbd/share_access.c
index 11e52b03ab..a429937f8d 100644
--- a/source3/smbd/share_access.c
+++ b/source3/smbd/share_access.c
@@ -161,13 +161,13 @@ BOOL token_contains_name_in_list(const char *username,
while (*list != NULL) {
if (token_contains_name(mem_ctx, username, sharename,
token, *list)) {
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return True;
}
list += 1;
}
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return False;
}
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 6e516d3562..c62c9d928a 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -72,7 +72,7 @@ BOOL change_to_guest(void)
current_user.conn = NULL;
current_user.vuid = UID_FIELD_INVALID;
- talloc_free(pass);
+ TALLOC_FREE(pass);
pass = NULL;
return True;
@@ -251,7 +251,7 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid)
*/
if (must_free_token)
- talloc_free(token);
+ TALLOC_FREE(token);
current_user.conn = conn;
current_user.vuid = vuid;
diff --git a/source3/utils/net_rpc_shell.c b/source3/utils/net_rpc_shell.c
index 0e17cd6843..3887fd9ae2 100644
--- a/source3/utils/net_rpc_shell.c
+++ b/source3/utils/net_rpc_shell.c
@@ -112,7 +112,7 @@ static BOOL net_sh_process(struct rpc_sh_ctx *ctx,
if (strequal(argv[0], "..") &&
(this_ctx->parent != NULL)) {
new_ctx = this_ctx->parent;
- talloc_free(this_ctx);
+ TALLOC_FREE(this_ctx);
this_ctx = new_ctx;
return True;
}
@@ -250,7 +250,7 @@ int net_rpc_shell(int argc, const char **argv)
cli_shutdown(ctx->cli);
- talloc_free(ctx);
+ TALLOC_FREE(ctx);
return 0;
}
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index c22f4b5e09..f99c9db35b 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -1481,7 +1481,7 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod
(const unsigned char *)lm_key,
sizeof(lm_key));
x_fprintf(x_stdout, "LANMAN-Session-Key: %s\n", hex_lm_key);
- talloc_free(hex_lm_key);
+ TALLOC_FREE(hex_lm_key);
}
if (ntlm_server_1_user_session_key
@@ -1491,7 +1491,7 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod
(const unsigned char *)user_session_key,
sizeof(user_session_key));
x_fprintf(x_stdout, "User-Session-Key: %s\n", hex_user_session_key);
- talloc_free(hex_user_session_key);
+ TALLOC_FREE(hex_user_session_key);
}
}
}
@@ -1682,7 +1682,7 @@ static BOOL check_auth_crap(void)
hex_lm_key = hex_encode(NULL, (const unsigned char *)lm_key,
sizeof(lm_key));
x_fprintf(x_stdout, "LM_KEY: %s\n", hex_lm_key);
- talloc_free(hex_lm_key);
+ TALLOC_FREE(hex_lm_key);
}
if (request_user_session_key
&& (memcmp(zeros, user_session_key,
@@ -1690,7 +1690,7 @@ static BOOL check_auth_crap(void)
hex_user_session_key = hex_encode(NULL, (const unsigned char *)user_session_key,
sizeof(user_session_key));
x_fprintf(x_stdout, "NT_KEY: %s\n", hex_user_session_key);
- talloc_free(hex_user_session_key);
+ TALLOC_FREE(hex_user_session_key);
}
return True;
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c
index a098039cd0..2e7fbc1812 100644
--- a/source3/utils/pdbedit.c
+++ b/source3/utils/pdbedit.c
@@ -508,10 +508,10 @@ static int new_machine (struct pdb_methods *in, const char *machine_in)
if ((pwd = getpwnam_alloc(NULL, machineaccount))) {
if (!NT_STATUS_IS_OK(pdb_init_sam_pw( &sam_pwent, pwd))) {
fprintf(stderr, "Could not init sam from pw\n");
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
return -1;
}
- talloc_free(&pwd);
+ TALLOC_FREE(pwd);
} else {
if (!NT_STATUS_IS_OK(pdb_init_sam (&sam_pwent))) {
fprintf(stderr, "Could not init sam from pw\n");
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 405e51cd25..7e18e09dad 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -151,7 +151,7 @@ static void pong_cb(int msg_type, struct process_id pid, void *buf, size_t len)
{
char *src_string = procid_str(NULL, &pid);
printf("PONG from pid %s\n", src_string);
- talloc_free(src_string);
+ TALLOC_FREE(src_string);
num_replies++;
}
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index 9325c24881..a42361780e 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -331,7 +331,7 @@ static int process_root(int local_flags)
if (!user_name[0] && (pwd = getpwuid_alloc(NULL, geteuid()))) {
fstrcpy(user_name, pwd->pw_name);
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
}
if (!user_name[0]) {
@@ -476,7 +476,7 @@ static int process_nonroot(int local_flags)
pwd = getpwuid_alloc(NULL, getuid());
if (pwd) {
fstrcpy(user_name,pwd->pw_name);
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
} else {
fprintf(stderr, "smbpasswd: cannot lookup user name for uid %u\n", (unsigned int)getuid());
exit(1);
diff --git a/source3/web/cgi.c b/source3/web/cgi.c
index 700fb7fa08..d1cd38eb51 100644
--- a/source3/web/cgi.c
+++ b/source3/web/cgi.c
@@ -306,7 +306,7 @@ static void cgi_web_auth(void)
head, user, (int)geteuid(), (int)getuid(), tail);
exit(0);
}
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
}
@@ -367,7 +367,7 @@ static BOOL cgi_handle_authorization(char *line)
/* Save the users name */
C_user = SMB_STRDUP(user);
- talloc_free(pass);
+ TALLOC_FREE(pass);
return True;
}
}
@@ -377,7 +377,7 @@ err:
"WWW-Authenticate: Basic realm=\"SWAT\"\r\n",
"username or password incorrect");
- talloc_free(pass);
+ TALLOC_FREE(pass);
return False;
}