summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-03 06:42:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:19 -0500
commite5ce904ddbd6175ba86ed827bf096b76b11b5511 (patch)
tree722b04d001e9b26bb47b2480fef13699a0366667 /source4/libcli
parent7dcfd94f817d1c12a14704cbb96604dc3074aa2e (diff)
downloadsamba-e5ce904ddbd6175ba86ed827bf096b76b11b5511.tar.gz
samba-e5ce904ddbd6175ba86ed827bf096b76b11b5511.tar.bz2
samba-e5ce904ddbd6175ba86ed827bf096b76b11b5511.zip
r4054: got rid of Realloc(), replacing it with the type safe macro realloc_p()
(This used to be commit b0f6e21481745d1b2ced28d9ed6f09f6ffd99562)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/auth/gensec.c4
-rw-r--r--source4/libcli/namequery.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/source4/libcli/auth/gensec.c b/source4/libcli/auth/gensec.c
index 3cf96de4b3..7243222b6d 100644
--- a/source4/libcli/auth/gensec.c
+++ b/source4/libcli/auth/gensec.c
@@ -770,7 +770,9 @@ NTSTATUS gensec_register(const void *_ops)
return NT_STATUS_OBJECT_NAME_COLLISION;
}
- generic_security_ops = Realloc(generic_security_ops, sizeof(generic_security_ops[0]) * (gensec_num_backends+1));
+ generic_security_ops = realloc_p(generic_security_ops,
+ const struct gensec_security_ops *,
+ gensec_num_backends+1);
if (!generic_security_ops) {
smb_panic("out of memory in gensec_register");
}
diff --git a/source4/libcli/namequery.c b/source4/libcli/namequery.c
index 66154ef8f6..76fffe0d92 100644
--- a/source4/libcli/namequery.c
+++ b/source4/libcli/namequery.c
@@ -400,11 +400,12 @@ struct ipv4_addr *name_query(int fd,const char *name,int name_type,
continue;
}
- tmp_ip_list = (struct ipv4_addr *)Realloc( ip_list, sizeof( ip_list[0] )
- * ( (*count) + nmb2->answers->rdlength/6 ) );
+ tmp_ip_list = realloc_p(ip_list,
+ struct ipv4_addr,
+ (*count) + nmb2->answers->rdlength/6);
if (!tmp_ip_list) {
- DEBUG(0,("name_query: Realloc failed.\n"));
+ DEBUG(0,("name_query: realloc_p failed.\n"));
SAFE_FREE(ip_list);
}