Possible PEP Memory Leak Fix

I believe that I found a/the issue with the PEP memory leak.

In PEPServiceManager.java in the method loadPEPServiceFromDB the newly loaded PEP service is put into pepServices (line #149) and is then returned to getPEPService () in where it is added a second time to pepServices (line #82).

To fix this remove the pepServices.put(jid, pepService) line on line #82. Otherwise the PEP service will get added twice.

I’m not certain this is all the leaks so I will continue hunting.

I don’t have access to the trunk so I cannot fix this myself but have fixed it in my local copy.

Just a followup, not sure if anyone cares, but in line #73 why use containsKey instead of just doing pepServices.get(jid) and testing for a null value?

Also is there protection in the code to keep someone from passing in a non-bare JID? Might be a danger area

Hello,

Would you like to start the process to get commit rights to openfire? The first step would be to elevate the permissions of your Jira account. If you would kindly let me know what that is, I’ll get you setup.

daryl

Just an update: this doesnt completely fix the problem. It slows down the memory leak but does not eliminate it. There must be one (or more) leaks. I’ll continue to look.