Red Hat Inc.'s profit grew 23 percent in its fiscal fourth quarter, but its revenue growth fell short of analyst expectations and the software company's shares dropped in after-hours trading.

The company, based in Raleigh, N.C., sells the Linux open-source operating system.

Red Hat earned $43 million, or 22 cents per share, for the period that ended Feb 28. In the same quarter the year before, profit came to $36 million, or 18 cents per share.

Stripping out charges related to paying employees in stock and other items, earnings came to 36 cents per share versus 29 cents per share the year before.

Revenue increased 17 percent to $347.9 million from $297 million.

Analysts polled by FactSet were expecting the company to earn 30 cents per share on revenue of $349.4 million.

Red Hat's Chief Financial Officer Charlie Peters said that the company invested in and made three acquisitions in new product areas such as storage, cloud computing, management and big data. He said these investments should benefit the company in the long run.

Investors, seemingly unhappy with the revenue shortfall, sent Red Hat shares down 4.8 percent to $47.58 in after-hours trading. The often volatile stock added 72 cents to close at $49.97 Wednesday. Over the past 12 months, it has lost nearly 4 percent.