summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--key.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a9ca5ac43..c88aff274 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,9 @@
20 [deattack.c radix.c] 20 [deattack.c radix.c]
21 kill more registers 21 kill more registers
22 millert@ ok 22 millert@ ok
23 - markus@cvs.openbsd.org 2001/11/21 15:51:24
24 [key.c]
25 mem leak
23 26
2420011126 2720011126
25 - (tim) [contrib/cygwin/README, openbsd-compat/bsd-cygwin_util.c, 28 - (tim) [contrib/cygwin/README, openbsd-compat/bsd-cygwin_util.c,
@@ -6942,4 +6945,4 @@
6942 - Wrote replacements for strlcpy and mkdtemp 6945 - Wrote replacements for strlcpy and mkdtemp
6943 - Released 1.0pre1 6946 - Released 1.0pre1
6944 6947
6945$Id: ChangeLog,v 1.1672 2001/12/06 16:39:56 mouring Exp $ 6948$Id: ChangeLog,v 1.1673 2001/12/06 16:41:41 mouring Exp $
diff --git a/key.c b/key.c
index 57df5b93a..220c476cd 100644
--- a/key.c
+++ b/key.c
@@ -32,7 +32,7 @@
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34#include "includes.h" 34#include "includes.h"
35RCSID("$OpenBSD: key.c,v 1.33 2001/10/04 14:34:16 markus Exp $"); 35RCSID("$OpenBSD: key.c,v 1.34 2001/11/21 15:51:24 markus Exp $");
36 36
37#include <openssl/evp.h> 37#include <openssl/evp.h>
38 38
@@ -420,14 +420,15 @@ key_read(Key *ret, char **cpp)
420 n = uudecode(cp, blob, len); 420 n = uudecode(cp, blob, len);
421 if (n < 0) { 421 if (n < 0) {
422 error("key_read: uudecode %s failed", cp); 422 error("key_read: uudecode %s failed", cp);
423 xfree(blob);
423 return -1; 424 return -1;
424 } 425 }
425 k = key_from_blob(blob, n); 426 k = key_from_blob(blob, n);
427 xfree(blob);
426 if (k == NULL) { 428 if (k == NULL) {
427 error("key_read: key_from_blob %s failed", cp); 429 error("key_read: key_from_blob %s failed", cp);
428 return -1; 430 return -1;
429 } 431 }
430 xfree(blob);
431 if (k->type != type) { 432 if (k->type != type) {
432 error("key_read: type mismatch: encoding error"); 433 error("key_read: type mismatch: encoding error");
433 key_free(k); 434 key_free(k);
@@ -454,9 +455,9 @@ key_read(Key *ret, char **cpp)
454#endif 455#endif
455 } 456 }
456/*XXXX*/ 457/*XXXX*/
458 key_free(k);
457 if (success != 1) 459 if (success != 1)
458 break; 460 break;
459 key_free(k);
460 /* advance cp: skip whitespace and data */ 461 /* advance cp: skip whitespace and data */
461 while (*cp == ' ' || *cp == '\t') 462 while (*cp == ' ' || *cp == '\t')
462 cp++; 463 cp++;