r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
[idra/samba.git] / source3 / nsswitch / winbindd_wins.c
index 107c9d264cd538299834745ed1cbd50e9d7be41e..f199ebcb4371c97a5fcbb0168675558edbc2c01b 100644 (file)
@@ -97,7 +97,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count)
        if (resolve_wins(name,0x20,&ret,count)) {
                if ( count == 0 )
                        return NULL;
-               if ( (return_ip = (struct in_addr *)malloc((*count)*sizeof(struct in_addr))) == NULL ) {
+               if ( (return_ip = SMB_MALLOC_ARRAY(struct in_addr, *count)) == NULL ) {
                        free( ret );
                        return NULL;
                }