Re: Short question about freeing memory

2007-08-31 Thread Thomas J. Hruska
Martin Salo wrote: Hello Mailinglist, I have a RSA key written to memory. How can I free the memory? oBIO = BIO_new(BIO_s_mem()); PEM_write_bio_RSAPrivateKey(oBIO, oRsaKey, 0, 0, 0, 0, 0); char *cMem; iBytesWritten = BIO_get_mem_data(oBIO, &cMem); cMem[iBytesWritten] = '\0'; // How can I

Short question about freeing memory

2007-08-31 Thread Martin Salo
Hello Mailinglist, I have a RSA key written to memory. How can I free the memory? oBIO = BIO_new(BIO_s_mem()); PEM_write_bio_RSAPrivateKey(oBIO, oRsaKey, 0, 0, 0, 0, 0); char *cMem; iBytesWritten = BIO_get_mem_data(oBIO, &cMem); cMem[iBytesWritten] = '\0'; // How can I free cMem? Reg