Fix a memory leak and add a performance improvement
Merge pull request #49 from a5anka/performance_fixes

Fix a memory leak and add a performance improvement
Jiira: https://wso2.org/jira/browse/MB-761