summaryrefslogtreecommitdiff
path: root/dh.c
diff options
context:
space:
mode:
Diffstat (limited to 'dh.c')
-rw-r--r--dh.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/dh.c b/dh.c
index eebee2377..46afba033 100644
--- a/dh.c
+++ b/dh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh.c,v 1.62 2016/12/15 21:20:41 dtucker Exp $ */ 1/* $OpenBSD: dh.c,v 1.63 2018/02/07 02:06:50 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Niels Provos. All rights reserved. 3 * Copyright (c) 2000 Niels Provos. All rights reserved.
4 * 4 *
@@ -135,10 +135,8 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg)
135 return 1; 135 return 1;
136 136
137 fail: 137 fail:
138 if (dhg->g != NULL) 138 BN_clear_free(dhg->g);
139 BN_clear_free(dhg->g); 139 BN_clear_free(dhg->p);
140 if (dhg->p != NULL)
141 BN_clear_free(dhg->p);
142 dhg->g = dhg->p = NULL; 140 dhg->g = dhg->p = NULL;
143 return 0; 141 return 0;
144} 142}