[PATCH 1/2] ecc-eddsa: free memory also when in error branch.

Puustinen, Ismo ismo.puustinen at intel.com
Thu Aug 6 20:59:33 CEST 2015


On Thu, 2015-08-06 at 14:55 +0200, Werner Koch wrote:
> On Wed,  5 Aug 2015 14:27, ismo.puustinen at intel.com said:
> 
> > -    return GPG_ERR_INTERNAL; /* We only support 256 bit. */
> > +  if (b != 256/8) {
> > +    rc = GPG_ERR_INTERNAL; /* We only support 256 bit. */
> > +    goto leave;
> 
> Not quite correct.  You forgot to init DIGEST which would have been 
> free
> but not initialized.  I fixed that.

Good catch, and thanks for the prompt review!

Ismo


More information about the Gcrypt-devel mailing list