Home GnuPG
Diffusion GnuPG b065a696344e

gpg: Fix memory leak in sig-check.

Description

gpg: Fix memory leak in sig-check.

* g10/sig-check.c (check_signature_over_key_or_uid): Remove useless
condition.  Actually free when SIGNER was allocated by us.

SIGNER_ALLOCATED never received a value of -1 but that was tested.

IF SIGNER_ALLOCATED was 2 the memory was never freed:

if (signer_allocated == 1)
  if (signer_allocated == 2)
    free()

This function needs to be audited more thoroughly.

Details

Provenance
wernerAuthored on Aug 24 2017, 8:26 PM
Parents
rG757302cc7a94: indent: Change comment style on two functions
Branches
Unknown
Tags
Unknown