summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2000-09-20 15:37:52 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2000-09-20 15:37:52 +0000
commit829c605b5835b32127f647bb27541d6e6c24086a (patch)
tree3b2408e15a946306ed49802a8256e0d8f626abe1 /misc
parentfcd56c24b741c72f65f08f6731328475e4a6020d (diff)
downloadlibapr-829c605b5835b32127f647bb27541d6e6c24086a.tar.gz
Thanks Jeff.
PR: Obtained from: Submitted by: Reviewed by: git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60537 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc')
-rw-r--r--misc/win32/rand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/win32/rand.c b/misc/win32/rand.c
index aad32327e..0f124fdfc 100644
--- a/misc/win32/rand.c
+++ b/misc/win32/rand.c
@@ -59,14 +59,14 @@
apr_status_t apr_generate_random_bytes(unsigned char * buf, int length)
{
HCRYPTPROV hProv;
+ apr_status_t res = APR_SUCCESS;
if (!CryptAcquireContext(&hProv,NULL,NULL,PROV_RSA_FULL,0)) {
return GetLastError();
}
if (!CryptGenRandom(hProv,length,buf)) {
- CryptReleaseContext(hProv, 0);
- return GetLastError();
+ res = GetLastError();
}
CryptReleaseContext(hProv, 0);
- return APR_SUCCESS;
+ return res;
}