Fix memory leak.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 9 Apr 2004 22:14:57 +0000 (22:14 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 9 Apr 2004 22:14:57 +0000 (22:14 +0000)
apps/dgst.c

index 75990a2fb1d05780c2a1fe820523c254538700d7..0ea8c9fc9f2dbf64556f91464216534a8ecb4964 100644 (file)
@@ -446,7 +446,10 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
                        }
                }
        else if(hmac_key)
+               {
                HMAC_Final(&hmac_ctx,buf,&len);
+               HMAC_CTX_cleanup(&hmac_ctx);
+               }
        else
                len=BIO_gets(bp,(char *)buf,BUFSIZE);