summaryrefslogtreecommitdiffstats
path: root/bufbn.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2007-06-05 10:29:35 +0200
committerDarren Tucker <dtucker@zip.com.au>2007-06-05 10:29:35 +0200
commit7b21cb5bdc6d0e587f646397b6c6f6ef87505e0b (patch)
tree9f842f4b81f16e278cb36efed29fdaf87792b121 /bufbn.c
parent - djm@cvs.openbsd.org 2007/05/31 23:34:29 (diff)
downloadopenssh-7b21cb5bdc6d0e587f646397b6c6f6ef87505e0b.tar.xz
openssh-7b21cb5bdc6d0e587f646397b6c6f6ef87505e0b.zip
- djm@cvs.openbsd.org 2007/06/02 09:04:58
[bufbn.c] memory leak on error path; from arnaud.lacombe.1 AT ulaval.ca
Diffstat (limited to '')
-rw-r--r--bufbn.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bufbn.c b/bufbn.c
index ce8fba515..251cd0951 100644
--- a/bufbn.c
+++ b/bufbn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bufbn.c,v 1.5 2007/02/14 14:32:00 stevesk Exp $*/
+/* $OpenBSD: bufbn.c,v 1.6 2007/06/02 09:04:58 djm Exp $*/
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -201,12 +201,14 @@ buffer_get_bignum2_ret(Buffer *buffer, BIGNUM *value)
return (-1);
}
if (len > 8 * 1024) {
- error("buffer_get_bignum2_ret: cannot handle BN of size %d", len);
+ error("buffer_get_bignum2_ret: cannot handle BN of size %d",
+ len);
xfree(bin);
return (-1);
}
if (BN_bin2bn(bin, len, value) == NULL) {
error("buffer_get_bignum2_ret: BN_bin2bn failed");
+ xfree(bin);
return (-1);
}
xfree(bin);