diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-08-13 06:04:11 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-08-13 06:04:11 +0000 |
commit | 0a338e93e4b7381f39a610e00a9bedb892d0e51f (patch) | |
tree | 894e7e4bc8bd888a7eb5d39e3ce3156910f41852 /lib/libcrypto/crypto/arc4random_linux.h | |
parent | 9b3e5e0bb3fde337365a91a44f51e62e19559459 (diff) |
munmap correct object in (extremely unlikely, and effectively terminal)
case of failing to map the 2nd object.
found by Paul Maurers
Diffstat (limited to 'lib/libcrypto/crypto/arc4random_linux.h')
-rw-r--r-- | lib/libcrypto/crypto/arc4random_linux.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/crypto/arc4random_linux.h b/lib/libcrypto/crypto/arc4random_linux.h index 7acba3f78e5..123525f2f13 100644 --- a/lib/libcrypto/crypto/arc4random_linux.h +++ b/lib/libcrypto/crypto/arc4random_linux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random_linux.h,v 1.7 2014/07/20 20:51:13 bcook Exp $ */ +/* $OpenBSD: arc4random_linux.h,v 1.8 2014/08/13 06:04:10 deraadt Exp $ */ /* * Copyright (c) 1996, David Mazieres <dm@uun.org> @@ -76,7 +76,7 @@ _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { - munmap(*rsxp, sizeof(**rsxp)); + munmap(*rsp, sizeof(**rsp)); return (-1); } |