Fix MatrixSSL memory leaks