retvm_if(cert_type > PMINFO_SET_DISTRIBUTOR2_SIGNER_CERT, PMINFO_R_EINVAL, "Invalid certificate type\n");
pkgmgr_instcertinfo_x *certinfo = NULL;
certinfo = (pkgmgr_instcertinfo_x *)handle;
+ if (certinfo->cert_info[cert_type])
+ free(certinfo->cert_info[cert_type]);
(certinfo->cert_info)[cert_type] = strdup(cert_value);
return PMINFO_R_OK;
}