diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-12-03 07:20:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:06:20 -0500 |
commit | 6e6374cb5bcffb4df8bdb0a83327fff92b61ac84 (patch) | |
tree | fa45bc8c1a7281492f39069e5edd86da6d0c5d4e /source4/libcli/nmblib.c | |
parent | e5ce904ddbd6175ba86ed827bf096b76b11b5511 (diff) | |
download | samba-6e6374cb5bcffb4df8bdb0a83327fff92b61ac84.tar.gz samba-6e6374cb5bcffb4df8bdb0a83327fff92b61ac84.tar.bz2 samba-6e6374cb5bcffb4df8bdb0a83327fff92b61ac84.zip |
r4055: fixed more places to use type safe allocation macros
(This used to be commit eec698254f67365f27b4b7569fa982e22472aca1)
Diffstat (limited to 'source4/libcli/nmblib.c')
-rw-r--r-- | source4/libcli/nmblib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/libcli/nmblib.c b/source4/libcli/nmblib.c index 70c6fab8da..0a3f72ba74 100644 --- a/source4/libcli/nmblib.c +++ b/source4/libcli/nmblib.c @@ -333,7 +333,7 @@ static BOOL parse_alloc_res_rec(char *inbuf,int *offset,int length, struct res_rec **recs, int count) { int i; - *recs = (struct res_rec *)malloc(sizeof(**recs)*count); + *recs = malloc_array_p(struct res_rec, count); if (!*recs) return(False); memset((char *)*recs,'\0',sizeof(**recs)*count); @@ -523,7 +523,7 @@ static struct packet_struct *copy_nmb_packet(struct packet_struct *packet) struct nmb_packet *copy_nmb; struct packet_struct *pkt_copy; - if(( pkt_copy = (struct packet_struct *)malloc(sizeof(*packet))) == NULL) + if(( pkt_copy = malloc_p(struct packet_struct)) == NULL) { DEBUG(0,("copy_nmb_packet: malloc fail.\n")); return NULL; |