[sr-dev] git:master:b458bbcb: lost: memory leak fix and code refactoring