plugins: Fix memory leak.