If your ejabberd seems to leak memory it might result out of this bug in erlang’s mnesia database. You can easily find out by starting a remote shell to your running ejabberd and whatch results for the following command:
lists:foldl(fun(Tab, Acc) -> ets:info(Tab, memory) * 8 + Acc end, 0, ets:all()).
The bug is fixed at erlang OTP R12B5.
A good description of the problem can also be found at Yaws, Mnesia stress test notes.