UI: Check for NULL pointer after calling OPENSSL_memdup