Release memory allocated by i2d_X509(...)

Motivation:

As i2d_X509(...) allocates memory we need to call OPENSSL_free(...) on the pointer.

Modifications:

Call OPENSSL_free(...) on allocated memory by i2d_X509(...) and so remove memory leak.

Result:

No more memory leak.