mirror of
https://github.com/bstansell/conserver.git
synced 2025-04-15 06:36:42 +00:00
don't leak in the error case
Applying patch from @FauxFaux Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
This commit is contained in:
parent
166633395d
commit
4e3c2e134e
@ -99,13 +99,12 @@ DHFromArray(char *dh_p, size_t dh_p_size, char *dh_g, size_t dh_g_size) {
|
||||
|
||||
p = BN_bin2bn(dh_p, dh_p_size, NULL);
|
||||
if (p == NULL) {
|
||||
BN_free(p);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
g = BN_bin2bn(dh_g, dh_g_size, NULL);
|
||||
if (g == NULL) {
|
||||
BN_free(g);
|
||||
BN_free(p);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user