Oops. Memory leak in key management code