call-rsa: free modulus buffers on error paths.
authorAnthony Romano <anthony.romano@coreos.com>
Mon, 17 Jul 2017 02:36:34 +0000 (19:36 -0700)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 18 Jul 2017 04:15:42 +0000 (13:15 +0900)
commita51ac8593b33405891b8192a5bd559af6764f45d
treee244eb466572ff1f756d235037b9f043bbab2939
parentde81caba3ee4e7bf308126687aa9f46ab8fd0230
call-rsa: free modulus buffers on error paths.

* MPI_CHK jumps to cleanup on ret != 0, so p_q_modulus is never freed if
  rsa_gen_key fails (detected via scan-build).
* modulus_calc never freed its modulus buffer on error.

Signed-off-by: Anthony Romano <anthony.romano@coreos.com>
ChangeLog
src/call-rsa.c
src/main.c