Fixing memory leak by freeing lsrk scheme