The leak happened when the vector set had to grow when it was empty but it had allocated the keys array already.
chardet
charset_normalizer