Merge pull request #2898 from romanek-adam/bugfix/memory-leak-in-plugin-dispatch...