Fix small memory leak in user log caching #4040