Fix that memory leak in percent encoding