summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/random.c')
-rw-r--r--src/pulsecore/random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pulsecore/random.c b/src/pulsecore/random.c
index 1bd69c2d..b2ec19f0 100644
--- a/src/pulsecore/random.c
+++ b/src/pulsecore/random.c
@@ -49,11 +49,11 @@ static int random_proper(void *ret_data, size_t length) {
#ifdef OS_IS_WIN32
int ret = -1;
+ HCRYPTPROV hCryptProv = 0;
+
pa_assert(ret_data);
pa_assert(length > 0);
- HCRYPTPROV hCryptProv = NULL;
-
if (CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
if(CryptGenRandom(hCryptProv, length, ret_data))
ret = 0;