From 6fc385081e2db25abda9492c1dbca7b3a1c6b62b Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Fri, 14 Feb 2014 12:59:04 +0100 Subject: [PATCH] demo: clean-up on exit --- demo/demo.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/demo/demo.c b/demo/demo.c index 944b236..e2cc8c0 100644 --- a/demo/demo.c +++ b/demo/demo.c @@ -70,12 +70,16 @@ int myrng(unsigned char *dst, int len, void *dat) return len; } +mp_int a, b, c, d, e, f; +static void _cleanup(void) +{ + mp_clear_multi(&a, &b, &c, &d, &e, &f, NULL); +} char cmd[4096], buf[4096]; int main(void) { - mp_int a, b, c, d, e, f; unsigned long t; unsigned rr; int i, n, err, cnt, ix;