demo: clean-up on exit
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;