generate_zkp: fixed memory leak introduced in ceff47ae

Spotted by Kurt Roeckx
verify_zkp: fixed memory leak introduced in ceff47ae

Spotted by Kurt Roeckx
get_cert_by_subject: call X509err() when memory allocation fails

Suggestion by Kurt Roeckx
process_pci_value: return an error on realloc failure while reading a file

Spotted by Kurt Roeckx