diff options
author | Björn Baumbach <bb@sernet.de> | 2014-04-14 14:37:29 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-04-16 20:39:08 +0200 |
commit | fae7e5d771d1c69bded1189b23335647023fa0f7 (patch) | |
tree | 7ae416ce7f3d12664b3fa75ac47c1e3a70514986 /source3 | |
parent | a56c35a4deec9745ff27a66ddc85db48c5dfaf97 (diff) | |
download | samba-fae7e5d771d1c69bded1189b23335647023fa0f7.tar.gz samba-fae7e5d771d1c69bded1189b23335647023fa0f7.tar.xz samba-fae7e5d771d1c69bded1189b23335647023fa0f7.zip |
lib-util: rename memdup to smb_memdup and fix all callers
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/interface.c | 4 | ||||
-rw-r--r-- | source3/lib/smbldap.c | 2 | ||||
-rw-r--r-- | source3/libsmb/clirap.c | 4 | ||||
-rw-r--r-- | source3/passdb/secrets.c | 2 | ||||
-rw-r--r-- | source3/smbd/seal.c | 2 | ||||
-rw-r--r-- | source3/smbd/sec_ctx.c | 4 | ||||
-rw-r--r-- | source3/winbindd/winbindd_cache.c | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/source3/lib/interface.c b/source3/lib/interface.c index 39dc9cb04c2..3edeae5742b 100644 --- a/source3/lib/interface.c +++ b/source3/lib/interface.c @@ -503,10 +503,10 @@ void load_interfaces(void) total_probed = get_interfaces(talloc_tos(), &ifaces); if (total_probed > 0) { - probed_ifaces = (struct iface_struct *)memdup(ifaces, + probed_ifaces = (struct iface_struct *)smb_memdup(ifaces, sizeof(ifaces[0])*total_probed); if (!probed_ifaces) { - DEBUG(0,("ERROR: memdup failed\n")); + DEBUG(0,("ERROR: smb_memdup failed\n")); exit(1); } } diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c index 08640d070af..f2d58a54d19 100644 --- a/source3/lib/smbldap.c +++ b/source3/lib/smbldap.c @@ -353,7 +353,7 @@ static void smbldap_set_mod_internal(LDAPMod *** modlist, int modop, const char mods[i]->mod_bvalues[j] = SMB_MALLOC_P(struct berval); SMB_ASSERT(mods[i]->mod_bvalues[j] != NULL); - mods[i]->mod_bvalues[j]->bv_val = (char *)memdup(blob->data, blob->length); + mods[i]->mod_bvalues[j]->bv_val = (char *)smb_memdup(blob->data, blob->length); SMB_ASSERT(mods[i]->mod_bvalues[j]->bv_val != NULL); mods[i]->mod_bvalues[j]->bv_len = blob->length; diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index 7e6f8d74ba4..036919f903c 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -67,14 +67,14 @@ bool cli_api(struct cli_state *cli, * talloc */ - *rparam = (char *)memdup(my_rparam, num_my_rparam); + *rparam = (char *)smb_memdup(my_rparam, num_my_rparam); if (*rparam == NULL) { goto fail; } *rprcnt = num_my_rparam; TALLOC_FREE(my_rparam); - *rdata = (char *)memdup(my_rdata, num_my_rdata); + *rdata = (char *)smb_memdup(my_rdata, num_my_rdata); if (*rdata == NULL) { goto fail; } diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 9d91c2f3d3b..bff9a0d8df1 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -144,7 +144,7 @@ void *secrets_fetch(const char *key, size_t *size) return NULL; } - result = memdup(dbuf.dptr, dbuf.dsize); + result = smb_memdup(dbuf.dptr, dbuf.dsize); if (result == NULL) { return NULL; } diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c index bb9bb083503..273013b4279 100644 --- a/source3/smbd/seal.c +++ b/source3/smbd/seal.c @@ -245,7 +245,7 @@ NTSTATUS srv_request_encryption_setup(connection_struct *conn, /* Return the raw blob. */ SAFE_FREE(*ppdata); - *ppdata = (unsigned char *)memdup(response.data, response.length); + *ppdata = (unsigned char *)smb_memdup(response.data, response.length); if ((*ppdata) == NULL && response.length > 0) return NT_STATUS_NO_MEMORY; *p_data_size = response.length; diff --git a/source3/smbd/sec_ctx.c b/source3/smbd/sec_ctx.c index d474219eba2..c34247e615a 100644 --- a/source3/smbd/sec_ctx.c +++ b/source3/smbd/sec_ctx.c @@ -331,8 +331,8 @@ void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, const struct TALLOC_FREE(ctx_p->token); if (ngroups) { - ctx_p->ut.groups = (gid_t *)memdup(groups, - sizeof(gid_t) * ngroups); + ctx_p->ut.groups = (gid_t *)smb_memdup(groups, + sizeof(gid_t) * ngroups); if (!ctx_p->ut.groups) { smb_panic("memdup failed"); } diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index b9cfd826dcb..9c4b5bd4e82 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -3562,7 +3562,7 @@ static struct cache_entry *create_centry_validate(const char *kstr, TDB_DATA dat struct cache_entry *centry; centry = SMB_XMALLOC_P(struct cache_entry); - centry->data = (unsigned char *)memdup(data.dptr, data.dsize); + centry->data = (unsigned char *)smb_memdup(data.dptr, data.dsize); if (!centry->data) { SAFE_FREE(centry); return NULL; |