Blame SOURCES/0030-tmp-Fix-rng-seed-double-free.patch
|
|
6ed7c9 |
diff --git a/providers/implementations/rands/seed_src.c b/providers/implementations/rands/seed_src.c
|
|
|
6ed7c9 |
index 173c99ce1732..7a4b780bb469 100644
|
|
|
6ed7c9 |
--- a/providers/implementations/rands/seed_src.c
|
|
|
6ed7c9 |
+++ b/providers/implementations/rands/seed_src.c
|
|
|
6ed7c9 |
@@ -201,10 +201,11 @@ static size_t seed_get_seed(void *vseed, unsigned char **pout,
|
|
|
6ed7c9 |
ERR_raise(ERR_LIB_PROV, ERR_R_MALLOC_FAILURE);
|
|
|
6ed7c9 |
return 0;
|
|
|
6ed7c9 |
}
|
|
|
6ed7c9 |
- *pout = p;
|
|
|
6ed7c9 |
if (seed_src_generate(vseed, p, bytes_needed, 0, prediction_resistance,
|
|
|
6ed7c9 |
- adin, adin_len) != 0)
|
|
|
6ed7c9 |
+ adin, adin_len) != 0) {
|
|
|
6ed7c9 |
+ *pout = p;
|
|
|
6ed7c9 |
return bytes_needed;
|
|
|
6ed7c9 |
+ }
|
|
|
6ed7c9 |
OPENSSL_secure_clear_free(p, bytes_needed);
|
|
|
6ed7c9 |
return 0;
|
|
|
6ed7c9 |
}
|