Skip to content

Commit

Permalink
MFC r342030:
Browse files Browse the repository at this point in the history
  Plug memory leak for AES_*_NIST_GMAC algorithms.

  swcr_newsession() allocates sw_ictx for these algorithms, thus we need
  to free() it in swcr_freesession().

  PR:		233907
  • Loading branch information
bu7cher committed Dec 20, 2018
1 parent 566948a commit 1ab95dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sys/opencrypto/cryptosoft.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,9 @@ swcr_freesession_locked(device_t dev, u_int64_t tid)

case CRYPTO_MD5:
case CRYPTO_SHA1:
case CRYPTO_AES_128_NIST_GMAC:
case CRYPTO_AES_192_NIST_GMAC:
case CRYPTO_AES_256_NIST_GMAC:
axf = swd->sw_axf;

if (swd->sw_ictx)
Expand Down

0 comments on commit 1ab95dc

Please sign in to comment.