The importance of Alfven waves to explain the winds of Wolf-Rayet stars was shown by dos Santos and coworkers. We investigate here the possible importance of Alfven waves in the creation of inhomogeneities in the winds of early-type stars. The observed infrared emission (at the base of the wind) of early-type stars is often larger than expected. The clumping explains this characteristic in the wind, increasing the mean density and hence the emission measure, making it possible to understand the observed infrared, as well as the observed enhancement in the blue wing of the H alpha line. In this study, we investigate the formation of these clumps via thermal instability. The heat-loss function used, H(T, n), includes physical processes such as emission of (continuous and line) recombination radiation, resonance line emission excited by electron collisions, thermal bremsstrahlung, Compton heating and cooling, and damping of Alfven waves. As a result of this heat-loss function we show the existence of two stable equilibrium regions. At high temperature the stable equilibrium region is the diffuse medium, and at low temperature it is the clumps. Using this reasonable heat-loss function, we show that the two stable equilibrium regions can coexist over a narrow range of pressures describing the diffuse medium and the clumps.