Skip to content

Commit

Permalink
Merge pull request FreeRDP#3987 from chipitsine/cppcheck
Browse files Browse the repository at this point in the history
resolve an issue found by cppcheck
  • Loading branch information
hardening authored Jun 1, 2017
2 parents 3470c4d + a9ab65a commit c42ccb5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libfreerdp/crypto/certificate.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,12 @@ static int certificate_data_match_raw(rdpCertificateStore* certificate_store,
if (port == certificate_data->port)
{
found = TRUE;
match = (strcmp(certificate_data->fingerprint, fingerprint) == 0) ? 0 : -1;
if (fingerprint && fprint)
*fprint = _strdup(fingerprint);
if (fingerprint)
{
match = (strcmp(certificate_data->fingerprint, fingerprint) == 0) ? 0 : -1;
if (fprint)
*fprint = _strdup(fingerprint);
}
if (subject && psubject)
crypto_base64_decode(subject, strlen(subject), (BYTE**)psubject, &outLen);
if (issuer && pissuer)
Expand Down

0 comments on commit c42ccb5

Please sign in to comment.