keyring: Fix for proper handling of volitile memory object