diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2021-03-21 14:06:30 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2021-03-21 14:06:30 +0000 |
commit | 323f354e832de6defdd169ab5d9582b0e904c2d3 (patch) | |
tree | 3f62340ca3a810d06cabbca13a0d4c01f1830b64 /regress | |
parent | 7d0ca2ea2c90af330c343eb28f75d6fbb00d92cb (diff) |
Plug memory leak reported by Ilya Shipitsin
Since r1.7, input in base64_decoding_test() is allocated unconditionally,
so free it unconditionally.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/lib/libcrypto/base64/base64test.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/regress/lib/libcrypto/base64/base64test.c b/regress/lib/libcrypto/base64/base64test.c index cfe79222670..a05bc107547 100644 --- a/regress/lib/libcrypto/base64/base64test.c +++ b/regress/lib/libcrypto/base64/base64test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: base64test.c,v 1.8 2020/03/10 11:13:28 inoguchi Exp $ */ +/* $OpenBSD: base64test.c,v 1.9 2021/03/21 14:06:29 tb Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -434,8 +434,7 @@ base64_decoding_test(int test_no, struct base64_test *bt, int test_nl) done: BIO_free_all(bio_mem); free(buf); - if (test_nl) - free(input); + free(input); return failure; } |