diff options
author | tb <tb@openbsd.org> | 2021-03-21 14:06:29 +0000 |
---|---|---|
committer | tb <tb@openbsd.org> | 2021-03-21 14:06:29 +0000 |
commit | eb7a2039256fae474a89d856a5fb29e8efc994a9 (patch) | |
tree | 6b983dcd817cab6ac09d9a4b8660d56180086dd2 /regress | |
parent | Don't warn that we can't form a temporary address when a router (diff) | |
download | wireguard-openbsd-eb7a2039256fae474a89d856a5fb29e8efc994a9.tar.xz wireguard-openbsd-eb7a2039256fae474a89d856a5fb29e8efc994a9.zip |
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; } |