Fix a memory leak in the ReadLineContext class

fixes #7602