libtommath: Fix mp_init_multi() stdarg use on error path
authorJouni Malinen <j@w1.fi>
Tue, 23 Jun 2015 17:39:08 +0000 (20:39 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 23 Jun 2015 17:39:08 +0000 (20:39 +0300)
commitba54933f63b6ececde3e1a85bb5149fd59b22f6e
tree8789a129161ecad45514ebdcbb9e2eb369484a24
parentf6332b0be1d5e1b75ec834c64a67750aa00965ab
libtommath: Fix mp_init_multi() stdarg use on error path

Previously, it would have been possible for va_end(args) to be called
twice in case mp_init() fails. While that may not cause issues on number
of platforms, that is not how va_start()/va_end() are supposed to be
used. Fix this by returning from the function without using va_end()
twice on the same va_list args.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/tls/libtommath.c